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