public static MinerClientsWindow ShowWindow(bool isToggle)
 {
     if (_instance == null)
     {
         _instance = new MinerClientsWindow();
         _instance.Show();
     }
     else
     {
         if (_instance.WindowState == WindowState.Minimized)
         {
             _instance.WindowState = WindowState.Normal;
         }
         else if (!_instance.IsVisible)
         {
             _instance.Show();
             _instance.Activate();
         }
         else if (isToggle)
         {
             _instance.Hide();
         }
         else
         {
             _instance.Show();
             _instance.Activate();
         }
     }
     return(_instance);
 }
 protected override void OnClosed(EventArgs e)
 {
     _instance = null;
     base.OnClosed(e);
     ConsoleWindow.Instance.Hide();
 }