Пример #1
0
 public void SwitchFocus(GraphicalInterface component)
 {
     FocusedComponent.focused = false;
     FocusedComponent.OnUnfocused();
     FocusedComponent         = component;
     FocusedComponent.focused = true;
     FocusedComponent.OnFocused();
 }
Пример #2
0
 public void Refresh()
 {
     Console.ResetColor();
     Console.Clear();
     foreach (GraphicalInterface component in Components)
     {
         CurrentlyUpdating = component;
         component.Update();
     }
     CurrentlyUpdating = null;
 }
Пример #3
0
 public void RemoveFocus(GraphicalInterface component)
 {
     FocusedComponent = Components [Components.Count - 1];
     FocusedComponent.Focus();
 }
Пример #4
0
 public void RemoveComponent(GraphicalInterface component)
 {
     this.Components.Remove(component);
     //Redraw the screen after the component is removed
     Refresh();
 }
Пример #5
0
 public void AddComponent(GraphicalInterface component)
 {
     this.Components.Add(component);
     //Redraw the screen after the new component is added
     Refresh();
 }
Пример #6
0
 public void RefreshComponent(GraphicalInterface component)
 {
     CurrentlyUpdating = component;
     component.Update();
     CurrentlyUpdating = null;
 }