private void okCancelButton_ButtonClick(object aSender, EventArgs aEventArgs) { if (okCancelButton.DialogResult == DialogResult.Cancel) { DialogResult = DialogResult.Cancel; } else { try { mCSharpFSMClone.check(); mCSharpFSM.clearAllStates(); mCSharpFSM.clone(mCSharpFSMClone); mCSharpFSMClone = null; DialogResult = DialogResult.OK; } catch (Exception lExc) { MessageForm.showMessage(lExc.Message, this); } } }
public SetupForm(CSharpFSM aCSharpFSM, IItemBrowser aBrowser) { mCSharpFSM = aCSharpFSM; mBrowser = aBrowser; mCSharpFSMClone = new CSharpFSM(); mCSharpFSMClone.ItemBrowser = mBrowser; mCSharpFSMClone.clone(mCSharpFSM); InitializeComponent(); mGViewer = new GViewer(); mGViewer.Dock = DockStyle.Fill; mGViewer.ToolBarIsVisible = false; mGViewer.ObjectUnderMouseCursorChanged += MGViewer_ObjectUnderMouseCursorChanged; mGViewer.MouseClick += MGViewer_MouseClick; panel_Graph.Controls.Add(mGViewer); updateForm(); updateButtons(); }