//构造函数 public MainWindow() { InitializeComponent(); WindowHide windowHide = new WindowHide(this); WindowHideManager.GetInstance().windowHideList.Add(windowHide); }
//构造函数 public MainWindow() { InitializeComponent(); viewModel = new MainViewModel(); this.DataContext = viewModel; WindowHide windowHide = new WindowHide(this); WindowHideManager.GetInstance().windowHideList.Add(windowHide); }
//构造函数 public MainWindow() { InitializeComponent(); ThemeManager.Current.ThemeSyncMode = ThemeSyncMode.SyncWithAppMode; ThemeManager.Current.SyncTheme(); viewModel = new MainViewModel(); this.DataContext = viewModel; WindowHide windowHide = new WindowHide(this); WindowHideManager.GetInstance().windowHideList.Add(windowHide); }
/// <summary> /// 窗体回调函数,接收所有窗体消息的事件处理函数 /// </summary> /// <param name="hWnd">窗口句柄</param> /// <param name="msg">消息</param> /// <param name="wideParam">附加参数1</param> /// <param name="longParam">附加参数2</param> /// <param name="handled">是否处理</param> /// <returns>返回句柄</returns> private IntPtr WndProc(IntPtr hWnd, int msg, IntPtr wideParam, IntPtr longParam, ref bool handled) { switch (msg) { case HotKeyManager.WM_HOTKEY: int sid = wideParam.ToInt32(); if (sid == m_HotKeySettings[EHotKeySetting.ShowAllWindow]) { WindowHideManager.GetInstance().StopAllHideAction(2000); } handled = true; break; } return(IntPtr.Zero); }