public void NavigateTo(Type screen) { IScreen newScreen = CreateInstance(screen); ActivateScreen?.Invoke(this, new ManageScreenRequest { Screen = newScreen }); if (activeItem != null) { History.Enqueue(activeItem); } activeItem = newScreen; }
public void GoBack() { DeactivateScreen?.Invoke(this, new ManageScreenRequest { Close = true, Screen = activeItem }); IScreen newScreen = History.Dequeue(); ActivateScreen?.Invoke(this, new ManageScreenRequest { Screen = newScreen }); activeItem = newScreen; }
public void Load(Type screen) { DeactivateScreen?.Invoke(this, new ManageScreenRequest { Close = true, Screen = activeItem }); IScreen newScreen = CreateInstance(screen); ActivateScreen?.Invoke(this, new ManageScreenRequest { Screen = newScreen }); activeItem = newScreen; History.Clear(); }