public void Delete_Comment(Schematix.FSM.My_Comment comment) { DialogResult res = MessageBox.Show("Are you sure want to delete comment ?", "Delete Comment?", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (res == DialogResult.Yes) { RemoveFigure(comment); } }
public CommentProperties(Schematix.FSM.My_Comment comment, Schematix.FSM.Constructor_Core core) { InitializeComponent(); this.comment = comment; this.core = core; Point Loc = new Point(comment.rect.Location.X + core.Paper.ClientStartPoint.X, comment.rect.Location.Y + core.Paper.ClientStartPoint.Y); Location = Loc; Schematix.FSM.Constructor_Core.SetColorText(labelColor, comment.color); colorDialog1.Color = comment.color; richTextBoxCommentText.Text = comment.name; BackColor = comment.color; }
/// <summary> /// Создание нового комментария /// </summary> public void CreateNewComment() { if (Lock == true) { MessageBox.Show("You must create figure " + SelectedFigure.name + " before.", "Fatal Error :)", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } graph.UnselectAllFigures(); Schematix.FSM.My_Comment comment = new Schematix.FSM.My_Comment(this); SelectedFigure = comment; graph.AddFigure(comment); Lock = true; }
/// <summary> /// Создание нового комментария при помощи ToolBox /// </summary> /// <param name="rect"></param> public void CreateNewComment_Dragged(Rectangle rect) { rect.Location = form.PointToClient(rect.Location); if (Lock == true) { MessageBox.Show("You must create figure " + SelectedFigure.name + " before.", "Fatal Error :)", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } graph.UnselectAllFigures(); Schematix.FSM.My_Comment comment = new Schematix.FSM.My_Comment(this, rect, true); SelectedFigure = comment; graph.AddFigure(comment); Lock = false; //AddToHistory("New comment Draged"); bitmap.UpdateBitmap(); }