NET 8 Upgrade (#687)

* Initial .NET8 Upgrade

* Initial GitHub Actions Cleanup

* Fix Desktop Notifications

* Fix throw warning

* Upgrade vunerable transative nuget packages

* Fix warnings with registry overflow

* Adjust async/await usage for configRepository

* Fix TTS voice name and app auto start

* Install .NET 8 with setup

I regret NSIS

* Remove no longer needed System/MS references (included in dotnet sdk)

* Surpress stackalloc in loop warning, that code scares me.

* Removed unused SharpDX packages

* Ignore WebClient warning, hopefully this project doesn't move past NET 8

* Fixed terrifying code

* GenerateAssemblyInfo

* Trimmed editor config to only silence warning.

* Fix open webpage

* Fix updater

---------

Co-authored-by: DubyaDude <ushafiq141@gmail.com>
Co-authored-by: Natsumi <cmcooper123@hotmail.com>
This commit is contained in:
Ethan Cordray
2023-11-21 07:41:57 -05:00
committed by GitHub
parent 7bb5c8ea45
commit 2e9db3153d
26 changed files with 796 additions and 736 deletions

View File

@@ -14,9 +14,9 @@ using System.Security.Cryptography;
using System.Text;
using System.Threading;
using System.Windows.Forms;
using Windows.UI.Notifications;
using CefSharp;
using librsync.net;
using Microsoft.Toolkit.Uwp.Notifications;
using Microsoft.Win32;
using NLog;
@@ -106,7 +106,10 @@ namespace VRCX
if (url.StartsWith("http://") ||
url.StartsWith("https://"))
{
Process.Start(url).Close();
Process.Start(new ProcessStartInfo(url)
{
UseShellExecute = true
});
}
}
@@ -182,20 +185,18 @@ namespace VRCX
/// <param name="Image">The optional image to display in the notification.</param>
public void DesktopNotification(string BoldText, string Text = "", string Image = "")
{
var toastXml = ToastNotificationManager.GetTemplateContent(ToastTemplateType.ToastImageAndText02);
var stringElements = toastXml.GetElementsByTagName("text");
var imagePath = Path.Combine(Program.BaseDirectory, "VRCX.ico");
if (!string.IsNullOrEmpty(Image))
{
imagePath = Image;
}
ToastContentBuilder builder = new ToastContentBuilder();
if (Uri.TryCreate(Image, UriKind.Absolute, out Uri uri))
builder.AddAppLogoOverride(uri);
stringElements[0].AppendChild(toastXml.CreateTextNode(BoldText));
stringElements[1].AppendChild(toastXml.CreateTextNode(Text));
var imageElements = toastXml.GetElementsByTagName("image");
imageElements[0].Attributes.GetNamedItem("src").NodeValue = imagePath;
var toast = new ToastNotification(toastXml);
ToastNotificationManager.CreateToastNotifier("VRCX").Show(toast);
if (!string.IsNullOrEmpty(BoldText))
builder.AddText(BoldText);
if (!string.IsNullOrEmpty(Text))
builder.AddText(Text);
builder.Show();
}
/// <summary>
@@ -229,7 +230,8 @@ namespace VRCX
{
IPCServer.Send(new IPCPacket
{
Type = "VRCXLaunch"
Type = "VRCXLaunch",
MsgType = "VRCXLaunch"
});
}