Esempio n. 1
0
 private static void ifFourDotkoncaLine(CFigure cFigure, LineNY lineNY, CFigure figureNachalaLine)
 {
     if (lineNY.SposobOtrisovki == true)
     {
         PositionLineFourDot(figureNachalaLine, lineNY, cFigure);
     }
 }
Esempio n. 2
0
 private static void ifThreeDotNachLine(CFigure cFigure, LineNY lineNY, CFigure figure)
 {
     if (lineNY.SposobOtrisovki == false)
     {
         positionLineThreeDot(cFigure, lineNY, figure);
     }
 }
Esempio n. 3
0
 private static void figurePraveeRhombus(LineNY lineNY, CFigure cfigure)
 {
     newCFigure.Position = new Point(cfigure.Position.X + cfigure.Width + 40,
                                     cfigure.Position.Y + cfigure.Height + 20);
     cfigure.VihodLineRight     = true;
     lineNY.PositionLineNachalo = cfigure.SoedineniePoint("right");
 }
Esempio n. 4
0
 private static void figureLeveeRhombus(LineNY lineNY, CFigure cfigure)
 {
     newCFigure.Position = new Point(cfigure.Position.X - newCFigure.Width - 40,
             cfigure.Position.Y + cfigure.Height + 20);
     cfigure.VihodLineLeft = true;
     lineNY.PositionLineNachalo = cfigure.SoedineniePoint("left");
 }
Esempio n. 5
0
 private static void ifFourDotNachLine(CFigure cFigure, LineNY lineNY, CFigure figure)
 {
     if (lineNY.SposobOtrisovki == true)
     {
         PositionLineFourDot(cFigure, lineNY, figure);
     }
 }
Esempio n. 6
0
 private static void figureLeveeRhombus(LineNY lineNY, CFigure cfigure)
 {
     newCFigure.Position = new Point(cfigure.Position.X - newCFigure.Width - 40,
                                     cfigure.Position.Y + cfigure.Height + 20);
     cfigure.VihodLineLeft      = true;
     lineNY.PositionLineNachalo = cfigure.SoedineniePoint("left");
 }
Esempio n. 7
0
 private static void ifTwoDotNachLine(CFigure cFigure, LineNY lineNY)
 {
     if (lineNY.SposobOtrisovki == null)
     {
         PerenosNachalaLineNeRhombus(lineNY, cFigure);
     }
 }
Esempio n. 8
0
 private static void ifFourDotNachLine(CFigure cFigure, LineNY lineNY, CFigure figure)
 {
     if (lineNY.SposobOtrisovki == true)
     {
         PositionLineFourDot(cFigure, lineNY, figure);
     }
 }
Esempio n. 9
0
 private static void ifFourDotkoncaLine(CFigure cFigure, LineNY lineNY, CFigure figureNachalaLine)
 {
     if (lineNY.SposobOtrisovki == true)
     {
         PositionLineFourDot(figureNachalaLine, lineNY, cFigure);
     }
 }
Esempio n. 10
0
 private static void ifTwoDotkoncaLine(CFigure cFigure, LineNY lineNY)
 {
     if (lineNY.SposobOtrisovki == null)
     {
         perenosKoncaLineNeRhombus(lineNY, cFigure);
     }
 }
Esempio n. 11
0
 private static void ifThreeDotkoncaLine(CFigure cFigure, LineNY lineNY, CFigure figureNachalaLine)
 {
     if (lineNY.SposobOtrisovki == false)//линия из 3 точек
     {
         lineNY.PositionLineKonec = cFigure.SoedineniePoint("top");
         positionLineThreeDot(figureNachalaLine, lineNY, cFigure);
     }
 }
Esempio n. 12
0
 private static void ifThreeDotkoncaLine(CFigure cFigure, LineNY lineNY, CFigure figureNachalaLine)
 {
     if (lineNY.SposobOtrisovki == false)//линия из 3 точек
     {
         lineNY.PositionLineKonec = cFigure.SoedineniePoint("top");
         positionLineThreeDot(figureNachalaLine, lineNY, cFigure);
     }
 }
Esempio n. 13
0
 private static void positionLineThreeDot(CFigure cFigure, LineNY lineNY, CFigure figure)
 {
     lineNY.PositionLineNachalo =
         cFigure.SoedineniePoint(cFigure.SoedineniePoint("top").X <= figure.SoedineniePoint("top").X
                         ? "right"
                         : "left");
     lineNY.LineThreePoints();
 }
Esempio n. 14
0
        private void ifRadLineYesChecked(CFigure cFigure, MouseEventArgs e)
        {
            if (rad_LineYes.Checked && cFigure is Rhombus)
            {
                LineNY lineny = new LineNY(e.X, e.Y, cFigure.Id);
                lineny.TextLine = "да";
                pCanvas.Add(lineny);

                flag = true;
            }
        }
Esempio n. 15
0
 private static void figurePosleRhombus(LineNY lineNY, CFigure cfigure)
 {
     newCFigure = CCanvas.CFigureList.Where(o => o.Id == lineNY.IdFigureKonec).FirstOrDefault();
     //линия из 3 точек
     if (newCFigure.Perenos == false)
     {
         figurePosleRhombusBezPerenosa(lineNY, cfigure);
         cnewfigureList.Add(newCFigure);
     }
     //линия из 4 точек
     else
     {
         PologenieLine.PositionLineFourDot(cfigure, lineNY, newCFigure);
     }
 }
Esempio n. 16
0
 public static void PositionLineFourDot(CFigure cFigure, LineNY lineNY, CFigure figure)
 {
     if (cFigure.SoedineniePoint("top").X < figure.SoedineniePoint("top").X)
     {
         lineNY.PositionLineNachalo = cFigure.SoedineniePoint("left");
         lineNY.PositionLineKonec = figure.SoedineniePoint("left");
         lineNY.LineFourPoints(Viravnivanie.MinLeft - 35);
     }
     else
     {
         lineNY.PositionLineNachalo = cFigure.SoedineniePoint("right");
         lineNY.PositionLineKonec = figure.SoedineniePoint("right");
         lineNY.LineFourPoints(Viravnivanie.MaxRight + 35);
     }
 }
Esempio n. 17
0
 public static void PositionLineFourDot(CFigure cFigure, LineNY lineNY, CFigure figure)
 {
     if (cFigure.SoedineniePoint("top").X < figure.SoedineniePoint("top").X)
     {
         lineNY.PositionLineNachalo = cFigure.SoedineniePoint("left");
         lineNY.PositionLineKonec   = figure.SoedineniePoint("left");
         lineNY.LineFourPoints(Viravnivanie.MinLeft - 35);
     }
     else
     {
         lineNY.PositionLineNachalo = cFigure.SoedineniePoint("right");
         lineNY.PositionLineKonec   = figure.SoedineniePoint("right");
         lineNY.LineFourPoints(Viravnivanie.MaxRight + 35);
     }
 }
Esempio n. 18
0
        private static void figurePosleRhombusBezPerenosa(LineNY lineNY, CFigure cfigure)
        {
            //329-центр по X
            if (cfigure.SoedineniePoint("top").X >= 329 && cfigure.VihodLineLeft == false ||
                cfigure.SoedineniePoint("top").X <= 329 && cfigure.VihodLineRight == true)
            {
                figureLeveeRhombus(lineNY, cfigure);
            }
            else
            {
                figurePraveeRhombus(lineNY, cfigure);
            }
            lineNY.PositionLineKonec = newCFigure.SoedineniePoint("top");
            lineNY.LineThreePoints();
            lineNY.SposobOtrisovki = false;

            newCFigure.Perenos = true;
            newCFigure.SerediniStoronMethPoints();
        }
Esempio n. 19
0
 private static void figurePraveeRhombus(LineNY lineNY, CFigure cfigure)
 {
     newCFigure.Position = new Point(cfigure.Position.X + cfigure.Width + 40,
             cfigure.Position.Y + cfigure.Height + 20);
     cfigure.VihodLineRight = true;
     lineNY.PositionLineNachalo = cfigure.SoedineniePoint("right");
 }
Esempio n. 20
0
        private static void figurePosleRhombusBezPerenosa(LineNY lineNY, CFigure cfigure)
        {
            //329-центр по X
            if (cfigure.SoedineniePoint("top").X >= 329 && cfigure.VihodLineLeft == false ||
                cfigure.SoedineniePoint("top").X <= 329 && cfigure.VihodLineRight == true)
            {
                figureLeveeRhombus(lineNY, cfigure);
            }
            else
            {
                figurePraveeRhombus(lineNY, cfigure);
            }
            lineNY.PositionLineKonec = newCFigure.SoedineniePoint("top");
            lineNY.LineThreePoints();
            lineNY.SposobOtrisovki = false;

            newCFigure.Perenos = true;
            newCFigure.SerediniStoronMethPoints();
        }
Esempio n. 21
0
        private void ifRadLineYesChecked(CFigure cFigure, MouseEventArgs e)
        {
            if (rad_LineYes.Checked && cFigure is Rhombus)
            {
                LineNY lineny = new LineNY(e.X, e.Y, cFigure.Id);
                lineny.TextLine = "да";
                pCanvas.Add(lineny);

                flag = true;
            }
        }
Esempio n. 22
0
 private static void ifThreeDotNachLine(CFigure cFigure, LineNY lineNY, CFigure figure)
 {
     if (lineNY.SposobOtrisovki == false)
     {
         positionLineThreeDot(cFigure, lineNY, figure);
     }
 }
Esempio n. 23
0
 private static void ifTwoDotkoncaLine(CFigure cFigure, LineNY lineNY)
 {
     if (lineNY.SposobOtrisovki == null)
     {
         perenosKoncaLineNeRhombus(lineNY, cFigure);
     }
 }
Esempio n. 24
0
 private static void positionLineThreeDot(CFigure cFigure, LineNY lineNY, CFigure figure)
 {
     lineNY.PositionLineNachalo =
                     cFigure.SoedineniePoint(cFigure.SoedineniePoint("top").X <= figure.SoedineniePoint("top").X
                         ? "right"
                         : "left");
     lineNY.LineThreePoints();
 }
Esempio n. 25
0
 private static void figurePosleRhombus(LineNY lineNY, CFigure cfigure)
 {
     newCFigure = CCanvas.CFigureList.Where(o => o.Id == lineNY.IdFigureKonec).FirstOrDefault();
     //линия из 3 точек
     if (newCFigure.Perenos == false)
     {
         figurePosleRhombusBezPerenosa(lineNY, cfigure);
         cnewfigureList.Add(newCFigure);
     }
     //линия из 4 точек
     else
     {
         PologenieLine.PositionLineFourDot(cfigure, lineNY, newCFigure);
     }
 }
Esempio n. 26
0
 private static void ifTwoDotNachLine(CFigure cFigure, LineNY lineNY)
 {
     if (lineNY.SposobOtrisovki == null)
     {
         PerenosNachalaLineNeRhombus(lineNY, cFigure);
     }
 }