public override void Move(EditorDiagram editor, Point point) { Point end = Symbol.ScreenPoint(Symbol.GridPoint(point)); this.markerLine.X2 = end.X; this.markerLine.Y2 = end.Y; }
public void CreateSymbol(EditorDiagram editor, GridPoint point) { CircuitProject project = editor.CircuitProject; DialogText dialog = new DialogText(null); bool? result = editor.Mainframe.ShowDialog(dialog); if (result.HasValue && result.Value && TextNote.IsValidText(dialog.Document)) { project.InTransaction(() => project.TextNoteSet.Create(editor.Project.LogicalCircuit, point, dialog.Document)); } }
public override void Commit(EditorDiagram editor, Point point, bool withWires) { if (editor.SelectionCount > 1) { base.Commit(editor, point, withWires); } else { this.parent.CommitResize(editor, withWires); } }
public override void Move(EditorDiagram editor, Point point) { if (editor.SelectionCount > 1) { base.Move(editor, point); } else { ResizeMarker <TParent> .move[this.x + this.y * 3](this.parent, point); } }
public override void Move(EditorDiagram editor, Point point) { if (editor.SelectionCount > 1) { base.Move(editor, point); } else { this.setPoint(point); this.Refresh(); } }
public override void Commit(EditorDiagram editor, Point point, bool withWires) { this.Move(editor, point); Wire wire = editor.CreateWire(this.Point1, this.Point2); if (wire == null) { wire = editor.FindWireNear(point); if (wire != null) { editor.Select(wire); } } }
public override void Commit(EditorDiagram editor, Point point, bool withWires) { if (editor.SelectionCount > 1) { base.Commit(editor, point, withWires); } else { editor.CommitMove(point, withWires, this); if (this.Parent.Wire.IsDeleted()) { editor.Unselect(this.Parent.Wire); } else { this.Parent.Refresh(); } } }
public WireValidator(EditorDiagram diagram) { this.diagram = diagram; if (WireValidator.thread == null) { Thread attempt = new Thread(new ThreadStart(WireValidator.Run)) { Name = nameof(WireValidator), IsBackground = true, Priority = ThreadPriority.BelowNormal }; if (null == Interlocked.CompareExchange(ref WireValidator.thread, attempt, null)) { WireValidator.updateRequest = new AutoResetEvent(false); WireValidator.thread.Start(); } } WireValidator.wireValidator = this; }
public void CommitResize(EditorDiagram editor, bool withWires) { editor.CommitMove(this); }
public virtual void Commit(EditorDiagram editor, Point point, bool withWires) { editor.CommitMove(point, withWires); }
public virtual void Move(EditorDiagram editor, Point point) { editor.MoveSelection(point); }
public void CreateSymbol(EditorDiagram editor, GridPoint point) { CircuitProject project = editor.CircuitProject; project.InTransaction(() => project.CircuitSymbolSet.Create(this.GetCircuitToDrop(project), editor.Project.LogicalCircuit, point.X, point.Y)); }
public override void Commit(EditorDiagram editor, Point point, bool withWires) { editor.Select(new Rect(this.point0, point)); }
public override void Move(EditorDiagram editor, Point point) { this.PositionGlyph(point); }