예제 #1
0
        public SymFigures Remove()
        {
            SymFigures temp = figureList.Last();

            figureList.Remove(figureList.Last());
            return(temp);
        }
예제 #2
0
파일: Form1.cs 프로젝트: NaStacy/ootpisp
        private void pictureBox1_MouseClick(object sender, MouseEventArgs e)
        {
            if (creator != null)
            {
                if (creator.manyClick)
                {
                    if (e.Button == MouseButtons.Left)
                    {
                        start.X = e.X;
                        start.Y = e.Y;

                        if (!drow)
                        {
                            figure            = creator.Create(thickness, color, colorFill);
                            figure.StartPoint = start;

                            drow = !drow;
                        }
                        else
                        {
                            figure.StartPoint = start;
                        }
                    }
                    else if (e.Button == MouseButtons.Right)
                    {
                        drow = !drow;
                        figList.Add(figure);
                        figStack.CleanStack();
                    }
                }
            }
        }
예제 #3
0
파일: Form1.cs 프로젝트: NaStacy/ootpisp
        private void pictureBox1_MouseDown(object sender, MouseEventArgs e)
        {
            if (creator != null)
            {
                if (!drow && !creator.manyClick)
                {
                    figure = creator.Create(thickness, color, colorFill);
                    if (creator.manyAng)
                    {
                        (figure as Polygon).cornersNum = ang;
                    }

                    drow    = !drow;
                    start.X = e.X;
                    start.Y = e.Y;

                    figure.StartPoint = start;
                }
            }
        }
예제 #4
0
 public void Add(SymFigures sym)
 {
     figureList.Add(sym);
 }
예제 #5
0
 public void Push(SymFigures symFigures)
 {
     reStack.Push(symFigures);
 }