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