private static void ifFourDotkoncaLine(CFigure cFigure, LineNY lineNY, CFigure figureNachalaLine) { if (lineNY.SposobOtrisovki == true) { PositionLineFourDot(figureNachalaLine, lineNY, cFigure); } }
private static void ifThreeDotNachLine(CFigure cFigure, LineNY lineNY, CFigure figure) { if (lineNY.SposobOtrisovki == false) { positionLineThreeDot(cFigure, lineNY, figure); } }
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"); }
private static void ifFourDotNachLine(CFigure cFigure, LineNY lineNY, CFigure figure) { if (lineNY.SposobOtrisovki == true) { PositionLineFourDot(cFigure, lineNY, figure); } }
private static void ifTwoDotNachLine(CFigure cFigure, LineNY lineNY) { if (lineNY.SposobOtrisovki == null) { PerenosNachalaLineNeRhombus(lineNY, cFigure); } }
private static void ifTwoDotkoncaLine(CFigure cFigure, LineNY lineNY) { if (lineNY.SposobOtrisovki == null) { perenosKoncaLineNeRhombus(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 positionLineThreeDot(CFigure cFigure, LineNY lineNY, CFigure figure) { lineNY.PositionLineNachalo = cFigure.SoedineniePoint(cFigure.SoedineniePoint("top").X <= figure.SoedineniePoint("top").X ? "right" : "left"); lineNY.LineThreePoints(); }
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; } }
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); } }
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 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(); }