static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); UserInterface UI = new UserInterface(); Elevator Elevator = new Elevator(); Syncronize Sync = new Syncronize(ref Elevator, ref UI); Application.Run(UI); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); UserInterface UI = new UserInterface(); Application.Run(UI); Elevator Elevator = new Elevator(UI); while( true ) { Elevator.CurrentState.Move( Elevator ); } }
public Syncronize(ref Elevator Elevator, ref UserInterface UI) { _elevator = Elevator; _ui = UI; _ui.CurrentPosition = Elevator.CurrentFloor; }
/// <summary> /// Konstruktor /// </summary> public Elevator(UserInterface myUI) { this._ui = myUI; InitOrReset(); }