Ejemplo n.º 1
0
		private void SystemWindow_Closing(object sender, WidgetClosingEnventArgs closingEvent)
		{
			if (systemWindowWithPopContent != null)
			{
				SaveSizeAndPosition();
				SaveWindowShouldStartClosed();
				if (systemWindowWithPopContent.Children.Count == 1)
				{
					GuiWidget child = systemWindowWithPopContent.Children[0];
					systemWindowWithPopContent.RemoveChild(child);
					child.ClearRemovedFlag();
					widgetWithPopContent.RemoveAllChildren();
					widgetWithPopContent.AddChild(child);
				}
				systemWindowWithPopContent = null;
			}
		}
Ejemplo n.º 2
0
		public virtual void OnClosing(out bool cancelClose)
		{
			cancelClose = false;

			if (Closing != null)
			{
				WidgetClosingEnventArgs closingEventArgs = new WidgetClosingEnventArgs();
				Closing(this, closingEventArgs);
				if (closingEventArgs.Cancel == true)
				{
					// someone canceled it so stop checking.
					cancelClose = true;
					return;
				}
			}

			foreach (GuiWidget child in Children)
			{
				child.OnClosing(out cancelClose);
				if (cancelClose)
				{
					// someone canceled it so stop checking.
					return;
				}
			}
		}
Ejemplo n.º 3
0
		private void SystemWindow_Closing(object sender, WidgetClosingEnventArgs closingEvent)
		{
			SaveSizeAndPosition();
			SaveWindowShouldStartClosed();
			if (PopedOutSystemWindow.Children.Count == 1)
			{
				GuiWidget child = PopedOutSystemWindow.Children[0];
				PopedOutSystemWindow.RemoveChild(child);
				widgetWhosContentsPopOut.RemoveAllChildren();
				widgetWhosContentsPopOut.AddChild(child);
			}
			PopedOutSystemWindow = null;
		}