예제 #1
0
 private static void ifFourDotkoncaLine(CFigure cFigure, LineNY lineNY, CFigure figureNachalaLine)
 {
     if (lineNY.SposobOtrisovki == true)
     {
         PositionLineFourDot(figureNachalaLine, lineNY, cFigure);
     }
 }
예제 #2
0
 private static void ifThreeDotNachLine(CFigure cFigure, LineNY lineNY, CFigure figure)
 {
     if (lineNY.SposobOtrisovki == false)
     {
         positionLineThreeDot(cFigure, lineNY, figure);
     }
 }
예제 #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");
 }
예제 #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");
 }
예제 #5
0
 private static void ifFourDotNachLine(CFigure cFigure, LineNY lineNY, CFigure figure)
 {
     if (lineNY.SposobOtrisovki == true)
     {
         PositionLineFourDot(cFigure, lineNY, figure);
     }
 }
예제 #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");
 }
예제 #7
0
 private static void ifTwoDotNachLine(CFigure cFigure, LineNY lineNY)
 {
     if (lineNY.SposobOtrisovki == null)
     {
         PerenosNachalaLineNeRhombus(lineNY, cFigure);
     }
 }
예제 #8
0
 private static void ifFourDotNachLine(CFigure cFigure, LineNY lineNY, CFigure figure)
 {
     if (lineNY.SposobOtrisovki == true)
     {
         PositionLineFourDot(cFigure, lineNY, figure);
     }
 }
예제 #9
0
 private static void ifFourDotkoncaLine(CFigure cFigure, LineNY lineNY, CFigure figureNachalaLine)
 {
     if (lineNY.SposobOtrisovki == true)
     {
         PositionLineFourDot(figureNachalaLine, lineNY, cFigure);
     }
 }
예제 #10
0
 private static void ifTwoDotkoncaLine(CFigure cFigure, LineNY lineNY)
 {
     if (lineNY.SposobOtrisovki == null)
     {
         perenosKoncaLineNeRhombus(lineNY, cFigure);
     }
 }
예제 #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);
     }
 }
예제 #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);
     }
 }
예제 #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();
 }
예제 #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;
            }
        }
예제 #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);
     }
 }
예제 #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);
     }
 }
예제 #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);
     }
 }
예제 #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();
        }
예제 #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");
 }
예제 #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();
        }
예제 #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;
            }
        }
예제 #22
0
 private static void ifThreeDotNachLine(CFigure cFigure, LineNY lineNY, CFigure figure)
 {
     if (lineNY.SposobOtrisovki == false)
     {
         positionLineThreeDot(cFigure, lineNY, figure);
     }
 }
예제 #23
0
 private static void ifTwoDotkoncaLine(CFigure cFigure, LineNY lineNY)
 {
     if (lineNY.SposobOtrisovki == null)
     {
         perenosKoncaLineNeRhombus(lineNY, cFigure);
     }
 }
예제 #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();
 }
예제 #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);
     }
 }
예제 #26
0
 private static void ifTwoDotNachLine(CFigure cFigure, LineNY lineNY)
 {
     if (lineNY.SposobOtrisovki == null)
     {
         PerenosNachalaLineNeRhombus(lineNY, cFigure);
     }
 }