示例#1
0
 public static void _WndProc(int msg, IntPtr wParam)
 {
     if (msg == WM_SETTINGCHANGE)
     {
         // Must stop all updates or interface will freeze during screen updates.
         Global.DHelper.Stop();
         _ResumeTimer.Stop();
         _ResumeTimer.Start();
     }
     if (msg == DeviceDetector.WM_DEVICECHANGE)
     {
         Global.DHelper.UpdateDevicesEnabled = true;
     }
     // If message value was found then...
     else if (msg == _WindowMessage)
     {
         // Show currently running instance.
         if (wParam.ToInt32() == wParam_Restore)
         {
             OnRestore?.Invoke(null, null);
         }
         //  Close currently running instance.
         if (wParam.ToInt32() == wParam_Close)
         {
             OnClose?.Invoke(null, null);
         }
     }
 }
示例#2
0
        /// <summary>
        /// Close and make a new window.
        /// </summary>
        public void Restore()
        {
            if (!Initialized)
				throw new InvalidOperationException("Window not initialized.");

            Close();
            Make();
            Show();

			OnRestore?.Invoke(this, EventArgs.Empty);
		}
示例#3
0
 internal static void HandleRestore(bool didClearRenderTargets)
 {
     OnRestore?.Invoke(didClearRenderTargets);
 }
示例#4
0
 private void DoOnRestore(MouseEventArgs args)
 {
     IsMaximized = false;
     OnRestore.InvokeAsync(new Tuple <ICardTools, MouseEventArgs>(this, args));
 }