remove some stuff

This commit is contained in:
Nguyen Duy
2024-11-05 20:10:29 +07:00
parent dd2a6ada07
commit 08dbde764d
3 changed files with 9 additions and 18 deletions
-2
View File
@@ -9,8 +9,6 @@ namespace ParsecVDisplay
{
internal static class CLI
{
static StreamWriter _stdOutWriter;
public static int Execute(string[] args)
{
AttachConsole(-1);
+3 -3
View File
@@ -36,19 +36,19 @@
<!--Dialog messages-->
<system:String x:Key="t_msg_up_to_date">您的应用程序版本已经是最新的。</system:String>
<system:String x:Key="t_msg_update_available">有新的更新可用 — v{0} 。\n为了保持您的最佳体验,请立即更新。"</system:String>
<system:String x:Key="t_msg_update_available">有新的更新可用 — v{0}。\n为了保持您的最佳体验,请立即更新。"</system:String>
<system:String x:Key="t_msg_custom_access_denied">无法应用自定义分辨率,访问被拒绝!</system:String>
<system:String x:Key="t_msg_custom_invalid_slot">插槽 #{0} 中的值无效。</system:String>
<system:String x:Key="t_msg_exceeded_display_limit">到达最大虚拟显示器限额,无法添加更多的虚拟显示器 ({0}).</system:String>
<system:String x:Key="t_msg_exceeded_display_limit">到达最大虚拟显示器限额,无法添加更多的虚拟显示器 ({0})</system:String>
<system:String x:Key="t_msg_prompt_leave_all">即将删除全部的虚拟显示器。\n您是否仍然要退出?</system:String>
<system:String x:Key="t_msg_driver_status">驱动状态</system:String>
<system:String x:Key="t_msg_must_restart_pc">你需要重新启动计算机才能使驱动程序正常工作</system:String>
<system:String x:Key="t_msg_driver_is_disabled">{0} 已禁用,请在设备管理器中启用它。</system:String>
<system:String x:Key="t_msg_please_install_driver">请先安装驱动程序。</system:String>
<system:String x:Key="t_msg_driver_status_not_ok">驱动程序不正常,请重新检查。当前状态: {0}.</system:String>
<system:String x:Key="t_msg_driver_status_not_ok">驱动程序不正常,请重新检查。当前状态: {0}</system:String>
<system:String x:Key="t_msg_failed_to_obtain_handle">无法获取设备句柄,请重新检查驱动程序安装。</system:String>
</ResourceDictionary>
+6 -13
View File
@@ -13,9 +13,7 @@ namespace ParsecVDisplay
static IWin32Window Owner => new Helper.ArbitraryWindow(MainWindow.Handle);
NotifyIcon TrayIcon;
static System.Windows.Controls.ContextMenu Menu;
Thread AppThread;
Thread GuiThread;
ToolStripMenuItem MI_Language;
@@ -45,10 +43,10 @@ namespace ParsecVDisplay
{
Instance = this;
AppThread = new Thread(App.Main);
AppThread.IsBackground = true;
AppThread.SetApartmentState(ApartmentState.STA);
AppThread.Start();
GuiThread = new Thread(App.Main);
GuiThread.IsBackground = true;
GuiThread.SetApartmentState(ApartmentState.STA);
GuiThread.Start();
var appName = $"{Program.AppName} v{Program.AppVersion}";
var appIcon = Icon.ExtractAssociatedIcon(Application.ExecutablePath);
@@ -117,11 +115,6 @@ namespace ParsecVDisplay
});
}
void VddTimer_Tick(object sender, EventArgs e)
{
ParsecVDD.Ping();
}
void RestoreDisplays()
{
ParsecVDD.Ping();
@@ -297,7 +290,7 @@ namespace ParsecVDisplay
}
App.Current?.Dispatcher.Invoke(App.Current.Shutdown);
AppThread.Join();
GuiThread.Join();
TrayIcon.Visible = false;
Application.Exit();