Axiom.Samples.SdkTrayManager.ShowYesNoDialog C# (CSharp) Метод

ShowYesNoDialog() публичный Метод

Pops up a question dialog with Yes and No buttons.
public ShowYesNoDialog ( System.String caption, System.String question ) : void
caption System.String
question System.String
Результат void
		public void ShowYesNoDialog( DisplayString caption, DisplayString question )
		{
			OverlayElement e;
			if ( Dialog != null )
			{
				Dialog.Caption = caption;
				Dialog.Text = question;
				if ( mOk != null )
				{
					if ( mOk != null )
						mOk.Cleanup();

					mOk = null;
				}
				else
					return;
			}
			else
			{
				// give widgets a chance to reset in case they're in the middle of something
				for ( int i = 0; i < 10; i++ )
				{
					for ( int j = 0; j < mWidgets[ i ].Count; j++ )
					{
						mWidgets[ i ][ j ].OnLostFocus();
					}
				}
				mDialogShade.Show();
				Dialog = new TextBox( mName + "/DialogBox", caption, 300, 208 );
				Dialog.Text = question;
				e = Dialog.OverlayElement;
				mDialogShade.AddChild( e );
				e.VerticalAlignment = VerticalAlignment.Center;
				e.Left = -( e.Width / 2 );
				e.Top = -( e.Height / 2 );
				CursorWasVisible = IsCursorVisible;
				ShowCursor();
			}
			mYes = new Button( mName + "/YesButton", "Yes", 58 );
			mYes.AssignedTrayListener = this;
			e = mYes.OverlayElement;
			mDialogShade.AddChild( e );
			e.VerticalAlignment = VerticalAlignment.Center;
			e.Left = -( e.Width + 2 );
			e.Top = Dialog.OverlayElement.Top + Dialog.OverlayElement.Height + 5;
			mNo = new Button( mName + "/NoButton", "No", 50 );
			mNo.AssignedTrayListener = this;
			e = mNo.OverlayElement;
			mDialogShade.AddChild( e );
			e.VerticalAlignment = VerticalAlignment.Center;
			e.Left = 3;
			e.Top = Dialog.OverlayElement.Top + Dialog.OverlayElement.Height + 5;
		}