-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Your library is not being added to mine.NET 8 from NUGET. I decided to import the SystemTray icon class itself. But after downloading, it gives an error at startup.
- error:
wpf-notifyicon-2.0.1\src\NotifyIconWpf\Interop\WindowMessageSink.cs #243
Exception:System.OverflowException: "Arithmetic operation resulted in an overflow.
ContextMenuReceived?.Invoke(new Point()
{
X = (short)((nint)wParam & 0xFFFF),
Y = (short)((nint)wParam >> 16 & 0xFFFF)
}.ScaleWithDpi());
// --->>>>>>> wParam = 0x0000000003b0fed2
// --->>>>>>> wParam = 0x0000000003b1fed1var x = (nint)wParam & 0xFFFF; // where wParam = 0x0000000003b0fed2
// where (nint)wParam & 0xFFFF = 0x000000000000fed5
// but it 0x000000000000fed5 not convert to SHORTReplace SHORT to INT.
- error:
wpf-notifyicon-2.0.1\src\NotifyIconWpf.Sample.ShowCases\Main.xaml.cs #53
Exception:System.ArgumentException: "Argument must be between 0 and 2. (Parameter 'fieldCount')"
var executingAssembly = Assembly.GetExecutingAssembly();
// Use assembly version
string version = executingAssembly.GetName().Version.ToString();
// Use AssemblyFileVersion if available
var assemblyFileVersionAttribute = executingAssembly.GetCustomAttribute<AssemblyFileVersionAttribute>();
if (!string.IsNullOrEmpty(assemblyFileVersionAttribute?.Version))
{
var assemblyFileVersion = new Version(assemblyFileVersionAttribute.Version);
version = assemblyFileVersion.ToString(3); // it is max 2
}Replace 3 to 2.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels