Inheritance: System.Windows.Window
Esempio n. 1
0
		void SetLogOnText(string text, int idx)
		{
			if (m_dispatcher.CheckAccess() == false)
			{
				m_dispatcher.Invoke(new Action<string, int>(SetLogOnText), text, idx);
				return;
			}

			if (m_logOnDialog == null)
			{
				App.MainWindow.IsEnabled = false;

				m_logOnDialog = new LogOnDialog();
				m_logOnDialog.Owner = App.MainWindow;
				if (idx == 0)
					m_logOnDialog.SetText1(text);
				else
					m_logOnDialog.SetText2(text);
				m_logOnDialog.Show();
			}
			else
			{
				if (idx == 0)
					m_logOnDialog.SetText1(text);
				else
					m_logOnDialog.SetText2(text);
			}
		}
Esempio n. 2
0
        public LogOnDialog OpenLogOnDialog()
        {
            // disabling main window loses its focus, so we need to re-enable it after dialog closes
            this.IsEnabled = false;

            var logOnDialog = new LogOnDialog();

            logOnDialog.Owner   = this;
            logOnDialog.Closed += (s, e) => { this.IsEnabled = true; Focus(); };
            logOnDialog.Show();

            return(logOnDialog);
        }
Esempio n. 3
0
		void CloseLoginDialog()
		{
			if (m_dispatcher.CheckAccess() == false)
			{
				m_dispatcher.Invoke(new Action(CloseLoginDialog));
				return;
			}

			if (m_logOnDialog != null)
			{
				m_logOnDialog.Close();
				m_logOnDialog = null;

				App.MainWindow.IsEnabled = true;
				App.MainWindow.Focus();
			}
		}
Esempio n. 4
0
		public LogOnDialog OpenLogOnDialog()
		{
			// disabling main window loses its focus, so we need to re-enable it after dialog closes
			this.IsEnabled = false;

			var logOnDialog = new LogOnDialog();
			logOnDialog.Owner = this;
			logOnDialog.Closed += (s, e) => { this.IsEnabled = true; Focus(); };
			logOnDialog.Show();

			return logOnDialog;
		}