Ejemplo n.º 1
0
        public void DragMove(int X, int Y)
        {
            CFigure cFigure = CFigureList.Where(o => o.Perenos).FirstOrDefault();

            if (cFigure != null && CLineList != null)
            {
                cFigure.Position = new Point(X - cFigure.Delta.X, Y - cFigure.Delta.Y);
                PologenieLine.PerenosLine(cFigure);
            }
        }
Ejemplo n.º 2
0
        private static void firstFigure()
        {
            CFigure cFigure = CCanvas.CFigureList.Where(o => o is Circle).FirstOrDefault();

            if (cFigure != null)
            {
                cFigure.Position = new Point(329, 10);
                cFigure.SerediniStoronMethPoints();

                cfigureList.Add(cFigure);
                PologenieLine.PerenosLine(cFigure);
            }
        }
Ejemplo n.º 3
0
        private static void figurePosleNeRhombus(CFigure cfigure, Line line)
        {
            newCFigure          = CCanvas.CFigureList.Where(o => o.Id == line.IdFigureKonec).FirstOrDefault();
            newCFigure.Position = new Point(cfigure.SerediniStoron[2].X - newCFigure.Width / 2,
                                            cfigure.Position.Y + cfigure.Height + 20);
            newCFigure.Perenos = true;
            newCFigure.SerediniStoronMethPoints();

            maxMinX();

            PologenieLine.PerenosLine(newCFigure);
            cnewfigureList.Add(newCFigure);
        }
Ejemplo n.º 4
0
        private void btnClick_AddText(object sender, EventArgs e)
        {
            CFigure cFigure = CCanvas.CFigureList.Where(o => o.ColorFigure == Color.Blue).FirstOrDefault();

            if (cFigure != null)
            {
                cFigure.ColorFigure = Color.Black;
                cFigure.TextFigure  = textBox1.Text;
                textBox1.Text       = "";
                ReDrow();

                PologenieLine.PerenosLine(cFigure);
                ReDrow();

                skritT();
            }
        }