1 Star 0 Fork 153

ideaor/GeekDesk

forked from dotNET China/GeekDesk 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
MainWindow.xaml.cs 27.16 KB
一键复制 编辑 原始数据 按行查看 历史
BookerLiu 提交于 2022-09-01 15:23 . :white_check_mark:优化代码
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890
using GeekDesk.Constant;
using GeekDesk.Control.UserControls.Config;
using GeekDesk.Control.UserControls.PannelCard;
using GeekDesk.Control.Windows;
using GeekDesk.Interface;
using GeekDesk.MyThread;
using GeekDesk.Task;
using GeekDesk.Util;
using GeekDesk.ViewModel;
using GeekDesk.ViewModel.Temp;
using Microsoft.Win32;
using NPinyin;
using ShowSeconds;
using System;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Threading;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Interop;
using System.Windows.Media.Animation;
using System.Windows.Threading;
using static GeekDesk.Util.ShowWindowFollowMouse;
namespace GeekDesk
{
/// <summary>
/// MainWindow.xaml 的交互逻辑
/// </summary>
///
public partial class MainWindow : Window, IWindowCommon
{
public static AppData appData = CommonCode.GetAppDataByFile();
public static ToDoInfoWindow toDoInfoWindow;
public static int hotKeyId = -1;
public static int toDoHotKeyId = -1;
public static int colorPickerHotKeyId = -1;
public static MainWindow mainWindow;
public MainWindow()
{
//加载数据
LoadData();
InitializeComponent();
//用于其他类访问
mainWindow = this;
//置于顶层
this.Topmost = true;
//执行待办提醒
ToDoTask.BackLogCheck();
////实例化隐藏 Hide类,进行时间timer设置
MarginHide.ReadyHide(this);
if (appData.AppConfig.MarginHide)
{
MarginHide.StartHide();
}
}
/// <summary>
/// 搜索快捷键按下
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void SearchHotKeyDown(object sender, CanExecuteRoutedEventArgs e)
{
if (appData.AppConfig.SearchType == SearchType.HOT_KEY)
{
ShowSearchBox();
}
}
/// <summary>
/// 显示搜索框
/// </summary>
private void ShowSearchBox()
{
RunTimeStatus.SEARCH_BOX_SHOW = true;
RightCard.VisibilitySearchCard(Visibility.Visible);
SearchBox.Width = 400;
SearchBox.Focus();
}
/// <summary>
/// 搜索开始
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void SearchBox_TextChanged(object sender, TextChangedEventArgs e)
{
if (!RunTimeStatus.SEARCH_BOX_SHOW
&& appData.AppConfig.SearchType != SearchType.KEY_DOWN
)
{
SearchBox.TextChanged -= SearchBox_TextChanged;
SearchBox.Clear();
SearchBox.TextChanged += SearchBox_TextChanged;
return;
}
if (!RunTimeStatus.SEARCH_BOX_SHOW) ShowSearchBox();
//刷新搜索后 鼠标移动次数置为0
RunTimeStatus.MOUSE_MOVE_COUNT = 0;
//隐藏popup
RightCard.MyPoptip.IsOpen = false;
string inputText = SearchBox.Text.ToLower();
RightCard.VerticalUFG.Visibility = Visibility.Collapsed;
if (!string.IsNullOrEmpty(inputText))
{
SearchIconList.IconList.Clear();
ObservableCollection<MenuInfo> menuList = appData.MenuList;
foreach (MenuInfo menu in menuList)
{
ObservableCollection<IconInfo> iconList = menu.IconList;
foreach (IconInfo icon in iconList)
{
string pyName = Pinyin.GetInitials(icon.Name).ToLower();
if (icon.Name.Contains(inputText) || pyName.Contains(inputText))
{
SearchIconList.IconList.Add(icon);
}
}
}
}
else
{
SearchIconList.IconList.Clear();
}
if (RightCard.SearchListBox.Items.Count > 0)
{
RightCard.SearchListBox.SelectedIndex = 0;
}
RightCard.VerticalUFG.Visibility = Visibility.Visible;
}
/// <summary>
/// 隐藏搜索框
/// </summary>
public void HidedSearchBox()
{
RunTimeStatus.SEARCH_BOX_SHOW = false;
SearchBox.TextChanged -= SearchBox_TextChanged;
SearchBox.Clear();
SearchBox.TextChanged += SearchBox_TextChanged;
SearchBox.Width = 0;
SearchIconList.IconList.Clear();
RightCard.VisibilitySearchCard(Visibility.Collapsed);
Keyboard.Focus(SearchBox);
App.DoEvents();
}
/// <summary>
/// 加载缓存数据
/// </summary>
private void LoadData()
{
this.DataContext = appData;
if (appData.MenuList.Count == 0)
{
appData.MenuList.Add(new MenuInfo() { MenuName = "NewMenu", MenuId = System.Guid.NewGuid().ToString(), MenuEdit = Visibility.Collapsed });
}
this.Width = appData.AppConfig.WindowWidth;
this.Height = appData.AppConfig.WindowHeight;
}
/// <summary>
/// 窗口加载完毕 执行方法
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void Window_Loaded(object sender, RoutedEventArgs e)
{
BGSettingUtil.BGSetting();
if (!appData.AppConfig.StartedShowPanel)
{
this.Visibility = Visibility.Collapsed;
}
else
{
ShowApp();
}
//给任务栏图标一个名字
BarIcon.Text = Constants.MY_NAME;
//注册热键
if (true == appData.AppConfig.EnableAppHotKey)
{
RegisterHotKey(true);
}
if (true == appData.AppConfig.EnableTodoHotKey)
{
RegisterCreateToDoHotKey(true);
}
if (true == appData.AppConfig.EnableColorPickerHotKey)
{
RegisterColorPickerHotKey(true);
}
//注册自启动
if (!appData.AppConfig.SelfStartUped && !Constants.DEV)
{
RegisterUtil.SetSelfStarting(appData.AppConfig.SelfStartUp, Constants.MY_NAME);
}
//注册鼠标监听事件
if (appData.AppConfig.MouseMiddleShow)
{
MouseHookThread.Hook();
}
//显秒插件
if (appData.AppConfig.SecondsWindow == true)
{
SecondsWindow.ShowWindow();
}
//更新线程开启 检测更新
UpdateThread.Update();
//建立相对路径
RelativePathThread.MakeRelativePath();
//毛玻璃 暂时未解决阴影问题
//BlurGlassUtil.EnableBlur(this);
MessageUtil.ChangeWindowMessageFilter(MessageUtil.WM_COPYDATA, 1);
}
/// <summary>
/// 注册当前窗口的热键
/// </summary>
public static void RegisterHotKey(bool first)
{
try
{
if (appData.AppConfig.HotkeyModifiers != GlobalHotKey.HotkeyModifiers.None)
{
hotKeyId = GlobalHotKey.RegisterHotKey(appData.AppConfig.HotkeyModifiers, appData.AppConfig.Hotkey, () =>
{
if (MotionControl.hotkeyFinished)
{
if (mainWindow.Visibility == Visibility.Collapsed || mainWindow.Opacity == 0 || MarginHide.IS_HIDE)
{
ShowApp();
}
else
{
HideApp();
}
}
});
if (!first)
{
HandyControl.Controls.Growl.Success("GeekDesk快捷键注册成功(" + appData.AppConfig.HotkeyStr + ")!", "HotKeyGrowl");
}
}
else
{
}
}
catch (Exception)
{
if (first)
{
HandyControl.Controls.Growl.WarningGlobal("GeekDesk启动快捷键已被其它程序占用(" + appData.AppConfig.HotkeyStr + ")!");
}
else
{
HandyControl.Controls.Growl.Warning("GeekDesk启动快捷键已被其它程序占用(" + appData.AppConfig.HotkeyStr + ")!", "HotKeyGrowl");
}
}
}
/// <summary>
/// 注册新建待办的热键
/// </summary>
public static void RegisterCreateToDoHotKey(bool first)
{
try
{
if (appData.AppConfig.HotkeyModifiers != GlobalHotKey.HotkeyModifiers.None)
{
//加载完毕注册热键
toDoHotKeyId = GlobalHotKey.RegisterHotKey(appData.AppConfig.ToDoHotkeyModifiers, appData.AppConfig.ToDoHotkey, () =>
{
if (MotionControl.hotkeyFinished)
{
ToDoWindow.ShowOrHide();
}
});
if (!first)
{
HandyControl.Controls.Growl.Success("新建待办任务快捷键注册成功(" + appData.AppConfig.ToDoHotkeyStr + ")!", "HotKeyGrowl");
}
}
}
catch (Exception)
{
if (first)
{
HandyControl.Controls.Growl.WarningGlobal("新建待办任务快捷键已被其它程序占用(" + appData.AppConfig.ToDoHotkeyStr + ")!");
}
else
{
HandyControl.Controls.Growl.Warning("新建待办任务快捷键已被其它程序占用(" + appData.AppConfig.ToDoHotkeyStr + ")!", "HotKeyGrowl");
}
}
}
/// <summary>
/// 注册新建待办的热键
/// </summary>
public static void RegisterColorPickerHotKey(bool first)
{
try
{
if (appData.AppConfig.HotkeyModifiers != GlobalHotKey.HotkeyModifiers.None)
{
//加载完毕注册热键
colorPickerHotKeyId = GlobalHotKey.RegisterHotKey(appData.AppConfig.ColorPickerHotkeyModifiers, appData.AppConfig.ColorPickerHotkey, () =>
{
if (MotionControl.hotkeyFinished)
{
GlobalColorPickerWindow.CreateNoShow();
}
});
if (!first)
{
HandyControl.Controls.Growl.Success("拾色器快捷键注册成功(" + appData.AppConfig.ColorPickerHotkeyStr + ")!", "HotKeyGrowl");
}
}
}
catch (Exception)
{
if (first)
{
HandyControl.Controls.Growl.WarningGlobal("拾色器快捷键已被其它程序占用(" + appData.AppConfig.ColorPickerHotkeyStr + ")!");
}
else
{
HandyControl.Controls.Growl.Warning("拾色器快捷键已被其它程序占用(" + appData.AppConfig.ColorPickerHotkeyStr + ")!", "HotKeyGrowl");
}
}
}
/// <summary>
/// 程序窗体拖动
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void DragMove(object sender, MouseEventArgs e)
{
if (e.LeftButton == MouseButtonState.Pressed)
{
var windowMode = this.ResizeMode;
if (this.ResizeMode != ResizeMode.NoResize)
{
this.ResizeMode = ResizeMode.NoResize;
}
this.UpdateLayout();
/* 当点击拖拽区域的时候,让窗口跟着移动
(When clicking the drag area, make the window follow) */
DragMove();
if (this.ResizeMode != windowMode)
{
this.ResizeMode = windowMode;
}
this.UpdateLayout();
}
}
/// <summary>
/// 关闭按钮单击事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void CloseButtonClick(object sender, RoutedEventArgs e)
{
HideApp();
}
///// <summary>
///// 左侧栏宽度改变 持久化
///// </summary>
///// <param name="sender"></param>
///// <param name="e"></param>
//private void LeftCardResize(object sender, System.Windows.Controls.Primitives.DragCompletedEventArgs e)
//{
// appData.AppConfig.MenuCardWidth = LeftColumn.Width.Value;
//}
/// <summary>
/// 右键任务栏图标 显示主面板
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
public void ShowApp(object sender, RoutedEventArgs e)
{
ShowApp();
}
public static void ShowApp()
{
//有全屏化应用则不显示
//if (CommonCode.IsPrimaryFullScreen())
//{
// return;
//}
if (MarginHide.ON_HIDE)
{
//修改贴边隐藏状态为未隐藏
MarginHide.IS_HIDE = false;
if (!CommonCode.MouseInWindow(mainWindow))
{
RunTimeStatus.MARGIN_HIDE_AND_OTHER_SHOW = true;
MarginHide.WaitHide(3000);
}
}
if (appData.AppConfig.FollowMouse)
{
ShowWindowFollowMouse.Show(mainWindow, MousePosition.CENTER, 0, 0);
}
MainWindow.mainWindow.Activate();
mainWindow.Show();
//mainWindow.Visibility = Visibility.Visible;
if (appData.AppConfig.AppAnimation)
{
appData.AppConfig.IsShow = true;
}
else
{
appData.AppConfig.IsShow = null;
//防止永远不显示界面
if (mainWindow.Opacity < 1)
{
mainWindow.Opacity = 1;
}
}
//FadeStoryBoard(1, (int)CommonEnum.WINDOW_ANIMATION_TIME, Visibility.Visible);
Keyboard.Focus(mainWindow);
if (RunTimeStatus.SHOW_MENU_PASSWORDBOX)
{
mainWindow.RightCard.PDDialog.SetFocus();
}
else
{
Keyboard.Focus(mainWindow.SearchBox);
}
}
public static void HideApp()
{
if (appData.AppConfig.AppAnimation)
{
appData.AppConfig.IsShow = false;
}
else
{
appData.AppConfig.IsShow = null;
HideAppVis();
}
}
private static void HideAppVis()
{
//关闭锁定
RunTimeStatus.LOCK_APP_PANEL = false;
if (RunTimeStatus.SEARCH_BOX_SHOW)
{
mainWindow.HidedSearchBox();
}
mainWindow.Visibility = Visibility.Collapsed;
//if (!MarginHide.IS_HIDE)
//{
//}
//else
//{
// ShowApp();
//}
}
/// <summary>
/// 淡入淡出效果
/// </summary>
/// <param name="opacity"></param>
/// <param name="milliseconds"></param>
/// <param name="visibility"></param>
public static void FadeStoryBoard(int opacity, int milliseconds, Visibility visibility)
{
if (appData.AppConfig.AppAnimation)
{
DoubleAnimation opacityAnimation = new DoubleAnimation
{
From = mainWindow.Opacity,
To = opacity,
Duration = new Duration(TimeSpan.FromMilliseconds(milliseconds))
};
opacityAnimation.Completed += (s, e) =>
{
mainWindow.BeginAnimation(OpacityProperty, null);
if (visibility == Visibility.Visible)
{
mainWindow.Opacity = 1;
}
else
{
mainWindow.Opacity = 0;
CommonCode.SortIconList();
}
};
Timeline.SetDesiredFrameRate(opacityAnimation, 60);
mainWindow.BeginAnimation(OpacityProperty, opacityAnimation);
}
else
{
//防止关闭动画后 窗体仍是0透明度
mainWindow.Opacity = 1;
mainWindow.Visibility = visibility;
if (visibility == Visibility.Collapsed)
{
CommonCode.SortIconList();
}
}
}
/// <summary>
/// 图片图标单击事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void NotifyIcon_Click(object sender, RoutedEventArgs e)
{
if (this.Visibility == Visibility.Collapsed || this.Opacity == 0)
{
ShowApp();
}
else
{
HideApp();
}
}
/// <summary>
/// 右键任务栏图标 设置
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void ConfigApp(object sender, RoutedEventArgs e)
{
ConfigWindow.Show(appData.AppConfig, this);
}
/// <summary>
/// 右键任务栏图标打开程序目录
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OpenThisDir(object sender, RoutedEventArgs e)
{
Process p = new Process();
p.StartInfo.FileName = "Explorer.exe";
p.StartInfo.Arguments = "/e,/select," + Constants.APP_DIR + Constants.MY_NAME + ".exe";
p.Start();
}
/// <summary>
/// 设置图标
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void ConfigButtonClick(object sender, RoutedEventArgs e)
{
SettingMenus.IsOpen = true;
}
/// <summary>
/// 设置菜单点击
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void ConfigMenuClick(object sender, RoutedEventArgs e)
{
ConfigWindow.Show(appData.AppConfig, this);
}
/// <summary>
/// 待办任务
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void BacklogMenuClick(object sender, RoutedEventArgs e)
{
ToDoWindow.Show();
}
/// <summary>
/// 禁用设置按钮右键菜单
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void SettingButton_Initialized(object sender, EventArgs e)
{
SettingButton.ContextMenu = null;
}
private void AppWindowLostFocus()
{
if (appData.AppConfig.AppHideType == AppHideType.LOST_FOCUS
&& this.Opacity == 1 && !RunTimeStatus.LOCK_APP_PANEL)
{
//如果开启了贴边隐藏 则窗体不贴边才隐藏窗口
if (!appData.AppConfig.MarginHide || (appData.AppConfig.MarginHide && !MarginHide.IS_HIDE))
{
HideApp();
}
}
}
private void Window_SizeChanged(object sender, SizeChangedEventArgs e)
{
if (this.DataContext != null)
{
AppData appData = this.DataContext as AppData;
appData.AppConfig.WindowWidth = this.Width;
appData.AppConfig.WindowHeight = this.Height;
}
}
/// <summary>
/// 右键任务栏图标退出
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void ExitApp(object sender, RoutedEventArgs e)
{
if (appData.AppConfig.MouseMiddleShow || appData.AppConfig.SecondsWindow == true)
{
MouseHookThread.Dispose();
}
Application.Current.Shutdown();
}
/// <summary>
/// 重启
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void ReStartApp(object sender, RoutedEventArgs e)
{
if (appData.AppConfig.MouseMiddleShow || appData.AppConfig.SecondsWindow == true)
{
MouseHookThread.Dispose();
}
Process p = new Process();
p.StartInfo.FileName = Constants.APP_DIR + "GeekDesk.exe";
p.StartInfo.WorkingDirectory = Constants.APP_DIR;
p.Start();
Application.Current.Shutdown();
}
/// <summary>
/// 关闭托盘图标
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void CloseBarIcon(object sender, RoutedEventArgs e)
{
appData.AppConfig.ShowBarIcon = false;
}
public void OnKeyDown(object sender, KeyEventArgs e)
{
//char c = (char)e.Key;
if (e.Key == Key.Escape)
{
HideApp();
}
if (RunTimeStatus.SEARCH_BOX_SHOW && (e.Key == Key.Up
|| e.Key == Key.Down
|| e.Key == Key.Tab
|| e.Key == Key.Enter
))
{
if (e.Key == Key.Down || e.Key == Key.Tab)
{
RightCard.SearchListBoxIndexAdd();
}
else if (e.Key == Key.Up)
{
RightCard.SearchListBoxIndexSub();
}
else if (e.Key == Key.Enter)
{
RightCard.StartupSelectionItem();
}
}
}
/// <summary>
/// 为了让修改菜单的textBox失去焦点
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void MainWindow_MouseDown(object sender, MouseButtonEventArgs e)
{
SearchBox.Focus();
}
/// <summary>
/// 鼠标进入后
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void MainWindow_MouseEnter(object sender, MouseEventArgs e)
{
//防止延迟贴边隐藏
RunTimeStatus.MARGIN_HIDE_AND_OTHER_SHOW = false;
}
/// <summary>
/// 打开屏幕拾色器
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void ColorPicker(object sender, RoutedEventArgs e)
{
TaskbarContextMenu.IsOpen = false;
GlobalColorPickerWindow.CreateNoShow();
}
private void Window_GotFocus(object sender, RoutedEventArgs e)
{
// 如果没有在修改菜单 并且不是右键点击了面板
if (!RunTimeStatus.IS_MENU_EDIT
&& !RunTimeStatus.SHOW_RIGHT_BTN_MENU
&& !RunTimeStatus.APP_BTN_IS_DOWN)
{
if (RunTimeStatus.SHOW_MENU_PASSWORDBOX)
{
//必须在其它文本框没有工作的时候才给密码框焦点
RightCard.PDDialog.SetFocus();
}
else
{
//必须在其它文本框没有工作的时候才给搜索框焦点
Keyboard.Focus(SearchBox);
}
}
}
private void AppWindow_Deactivated(object sender, EventArgs e)
{
AppWindowLostFocus();
}
/// <summary>
/// 备份数据文件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
[Obsolete]
private void BakDataFile(object sender, RoutedEventArgs e)
{
Thread t = new Thread(() =>
{
CommonCode.BakAppData();
});
t.ApartmentState = ApartmentState.STA;
t.Start();
}
private void AppButton_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
//点击了面板
RunTimeStatus.APP_BTN_IS_DOWN = true;
new Thread(() =>
{
Thread.Sleep(50);
RunTimeStatus.APP_BTN_IS_DOWN = false;
}).Start();
}
private ICommand _hideCommand;
public ICommand HideCommand
{
get
{
if (_hideCommand == null)
{
_hideCommand = new RelayCommand(
p =>
{
return true;
},
p =>
{
HideAppVis();
});
}
return _hideCommand;
}
}
protected override void OnSourceInitialized(EventArgs e)
{
base.OnSourceInitialized(e);
HwndSource hwndSource = PresentationSource.FromVisual(this) as HwndSource;
if (hwndSource != null)
{
IntPtr handle = hwndSource.Handle;
hwndSource.AddHook(new HwndSourceHook(WndProc));
}
}
IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
{
if (msg == MessageUtil.WM_COPYDATA)
{
MessageUtil.CopyDataStruct cds = (MessageUtil.CopyDataStruct)System.Runtime.InteropServices.Marshal.PtrToStructure(lParam, typeof(MessageUtil.CopyDataStruct));
if ("ShowApp".Equals(cds.msg))
{
ShowApp();
}
}
return hwnd;
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/iuwu/GeekDesk.git
git@gitee.com:iuwu/GeekDesk.git
iuwu
GeekDesk
GeekDesk
master

搜索帮助