private void                tsButton_Add_Click(object aSender, EventArgs aEventArgs)
        {
            bool lExit = false;
            var  lName = "State" + (mCSharpFSMClone.StateCount + 1).ToString();

            do
            {
                try
                {
                    lName = StringForm.getString(lName, this, "Add State");
                    if (lName != null)
                    {
                        if (mCSharpFSMClone.isStateExists(lName))
                        {
                            throw new ArgumentException("State '" + lName + "' already exists. ");
                        }

                        CSScipt lScript = new CSScipt(mBrowser);
                        if (lScript.setupByForm(lName, this) == DialogResult.OK)
                        {
                            mCSharpFSMClone.addState(lName, lScript);

                            updateForm();
                            updateButtons();
                        }

                        lExit = true;
                    }
                }
                catch (Exception lExc)
                {
                    MessageForm.showMessage(lExc.Message, this);
                }
            }while (lName != null && lExit == false);
        }
        private void                tsButton_Rename_Click(object aSender, EventArgs aEventArgs)
        {
            if (mSelectedNode != null)
            {
                string lName = mSelectedNode.LabelText;
                string lNewName;
                bool   lExit = false;

                do
                {
                    try
                    {
                        lNewName = StringForm.getString(lName, this, "Rename State");
                        if (lNewName != null)
                        {
                            mCSharpFSMClone.renameState(lName, lNewName);

                            updateForm();
                            updateButtons();
                        }
                        lExit = true;
                    }
                    catch (Exception lExc)
                    {
                        MessageForm.showMessage(lExc.Message, this);
                    }
                }while (lExit == false);
            }
        }
Esempio n. 3
0
        public void             setupByForm(IWin32Window aOwner)
        {
            string lNewToolTip = StringForm.getString(LabelText, this, "Panel ToolTip");

            if (lNewToolTip != null)
            {
                LabelText = lNewToolTip;
            }
        }
Esempio n. 4
0
        public void             setupByForm(IWin32Window aOwner)
        {
            string lNewText = StringForm.getString(LabelText, this, "GroupBox Text");

            if (lNewText != null)
            {
                LabelText = lNewText;
            }
        }