示例#1
0
        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);
            }
        }
示例#2
0
        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;
        }
示例#3
0
        /// <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;
        }
示例#4
0
        /// <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();
        }