예제 #1
0
 /// <summary>
 /// Sets the focus to the first custom control that is of an input type.
 /// </summary>
 private void SetFocus()
 {
     if (isMessageBox)
     {
         // If this is just a message box, set the focus to the visible "accept" button.
         if (YesButton.Visible)
         {
             YesButton.Focus();
         }
         else
         {
             OKButton.Focus();
         }
     }
     else
     {
         // Otherwise set the focus to the first input control.
         foreach (Control control in customControls)
         {
             if (control is TextBox || control is ComboBox || control is RichTextBox)
             {
                 control.Focus();
                 return;
             }
         }
     }
 }
예제 #2
0
        /// <summary>
        /// Click the Yes button to inactivate a form
        /// </summary>
        public void ConfirmInactivation()
        {
            try
            {
                BaseWaitForPageToLoad(Driver, 10);
                string parentHandle = Driver.CurrentWindowHandle; // the main window
                string popupHandle = string.Empty; // the popup window
                IReadOnlyCollection<string> windowHandles = Driver.WindowHandles; // contains all currently open windows

                // find the popup window
                foreach (string handle in windowHandles)
                {
                    if (handle != parentHandle)
                    {
                        popupHandle = handle;
                        break;
                    }
                }

                // switch to the popup window, click <Yes>, and switch back to the main window
                Driver.SwitchTo().Window(popupHandle);
                YesButton.Click();
                Driver.SwitchTo().Window(parentHandle);
            }
            catch (Exception e)
            {
                throw e;
            }
        }
예제 #3
0
        private void InitializeEvent()
        {
            ControlTemplate baseWindowTemplate = (ControlTemplate)App.Current.Resources["BaseWindowControlTemplate"];

            Border borderTitle = (Border)baseWindowTemplate.FindName("borderTitle", this);
            Button closeBtn    = (Button)baseWindowTemplate.FindName("btnClose", this);
            Button minBtn      = (Button)baseWindowTemplate.FindName("btnMin", this);

            YesButton = (Button)baseWindowTemplate.FindName("btnYes", this);
            NoButton  = (Button)baseWindowTemplate.FindName("btnNo", this);

            YesButton.Focus();

            minBtn.Click += delegate
            {
                MinWin();
            };

            closeBtn.Click += delegate
            {
                this.Close();
            };

            borderTitle.MouseMove += delegate(object sender, MouseEventArgs e)
            {
                if (e.LeftButton == MouseButtonState.Pressed)
                {
                    this.DragMove();
                }
            };
        }
 public override void StopAnimations()
 {
     base.StopAnimations();
     ChatFrameInstance.StopAnimations();
     YesButton.StopAnimations();
     YesButton1.StopAnimations();
 }
예제 #5
0
 private void NoButton_Enter(object sender, EventArgs e)
 {
     if (k != 0)
     {
         YesButton.Focus();
     }
 }
예제 #6
0
    void  Start()
    {
        playButtons = this.transform.Find("PlayButtons");
        yesButton   = playButtons.GetComponentInChildren <YesButton>();
        yesButton.AddEventListener(this.gameObject);
        noButton = playButtons.GetComponentInChildren <NoButton>();
        noButton.AddEventListener(this.gameObject);

        playButtons.active = false;

        bombChain       = this.transform.Find("BombChain").gameObject;
        maxHand         = this.transform.Find("MaxHand").GetComponent <Hand>();
        bombAttachSound = this.transform.Find("BombAttachSound").GetComponent <SoundObject>();
        maxHand.AddEventListener(this.gameObject);
        chainHand = this.transform.Find("ChainHand").GetComponent <Hand>();
        chainHand.AddEventListener(this.gameObject);

        textBoxManagerAfterFirstDialogue = this.transform.Find("TextBoxManagerAfterFirstDialogue").GetComponent <TextBoxManager>();
        textBoxManagerAfterFirstDialogue.AddEventListener(this.gameObject);

        textBoxManagerAfterFirstDialogue.active = false;

        playerControl = this.GetComponentInChildren <MenuPlayerControl>();
        maxHand.AddEventListener(playerControl.gameObject);

        AttachChainToMax();
    }
        public Dialog(string message, string positiveMsg, string negativeMsg) : this()
        {
            MessageTextBlock.Text = message;
            YesButton.Content     = positiveMsg;
            NoButton.Content      = negativeMsg;

            YesButton.Focus();
        }
예제 #8
0
        public override void OnKeyPress(KeyPressEventArgs e)
        {
            base.OnKeyPress(e);

            if (AllowKeyPress)
            {
                if (e.KeyChar == (char)Keys.Escape)
                {
                    switch (Buttons)
                    {
                    case MirMessageBoxButtons.OK:
                        if (OKButton != null && !OKButton.IsDisposed)
                        {
                            OKButton.InvokeMouseClick(null);
                        }
                        break;

                    case MirMessageBoxButtons.OKCancel:
                    case MirMessageBoxButtons.YesNoCancel:
                        if (CancelButton != null && !CancelButton.IsDisposed)
                        {
                            CancelButton.InvokeMouseClick(null);
                        }
                        break;

                    case MirMessageBoxButtons.YesNo:
                        if (NoButton != null && !NoButton.IsDisposed)
                        {
                            NoButton.InvokeMouseClick(null);
                        }
                        break;
                    }
                }

                else if (e.KeyChar == (char)Keys.Enter)
                {
                    switch (Buttons)
                    {
                    case MirMessageBoxButtons.OK:
                    case MirMessageBoxButtons.OKCancel:
                        if (OKButton != null && !OKButton.IsDisposed)
                        {
                            OKButton.InvokeMouseClick(null);
                        }
                        break;

                    case MirMessageBoxButtons.YesNoCancel:
                    case MirMessageBoxButtons.YesNo:
                        if (YesButton != null && !YesButton.IsDisposed)
                        {
                            YesButton.InvokeMouseClick(null);
                        }
                        break;
                    }
                }
                e.Handled = true;
            }
        }
예제 #9
0
        public override void Draw(SpriteBatch spriteBatch)
        {
            base.Draw(spriteBatch);

            AlignText(prompt, Alignment.Center, 75f);
            prompt.Draw(spriteBatch);

            YesButton.Draw(spriteBatch);
            NoButton.Draw(spriteBatch);
        }
예제 #10
0
 private void MessageBoxDialog_Loaded(object sender, RoutedEventArgs e)
 {
     if (OkButton.Visibility == System.Windows.Visibility.Visible)
     {
         OkButton.Focus();
     }
     else
     {
         YesButton.Focus();
     }
 }
예제 #11
0
 void ModernDialog_Loaded(object sender, RoutedEventArgs e)
 {
     this.Loaded -= ModernDialog_Loaded;
     if (OkButton != null)
     {
         OkButton.Focus();
     }
     if (YesButton != null)
     {
         YesButton.Focus();
     }
 }
예제 #12
0
 private void DialogForm_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Escape)
     {
         NoButton.PerformClick();
     }
     else if (e.KeyCode == Keys.F1)
     {
         YesButton.PerformClick();
     }
     else if (e.KeyCode == Keys.F2)
     {
         NoButton.PerformClick();
     }
     return;
 }
예제 #13
0
        private void PrepareAsk(string title, string instruction, string observation, bool yesAsDefault, Icons icon)
        {
            CancelButton.Visibility = Visibility.Collapsed;
            OkButton.Visibility     = Visibility.Collapsed;

            if (yesAsDefault)
            {
                YesButton.Focus();
            }
            else
            {
                NoButton.Focus();
            }

            IconViewbox.Child = GetIcon(icon);

            InstructionLabel.Text     = instruction;
            ObservationTextBlock.Text = observation;
            Title = title;
        }
예제 #14
0
    // Use this for initialization
    void Start()
    {
        playContainer            = this.transform.Find("PlayContainer");
        playContainerAltPosition = this.transform.Find("PlayContainerAltPosition");

        skipTutorialContainer = this.transform.Find("SkipTutorialContainer");
        backgroundMusic       = GameObject.Find("IntroMusic").GetComponent <AudioSource>();
        DontDestroyOnLoad(backgroundMusic.gameObject);

        yesButton = this.transform.Find("PlayContainer/Yes").GetComponent <YesButton>();
        yesButton.AddEventListener(this.gameObject);

        int tutorialPassed = PlayerPrefs.GetInt(GlobalSaveVars.TUTORIALFINISHED, 0);

        if (tutorialPassed == 1)
        {
            skipTutorialContainer.active = true;
            skipTutorialContainer.GetComponentInChildren <SkipTutorialButton>().AddEventListener(this.gameObject);
            playContainer.position = playContainerAltPosition.position;
        }
    }
예제 #15
0
        // TODO refactor window switching
        /// <summary>
        /// Click the Yes button to delete the user
        /// </summary>
        public void ConfirmDeletion()
        {
            var parentHandle = _driver.CurrentWindowHandle;                     // the main window
            var popupHandle  = string.Empty;                                    // the popup window
            IReadOnlyCollection <string> windowHandles = _driver.WindowHandles; // contains all currently open windows

            // find the popup window
            foreach (var handle in windowHandles)
            {
                if (handle == parentHandle)
                {
                    continue;
                }
                popupHandle = handle;
                break;
            }

            // switch to the popup window, click <Yes>, and switch back to the main window
            _driver.SwitchTo().Window(popupHandle);
            YesButton.WaitAndClick(_driver);
            _driver.SwitchTo().Window(parentHandle);
        }
        private void OnLoaded(object sender, RoutedEventArgs routedEventArgs)
        {
            Loaded -= OnLoaded;
            switch (DefaultResult)
            {
            case MessageBoxResult.OK:
                OkButton.Focus();
                break;

            case MessageBoxResult.Cancel:
                CancelButton.Focus();
                break;

            case MessageBoxResult.Yes:
                YesButton.Focus();
                break;

            case MessageBoxResult.No:
                NoButton.Focus();
                break;
            }
        }
예제 #17
0
        private void NewMessageBox_Load(object sender, EventArgs e)
        {
            if (mbb == MessageBoxButtons.OK)
            {
                OKButton.Show();
                CancelButton.Hide();
                YesButton.Hide();
                NoButton.Hide();
            }

            if (mbb == MessageBoxButtons.OKCancel)
            {
                OKButton.Show();
                CancelButton.Show();
                CancelButton.Location = new Point(175, 169);
                YesButton.Hide();
                NoButton.Hide();
            }

            if (mbb == MessageBoxButtons.YesNo)
            {
                OKButton.Hide();
                CancelButton.Hide();
                YesButton.Show();
                NoButton.Show();
            }

            if (mbb == MessageBoxButtons.YesNoCancel)
            {
                OKButton.Hide();
                CancelButton.Show();
                CancelButton.Location = new Point(120, 169);
                YesButton.Show();
                NoButton.Show();
            }
        }
예제 #18
0
        //Delete Added Skill----------------//
        internal void DeleteSkill()
        {
            Global.GlobalDefinitions.driver.FindElement(By.XPath("//*[@id='listing-management-section']/div[2]/div[1]/table/tbody/tr/td[8]/i[3]")).Click();

            Global.GlobalDefinitions.wait(5);

            YesButton.Click();
            Global.GlobalDefinitions.wait(5);

            Global.GlobalDefinitions.wait(5); Global.GlobalDefinitions.driver.FindElement(By.XPath("//html/body"));

            GlobalDefinitions.driver.SwitchTo().DefaultContent();
            Thread.Sleep(500);

            // Creates a toggle for the given test, adds all log events under it
            test = extent.StartTest("Delete Skill Test");

            try
            {
                string ExpectedText1 = Global.GlobalDefinitions.ExcelLib.ReadData(2, "Description");
                string ActualText1   = Global.GlobalDefinitions.driver.FindElement(By.XPath("//*[@id='listing-management-section']/div[2]/div[1]/table/tbody/tr/td[4]")).Text;

                if (ExpectedText1.Equals(ActualText1))
                {
                    Global.Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Delete Skill UnSuccessful");
                    String img2 = SaveScreenShotClass.SaveScreenshot(GlobalDefinitions.driver, "DeleteSkill_Fail");
                    test.Log(LogStatus.Info, "Image example: " + img2);
                }
            }
            catch (NoSuchElementException)
            {
                Global.Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Delete Skill Successful");
                String img3 = SaveScreenShotClass.SaveScreenshot(GlobalDefinitions.driver, "DeleteSkill_Pass");
                test.Log(LogStatus.Info, "Image example: " + img3);
            }
        }
예제 #19
0
 public void ConfirmYesNoRequest()
 {
     Validate.Exists(YesButton);
     YesButton.Click();
 }
 public void InterpolateBetween(VariableState firstState, VariableState secondState, float interpolationValue)
 {
         #if DEBUG
     if (float.IsNaN(interpolationValue))
     {
         throw new System.Exception("interpolationValue cannot be NaN");
     }
         #endif
     bool  setChatFrameInstanceHeightFirstValue  = false;
     bool  setChatFrameInstanceHeightSecondValue = false;
     float ChatFrameInstanceHeightFirstValue     = 0;
     float ChatFrameInstanceHeightSecondValue    = 0;
     bool  setChatFrameInstanceWidthFirstValue   = false;
     bool  setChatFrameInstanceWidthSecondValue  = false;
     float ChatFrameInstanceWidthFirstValue      = 0;
     float ChatFrameInstanceWidthSecondValue     = 0;
     bool  setHeightFirstValue  = false;
     bool  setHeightSecondValue = false;
     float HeightFirstValue     = 0;
     float HeightSecondValue    = 0;
     bool  setWidthFirstValue   = false;
     bool  setWidthSecondValue  = false;
     float WidthFirstValue      = 0;
     float WidthSecondValue     = 0;
     bool  setYesButtonCurrentButtonTypeStateFirstValue  = false;
     bool  setYesButtonCurrentButtonTypeStateSecondValue = false;
     AbbatoirIntergrade.GumRuntimes.frames.ButtonFrameRuntime.ButtonType YesButtonCurrentButtonTypeStateFirstValue  = AbbatoirIntergrade.GumRuntimes.frames.ButtonFrameRuntime.ButtonType.Check;
     AbbatoirIntergrade.GumRuntimes.frames.ButtonFrameRuntime.ButtonType YesButtonCurrentButtonTypeStateSecondValue = AbbatoirIntergrade.GumRuntimes.frames.ButtonFrameRuntime.ButtonType.Check;
     bool  setYesButtonXFirstValue  = false;
     bool  setYesButtonXSecondValue = false;
     float YesButtonXFirstValue     = 0;
     float YesButtonXSecondValue    = 0;
     bool  setYesButtonYFirstValue  = false;
     bool  setYesButtonYSecondValue = false;
     float YesButtonYFirstValue     = 0;
     float YesButtonYSecondValue    = 0;
     bool  setYesButton1CurrentButtonTypeStateFirstValue  = false;
     bool  setYesButton1CurrentButtonTypeStateSecondValue = false;
     AbbatoirIntergrade.GumRuntimes.frames.ButtonFrameRuntime.ButtonType YesButton1CurrentButtonTypeStateFirstValue  = AbbatoirIntergrade.GumRuntimes.frames.ButtonFrameRuntime.ButtonType.Check;
     AbbatoirIntergrade.GumRuntimes.frames.ButtonFrameRuntime.ButtonType YesButton1CurrentButtonTypeStateSecondValue = AbbatoirIntergrade.GumRuntimes.frames.ButtonFrameRuntime.ButtonType.Check;
     bool  setYesButton1XFirstValue  = false;
     bool  setYesButton1XSecondValue = false;
     float YesButton1XFirstValue     = 0;
     float YesButton1XSecondValue    = 0;
     bool  setYesButton1YFirstValue  = false;
     bool  setYesButton1YSecondValue = false;
     float YesButton1YFirstValue     = 0;
     float YesButton1YSecondValue    = 0;
     switch (firstState)
     {
     case  VariableState.Default:
         setChatFrameInstanceHeightFirstValue = true;
         ChatFrameInstanceHeightFirstValue    = 75f;
         setChatFrameInstanceWidthFirstValue  = true;
         ChatFrameInstanceWidthFirstValue     = 90f;
         if (interpolationValue < 1)
         {
             this.ChatFrameInstance.XOrigin = RenderingLibrary.Graphics.HorizontalAlignment.Center;
         }
         if (interpolationValue < 1)
         {
             this.ChatFrameInstance.XUnits = Gum.Converters.GeneralUnitType.PixelsFromMiddle;
         }
         if (interpolationValue < 1)
         {
             this.ChatFrameInstance.YOrigin = RenderingLibrary.Graphics.VerticalAlignment.Center;
         }
         if (interpolationValue < 1)
         {
             this.ChatFrameInstance.YUnits = Gum.Converters.GeneralUnitType.PixelsFromMiddle;
         }
         setHeightFirstValue = true;
         HeightFirstValue    = 50f;
         if (interpolationValue < 1)
         {
             this.HeightUnits = Gum.DataTypes.DimensionUnitType.Percentage;
         }
         setWidthFirstValue = true;
         WidthFirstValue    = 50f;
         if (interpolationValue < 1)
         {
             this.WidthUnits = Gum.DataTypes.DimensionUnitType.Percentage;
         }
         setYesButtonCurrentButtonTypeStateFirstValue = true;
         YesButtonCurrentButtonTypeStateFirstValue    = AbbatoirIntergrade.GumRuntimes.frames.ButtonFrameRuntime.ButtonType.Check;
         if (interpolationValue < 1)
         {
             this.YesButton.Parent = this.ContainedElements.FirstOrDefault(item => item.Name == "ChatFrameInstance") ?? this;
         }
         setYesButtonXFirstValue = true;
         YesButtonXFirstValue    = 894f;
         setYesButtonYFirstValue = true;
         YesButtonYFirstValue    = 342f;
         setYesButton1CurrentButtonTypeStateFirstValue = true;
         YesButton1CurrentButtonTypeStateFirstValue    = AbbatoirIntergrade.GumRuntimes.frames.ButtonFrameRuntime.ButtonType.X;
         if (interpolationValue < 1)
         {
             this.YesButton1.Parent = this.ContainedElements.FirstOrDefault(item => item.Name == "ChatFrameInstance") ?? this;
         }
         setYesButton1XFirstValue = true;
         YesButton1XFirstValue    = 101f;
         setYesButton1YFirstValue = true;
         YesButton1YFirstValue    = 339f;
         break;
     }
     switch (secondState)
     {
     case  VariableState.Default:
         setChatFrameInstanceHeightSecondValue = true;
         ChatFrameInstanceHeightSecondValue    = 75f;
         setChatFrameInstanceWidthSecondValue  = true;
         ChatFrameInstanceWidthSecondValue     = 90f;
         if (interpolationValue >= 1)
         {
             this.ChatFrameInstance.XOrigin = RenderingLibrary.Graphics.HorizontalAlignment.Center;
         }
         if (interpolationValue >= 1)
         {
             this.ChatFrameInstance.XUnits = Gum.Converters.GeneralUnitType.PixelsFromMiddle;
         }
         if (interpolationValue >= 1)
         {
             this.ChatFrameInstance.YOrigin = RenderingLibrary.Graphics.VerticalAlignment.Center;
         }
         if (interpolationValue >= 1)
         {
             this.ChatFrameInstance.YUnits = Gum.Converters.GeneralUnitType.PixelsFromMiddle;
         }
         setHeightSecondValue = true;
         HeightSecondValue    = 50f;
         if (interpolationValue >= 1)
         {
             this.HeightUnits = Gum.DataTypes.DimensionUnitType.Percentage;
         }
         setWidthSecondValue = true;
         WidthSecondValue    = 50f;
         if (interpolationValue >= 1)
         {
             this.WidthUnits = Gum.DataTypes.DimensionUnitType.Percentage;
         }
         setYesButtonCurrentButtonTypeStateSecondValue = true;
         YesButtonCurrentButtonTypeStateSecondValue    = AbbatoirIntergrade.GumRuntimes.frames.ButtonFrameRuntime.ButtonType.Check;
         if (interpolationValue >= 1)
         {
             this.YesButton.Parent = this.ContainedElements.FirstOrDefault(item => item.Name == "ChatFrameInstance") ?? this;
         }
         setYesButtonXSecondValue = true;
         YesButtonXSecondValue    = 894f;
         setYesButtonYSecondValue = true;
         YesButtonYSecondValue    = 342f;
         setYesButton1CurrentButtonTypeStateSecondValue = true;
         YesButton1CurrentButtonTypeStateSecondValue    = AbbatoirIntergrade.GumRuntimes.frames.ButtonFrameRuntime.ButtonType.X;
         if (interpolationValue >= 1)
         {
             this.YesButton1.Parent = this.ContainedElements.FirstOrDefault(item => item.Name == "ChatFrameInstance") ?? this;
         }
         setYesButton1XSecondValue = true;
         YesButton1XSecondValue    = 101f;
         setYesButton1YSecondValue = true;
         YesButton1YSecondValue    = 339f;
         break;
     }
     if (setChatFrameInstanceHeightFirstValue && setChatFrameInstanceHeightSecondValue)
     {
         ChatFrameInstance.Height = ChatFrameInstanceHeightFirstValue * (1 - interpolationValue) + ChatFrameInstanceHeightSecondValue * interpolationValue;
     }
     if (setChatFrameInstanceWidthFirstValue && setChatFrameInstanceWidthSecondValue)
     {
         ChatFrameInstance.Width = ChatFrameInstanceWidthFirstValue * (1 - interpolationValue) + ChatFrameInstanceWidthSecondValue * interpolationValue;
     }
     if (setHeightFirstValue && setHeightSecondValue)
     {
         Height = HeightFirstValue * (1 - interpolationValue) + HeightSecondValue * interpolationValue;
     }
     if (setWidthFirstValue && setWidthSecondValue)
     {
         Width = WidthFirstValue * (1 - interpolationValue) + WidthSecondValue * interpolationValue;
     }
     if (setYesButtonCurrentButtonTypeStateFirstValue && setYesButtonCurrentButtonTypeStateSecondValue)
     {
         YesButton.InterpolateBetween(YesButtonCurrentButtonTypeStateFirstValue, YesButtonCurrentButtonTypeStateSecondValue, interpolationValue);
     }
     if (setYesButtonXFirstValue && setYesButtonXSecondValue)
     {
         YesButton.X = YesButtonXFirstValue * (1 - interpolationValue) + YesButtonXSecondValue * interpolationValue;
     }
     if (setYesButtonYFirstValue && setYesButtonYSecondValue)
     {
         YesButton.Y = YesButtonYFirstValue * (1 - interpolationValue) + YesButtonYSecondValue * interpolationValue;
     }
     if (setYesButton1CurrentButtonTypeStateFirstValue && setYesButton1CurrentButtonTypeStateSecondValue)
     {
         YesButton1.InterpolateBetween(YesButton1CurrentButtonTypeStateFirstValue, YesButton1CurrentButtonTypeStateSecondValue, interpolationValue);
     }
     if (setYesButton1XFirstValue && setYesButton1XSecondValue)
     {
         YesButton1.X = YesButton1XFirstValue * (1 - interpolationValue) + YesButton1XSecondValue * interpolationValue;
     }
     if (setYesButton1YFirstValue && setYesButton1YSecondValue)
     {
         YesButton1.Y = YesButton1YFirstValue * (1 - interpolationValue) + YesButton1YSecondValue * interpolationValue;
     }
     if (interpolationValue < 1)
     {
         mCurrentVariableState = firstState;
     }
     else
     {
         mCurrentVariableState = secondState;
     }
 }
예제 #21
0
 public AskInjectForm()
 {
     InitializeComponent();
     YesButton.SetDefaultColor();
     NoButton.SetDefaultColor();
 }
예제 #22
0
 public void NoButtonClickUI()     //Client
 {
     RPC("AnswerChoiceRPC", NetworkReceivers.Server, false);
     YesButton.SetActive(false);
     NoButton.SetActive(false);
 }
예제 #23
0
        /// <summary>
        /// Make a shadow copy of the element at the current state which stays available even the element is gone.
        /// </summary>
        /// <returns>A shadow copy of the current element.</returns>
        public new BasicMessageBoxData GetDataCopy()
        {
            var data = new BasicMessageBoxData();

            FillData(data);

            data.Icon = GetSafeData(() =>
            {
                if (Icon == null)
                {
                    return(null);
                }
                return(Icon.GetDataCopy());
            });

            data.Text = GetSafeData(() => Text);

            data.OKButton = GetSafeData(() =>
            {
                if (OKButton == null)
                {
                    return(null);
                }
                return(OKButton.GetDataCopy());
            });

            data.CancelButton = GetSafeData(() =>
            {
                if (CancelButton == null)
                {
                    return(null);
                }
                return(CancelButton.GetDataCopy());
            });

            data.AbortButton = GetSafeData(() =>
            {
                if (AbortButton == null)
                {
                    return(null);
                }
                return(AbortButton.GetDataCopy());
            });

            data.RetryButton = GetSafeData(() =>
            {
                if (RetryButton == null)
                {
                    return(null);
                }
                return(RetryButton.GetDataCopy());
            });

            data.IgnoreButton = GetSafeData(() =>
            {
                if (IgnoreButton == null)
                {
                    return(null);
                }
                return(IgnoreButton.GetDataCopy());
            });

            data.YesButton = GetSafeData(() =>
            {
                if (YesButton == null)
                {
                    return(null);
                }
                return(YesButton.GetDataCopy());
            });

            data.NoButton = GetSafeData(() =>
            {
                if (NoButton == null)
                {
                    return(null);
                }
                return(NoButton.GetDataCopy());
            });

            return(data);
        }
예제 #24
0
        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);

            if (disposing)
            {
                if (Label != null)
                {
                    if (!Label.IsDisposed)
                    {
                        Label.Dispose();
                    }
                    Label = null;
                }

                if (OKButton != null)
                {
                    if (!OKButton.IsDisposed)
                    {
                        OKButton.Dispose();
                    }
                    OKButton = null;
                }

                if (CancelButton != null)
                {
                    if (!CancelButton.IsDisposed)
                    {
                        CancelButton.Dispose();
                    }
                    CancelButton = null;
                }

                if (NoButton != null)
                {
                    if (!NoButton.IsDisposed)
                    {
                        NoButton.Dispose();
                    }
                    NoButton = null;
                }

                if (YesButton != null)
                {
                    if (!YesButton.IsDisposed)
                    {
                        YesButton.Dispose();
                    }
                    YesButton = null;
                }

                if (HiddenBox != null)
                {
                    DXTextBox.ActiveTextBox = HiddenBox;
                    HiddenBox = null;
                }

                Buttons = DXMessageBoxButtons.None;
                MessageBoxList.Remove(this);
            }
        }
예제 #25
0
 public void AskForChoiceRPC()     //Called by Server on Client
 {
     YesButton.SetActive(true);
     NoButton.SetActive(true);
 }
예제 #26
0
 private void OnLoaded(object sender, RoutedEventArgs eventArgs)
 {
     // Set initial focus.
     YesButton.Focus();
 }
예제 #27
0
        public YesNoPageView()
        {
            InitializeComponent();

            Loaded += (sender, e) => YesButton.Focus();
        }
 private void EventUnitItemDropForm_Load(object sender, EventArgs e)
 {
     FormIcon.Image      = SystemIcons.Question.ToBitmap();
     YesButton.ForeColor = OptionForm.Color_ControlComment_ForeColor();
     YesButton.Focus();
 }
예제 #29
0
 private void MessageBoxEx_Activated(object sender, EventArgs e)
 {
     YesButton.Focus();             // put initial focus on Yes button
 }
예제 #30
0
 void Start()
 {
     YesButton.SetActive(false);
     NoButton.SetActive(false);
 }