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