private void AddArrow() { State = EMainViewModel.AddingLine; addingLineType = ELine.Arrow; focusedObject = null; Message = "Select first dot."; }
public void ShouldReturnDifferencePositionLine(EColumn column, ELine line, int correctDifferenceValue) { var position = new Position(EColumn.E, ELine.Five); var positionCompare = new Position(column, line); Assert.Equal(position.DifferenceLine(positionCompare), correctDifferenceValue); }
public void ShouldPositionLineNotBeEqual(EColumn column, ELine line) { var position1 = new Position(EColumn.A, ELine.One); var position2 = new Position(column, line); Assert.False(position1.EqualsLine(position2)); }
public void ShouldPositionColumnBeEqual(EColumn column, ELine line) { var position1 = new Position(EColumn.A, ELine.One); var position2 = new Position(column, line); Assert.True(position1.EqualsColumn(position2)); }
/// <summary> /// /// </summary> /// <param name="line"></param> public void SetLineToolboxSelection(ELine line) { //_drawingMode = true; _lineMode = true; _shapeMode = false; _toolboxLineValue = line; Mouse.OverrideCursor = System.Windows.Input.Cursors.Arrow; }
public Line(ELine type, IPoint from, IPoint to) { From = from; To = to; Type = type; StoreFromId = from.AttachedID; StoreToId = to.AttachedID; }
public void ELine_TwoPointConstructor(double x1, double y1, double x2, double y2, double m, double b) { // Arrange double[] expected = { m, b }; ELine testLine = new ELine(new GPoint(x1, y1), new GPoint(x2, y2)); // Act double[] actual = testLine.Equation; // Assert CollectionAssert.AreEqual(expected, actual, new DoubleComparer()); }
private static bool TryParseStringToELine(string value, out ELine line) { int lineChoosed; line = ELine.One; if (!int.TryParse(value, out lineChoosed)) { return(false); } if (!Enum.GetValues(typeof(ELine)).Cast <ELine>().Any(x => (int)x == lineChoosed)) { return(false); } line = (ELine)lineChoosed; return(true); }
public bool FindLine(ref ELine line) { bool reSuccess = false; try { reSuccess = FindLine(); line = Base.MeasuredLine; } catch (EException exc) { StackFrame[] stackFrames = new StackTrace(true).GetFrames(); clsLogFile.LogTryCatch(stackFrames, exc.Message, true, true); } catch (Exception ex) { StackFrame[] stackFrames = new StackTrace(true).GetFrames(); clsLogFile.LogTryCatch(stackFrames, ex.Message, true, true); } return(reSuccess); }
public bool FindLine(ref float centerX, ref float centerY, ref float angle) { bool reSuccess = false; try { ELine line = new ELine(); reSuccess = FindLine(ref line); centerX = line.CenterX; centerY = line.CenterY; angle = line.Angle; } catch (EException exc) { StackFrame[] stackFrames = new StackTrace(true).GetFrames(); clsLogFile.LogTryCatch(stackFrames, exc.Message, true, true); } catch (Exception ex) { StackFrame[] stackFrames = new StackTrace(true).GetFrames(); clsLogFile.LogTryCatch(stackFrames, ex.Message, true, true); } return(reSuccess); }
/// <summary> /// /// </summary> /// <param name="FromId"></param> /// <param name="ToId"></param> /// <param name="Type"></param> public UMLLine(Guid From, Guid To, ELine Type) { this.Type = Type; this.From = From; this.To = To; }
public UMLLine(Guid From, ELine Type) { this.Type = Type; this.From = From; }
public Position(EColumn column, ELine line) { Column = column; Line = line; }