Пример #1
0
        public override void onShapeClicked()
        {
            if (Shape.Selected && Controller.DeleteChoosed)
            {
                removeFromModel();
                Controller.DeleteChoosed = false;
                Shape.Selected           = false;
            }
            if (Shape.Selected)
            {
                //AssignmentDialog db = new AssignmentDialog();
                DoDialog doWhileBox = new DoDialog();

                //doWhileBox.setExpression(extractExpression(Statement));
                DialogResult dr = doWhileBox.ShowDialog();
                if (dr == DialogResult.OK)
                {
                    Statement = doWhileBox.LoopExpression;

                    setText(Statement);

                    // Statement = surrondExpression(Statement);
                    //setText(Statement);
                    //Shape.Label = new Crainiate.Diagramming.Label(Statement);
                }
                //MessageBox.Show();
            }
            Shape.Selected = false;
        }
Пример #2
0
        public override void onShapeClicked()
        {
            if (base.Shape.Selected && Controller.DeleteChoosed)
            {
                base.removeFromModel();
                Controller.DeleteChoosed = false;
                base.Shape.Selected      = false;
            }

            if (base.Shape.Selected)
            {
                DoDialog     doWhileBox = new DoDialog();
                DialogResult dr         = doWhileBox.ShowDialog();
                if (dr == DialogResult.OK)
                {
                    base.Statement = doWhileBox.LoopExpression;
                    base.setText(Statement);
                }
            }
            base.Shape.Selected = false;
        }