Beispiel #1
0
        public LineChart()
        {
            ViewModel = new LineChartViewModel();

            YAxisLeftOffset = 14;
            AddedToVisualTree.SubscribeForLifetime(OnAddedToVisualTree, this.LifetimeManager);
            KeyInputReceived.SubscribeForLifetime(OnKeyInputReceived, this.LifetimeManager);
        }
Beispiel #2
0
 public TextBox()
 {
     this.textState = new RichTextEditor();
     this.Height    = 1;
     CanFocus       = true;
     this.Focused.SubscribeForLifetime(TextBox_Focused, this.LifetimeManager);
     this.Unfocused.SubscribeForLifetime(TextBox_Unfocused, this.LifetimeManager);
     textState.SubscribeForLifetime(nameof(textState.CurrentValue), TextValueChanged, this.LifetimeManager);
     KeyInputReceived.SubscribeForLifetime(OnKeyInputReceived, this.LifetimeManager);
 }
Beispiel #3
0
 public Scrollbar(Orientation orientation)
 {
     this.orientation = orientation;
     Background       = ConsoleColor.DarkGray;
     KeyInputReceived.SubscribeForLifetime(OnKeyInputReceived, this.LifetimeManager);
 }
Beispiel #4
0
 public Scrollbar(Orientation orientation)
 {
     this.orientation = orientation;
     Background       = ConsoleColor.White;
     KeyInputReceived.SubscribeForLifetime(OnKeyInputReceived, this);
 }
Beispiel #5
0
 internal void HandleKeyInput(ConsoleKeyInfo info)
 {
     KeyInputReceived.Fire(info);
 }