public WaitWindow ShowWaitWindow(string message = null)
        {
            var window = new WaitWindow(message);

            window.Show();
            return(window);
        }
 public void CloseWaitWindow(WaitWindow window)
 {
     if (window != null)
     {
         window.Close();
     }
 }
        void Login()
        {
            lock (sync)
            {
                view.SetState(LoginState.LoggingIn);
                window = view.ShowWaitWindow();

                client.LoginCompleted += ClientOnLoginCompleted;
                client.Login(view.Server, view.Username, view.Password);
            }
        }
 public WaitWindow ShowWaitWindow(string message = null)
 {
     var window = new WaitWindow(message);
     window.Show();
     return window;
 }
 public void CloseWaitWindow(WaitWindow window)
 {
     if (window != null)
         window.Close();
 }