mirror of
https://github.com/Hofknecht/SystemTrayMenu.git
synced 2024-06-10 14:35:06 +12:00
Code Cleaning, version 1.2.8.5
This commit is contained in:
parent
eaf755ee81
commit
a8643b00b1
|
@ -5,7 +5,6 @@
|
||||||
namespace SystemTrayMenu
|
namespace SystemTrayMenu
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
|
@ -6,7 +6,6 @@ namespace SystemTrayMenu.Helper
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net;
|
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
|
@ -39,5 +39,5 @@ using System.Runtime.InteropServices;
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.8.4")]
|
[assembly: AssemblyVersion("1.2.8.5")]
|
||||||
[assembly: AssemblyFileVersion("1.2.8.4")]
|
[assembly: AssemblyFileVersion("1.2.8.5")]
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
namespace SystemTrayMenu.UserInterface
|
namespace SystemTrayMenu.UserInterface
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using SystemTrayMenu.Helper;
|
using SystemTrayMenu.Helper;
|
||||||
using SystemTrayMenu.Utilities;
|
using SystemTrayMenu.Utilities;
|
||||||
|
@ -16,7 +15,6 @@ namespace SystemTrayMenu.UserInterface
|
||||||
private readonly Timer load = new();
|
private readonly Timer load = new();
|
||||||
private readonly NotifyIcon notifyIcon = new();
|
private readonly NotifyIcon notifyIcon = new();
|
||||||
private bool threadsLoading;
|
private bool threadsLoading;
|
||||||
private int rotationAngle;
|
|
||||||
|
|
||||||
public AppNotifyIcon()
|
public AppNotifyIcon()
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,8 +6,6 @@ namespace SystemTrayMenu.UserInterface.HotkeyTextboxControl
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
#pragma warning restore CA1308
|
|
||||||
|
|
||||||
public class EventDelay
|
public class EventDelay
|
||||||
{
|
{
|
||||||
private readonly long waitTime;
|
private readonly long waitTime;
|
||||||
|
|
|
@ -363,7 +363,6 @@ namespace SystemTrayMenu.UserInterface.HotkeyTextboxControl
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma warning disable CA1308
|
|
||||||
public static string GetKeyName(Keys givenKey)
|
public static string GetKeyName(Keys givenKey)
|
||||||
{
|
{
|
||||||
StringBuilder keyName = new();
|
StringBuilder keyName = new();
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
namespace SystemTrayMenu.Utilities
|
namespace SystemTrayMenu.Utilities
|
||||||
{
|
{
|
||||||
using System;
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
|
@ -42,7 +41,7 @@ namespace SystemTrayMenu.Utilities
|
||||||
|
|
||||||
using (Process p = new())
|
using (Process p = new())
|
||||||
{
|
{
|
||||||
string fileName = Process.GetCurrentProcess().MainModule.FileName;
|
string fileName = System.Environment.ProcessPath;
|
||||||
p.StartInfo = new ProcessStartInfo(fileName);
|
p.StartInfo = new ProcessStartInfo(fileName);
|
||||||
|
|
||||||
try
|
try
|
||||||
|
|
|
@ -41,12 +41,9 @@ namespace SystemTrayMenu.Utilities
|
||||||
}
|
}
|
||||||
|
|
||||||
dgv.Columns[i].Width = (int)(widthMax + 0.5);
|
dgv.Columns[i].Width = (int)(widthMax + 0.5);
|
||||||
|
|
||||||
#pragma warning disable CA1303 // Do not pass literals as localized parameters
|
|
||||||
string stringWithWidthLikeIcon = "____";
|
string stringWithWidthLikeIcon = "____";
|
||||||
float width0 = gfx.MeasureString(
|
float width0 = gfx.MeasureString(
|
||||||
stringWithWidthLikeIcon,
|
stringWithWidthLikeIcon,
|
||||||
#pragma warning restore CA1303 // Do not pass literals as localized parameters
|
|
||||||
dgv.RowTemplate.DefaultCellStyle.Font).Width;
|
dgv.RowTemplate.DefaultCellStyle.Font).Width;
|
||||||
|
|
||||||
double factorIconSizeInPercent = Properties.Settings.Default.IconSizeInPercent / 100f;
|
double factorIconSizeInPercent = Properties.Settings.Default.IconSizeInPercent / 100f;
|
||||||
|
|
|
@ -5,9 +5,7 @@
|
||||||
namespace SystemTrayMenu.Utilities
|
namespace SystemTrayMenu.Utilities
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net.NetworkInformation;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using Shell32;
|
using Shell32;
|
||||||
|
|
||||||
|
|
|
@ -46,9 +46,7 @@ namespace SystemTrayMenu.Utilities
|
||||||
ex is COMException ||
|
ex is COMException ||
|
||||||
ex is TypeLoadException)
|
ex is TypeLoadException)
|
||||||
{
|
{
|
||||||
#pragma warning disable CA1303 // Do not pass literals as localized parameters
|
|
||||||
Log.Warn("Get Shell COM instance failed", ex);
|
Log.Warn("Get Shell COM instance failed", ex);
|
||||||
#pragma warning restore CA1303 //=> Exceptions not translated in logfile => OK
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue