コード例 #1
0
        private void AddButton_Click_1(object sender, EventArgs e)

        {
            UIErrorHelper.CheckedExecNonModal(delegate()

            {
                if (this.AddButton.Text == VMwareMMCIDP.UI.Common.Utilities.MMCUIConstants.EDIT)

                {
                    SetUIToolsEditability();

                    this.AddButton.Text = VMwareMMCIDP.UI.Common.Utilities.MMCUIConstants.UPDATE;
                }

                else if (UIErrorHelper.ShowConfirm(VMwareMMCIDP.UI.Common.Utilities.MMCUIConstants.CONFIRM) == DialogResult.Yes)

                {
                    DoValidateControls();

                    FillDTOWithUIControls();

                    this.Close();

                    this.DialogResult = DialogResult.OK;
                }
            });
        }
コード例 #2
0
ファイル: ObjectClassWindow.cs プロジェクト: wfu8/lightwave
        private void AddButton_Click(object sender, EventArgs e)

        {
            if (this.AddButton.Text == "Edit")

            {
                this.AddButton.Text = "Update";

                SetEditableFields();
            }

            else if (UIErrorHelper.ShowConfirm(VMwareMMCIDP.UI.Common.Utilities.MMCUIConstants.CONFIRM) == DialogResult.Yes)

            {
                UIErrorHelper.CheckedExecNonModal(delegate()

                {
                    DoValidateControls();

                    UpdateObjectClassDTOWithUIValues();

                    this.DialogResult = DialogResult.OK;

                    this.Close();
                });
            }
        }