public RulerViewModel(Screen screen, Screen drawOn, RulerSide side) : base(false) { Side = side; Screen = screen; DrawOn = drawOn; this.SubscribeNotifier(); }
public RulerViewModel(Screen screen, Screen drawOn, RulerSide side) { this.Subscribe(); using (this.Suspend()) { Side = side; Screen = screen; DrawOn = drawOn; } }
public RulerViewModel(Screen screen, Screen drawOn, RulerSide side) { Side = side; switch (side) { case RulerSide.Top: Vertical = false; Horizontal = true; Revert = false; break; case RulerSide.Bottom: Vertical = false; Horizontal = true; Revert = true; break; case RulerSide.Left: Vertical = true; Horizontal = false; Revert = false; break; case RulerSide.Right: Vertical = true; Horizontal = false; Revert = true; break; default: throw new ArgumentOutOfRangeException(nameof(side), side, null); } Screen = screen; DrawOn = drawOn; Background = GetBackground(ReferenceEquals(DrawOn, Screen) ? Colors.DarkGreen : Colors.DarkBlue); BackgroundOut = GetBackground(Colors.Black); Initialize(); }