Exemple #1
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();
 }
Exemple #2
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);
     }
 }
 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);
     }
 }
 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");
 }
 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");
 }
 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");
 }
Exemple #7
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);
     }
 }
 private static void ifThreeDotkoncaLine(CFigure cFigure, LineNY lineNY, CFigure figureNachalaLine)
 {
     if (lineNY.SposobOtrisovki == false)//линия из 3 точек
     {
         lineNY.PositionLineKonec = cFigure.SoedineniePoint("top");
         positionLineThreeDot(figureNachalaLine, lineNY, cFigure);
     }
 }
        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();
        }
 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");
 }
        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();
        }
 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();
 }