/// <summary> /// Handles the Check Code commands /// </summary> /// <param name="dialog">The check code command dialog to be displayed </param> private void DesignStatement(CheckCodeDesignDialog dialog) { dialog.View = view; DialogResult result = ((Form)dialog).ShowDialog(); if (result == DialogResult.OK) { if (CheckCodeCommandDesigned != null) { CheckCodeCommandDesigned(dialog.Output); } ((Form)dialog).Close(); } }
/// <summary> /// Handles text for the Then menu item /// </summary> /// <param name="dialog">A check code dialog</param> private void DesignStatement(CheckCodeDesignDialog dialog) { dialog.View = view; DialogResult result = ((Form)dialog).ShowDialog(); if (result == DialogResult.OK) { if (CurrentContextMenuType == CommandContextMenuType.Then) { if (txtThen.Lines.Length > 0) { txtThen.AppendText(Environment.NewLine); } txtThen.AppendText(dialog.Output); } else { if (txtElse.Lines.Length > 0) { txtElse.AppendText(Environment.NewLine); } txtElse.AppendText(dialog.Output); } ((Form)dialog).Close(); } }