Ejemplo n.º 1
0
 protected virtual void OnClosed(WindowClosedEventArgs e)
 {
     if (Closed != null)
     {
         Closed.Invoke(this, e);
     }
 }
Ejemplo n.º 2
0
		public virtual void Close() {
			WindowClosingEventArgs ex = new WindowClosingEventArgs();
			OnClosing(ex);
			if (!ex.Cancel) {
				Manager.Input.KeyDown -= Input_KeyDown;
				Manager.Input.GamePadDown -= Input_GamePadDown;
				Manager.ModalWindow = lastModal;
				if (lastModal != null)
					lastModal.Focused = true;
				Hide();
				WindowClosedEventArgs ev = new WindowClosedEventArgs();
				OnClosed(ev);

				if (ev.Dispose) {
					this.Dispose();
				}
			}
		}
Ejemplo n.º 3
0
 private void closeDialog_Closed(object sender, WindowClosedEventArgs e)
 {
     if ((sender as Dialog).ModalResult == EModalResult.Yes)
     {
         Exit();
     }
     else
     {
         mExit = false;
         mExitDialog.Closed -= closeDialog_Closed;
         mExitDialog.Dispose();
         mExitDialog = null;
         if (mMainWindow != null)
         {
             mMainWindow.Focused = true;
         }
     }
 }
Ejemplo n.º 4
0
        public virtual void Close()
        {
            WindowClosingEventArgs ex = new WindowClosingEventArgs();

            OnClosing(ex);
            if (!ex.Cancel)
            {
                Manager.Input.KeyDown     -= Input_KeyDown;
                Manager.Input.GamePadDown -= Input_GamePadDown;
                Manager.ModalWindow        = lastModal;
                if (lastModal != null)
                {
                    lastModal.Focused = true;
                }
                Hide();
                WindowClosedEventArgs ev = new WindowClosedEventArgs();
                OnClosed(ev);

                if (ev.Dispose)
                {
                    this.Dispose();
                }
            }
        }
Ejemplo n.º 5
0
		protected virtual void OnClosed(WindowClosedEventArgs e) {
			if (Closed != null)
				Closed.Invoke(this, e);
		}
Ejemplo n.º 6
0
		private void closeDialog_Closed(object sender, WindowClosedEventArgs e) {
			if ((sender as Dialog).ModalResult == EModalResult.Yes) {
				Exit();
			} else {
				mExit = false;
				mExitDialog.Closed -= closeDialog_Closed;
				mExitDialog.Dispose();
				mExitDialog = null;
				if (mMainWindow != null)
					mMainWindow.Focused = true;
			}
		}