public GameController() { this.view = new CellsCanvas(this); this.view.Show(); this.displayController = NinjectGlobalKernel.GlobalKernel.Get<IDisplayController>(); this.world = NinjectGlobalKernel.GlobalKernel.Get<IWorld>(); }
/// <summary> /// Constructs an instance of MainWindowController with handles to its view and the controllers /// </summary> /// <param name="mainWindow">Handle to the MainWindow which is the view for this controller</param> /// <param name="displayController">Handle to the controller for the displays that are hosted by the MainWindow</param> /// <param name="designController">Handle to the controller for the designs that are viewed by the MainWindow</param> public MainWindowController(IMainWindow mainWindow, IDisplayController displayController, IDesignController designController) { MainWindow = mainWindow; MainWindow.AttachMainWindowController(this); DisplayController = displayController; DesignController = designController; }
public BottomBarModel() { _displayController = ClassLocator.GetInstance <IDisplayController>(); Debug.Assert(_displayController != null, "IDisplayController not found for BottomBarModel"); UserMessage = "Initializing..."; MessageType = MessageTypeEnum.Information; }
/// <summary> /// Constructor /// </summary> public World() { this.displayController = NinjectGlobalKernel.GlobalKernel.Get<IDisplayController>(); this.mapFactory = this.localKernel.Get<IMapFactory>(); this.masterMap = new Map(Settings.Default.WorldWidth, Settings.Default.WorldHeight); this.cells = new List<IInternalCell>(); }
public GameController(IDisplayController displayController, ILoadController loadController) { this.displayController = displayController; this.loadController = loadController; commands = InputCommand.GetAllCommands(); scenes = new Dictionary <string, IScene>(); gameItens = loadController.LoadGameItens("/Scenes/json/game/items.json"); Navigator = new Navigator(this); Player = new Player(this, allItens: gameItens); MovePlayer("0", null, null); }
/// <summary> /// Constructor /// </summary> public CellsCanvas(GameController controller) { InitializeComponent(); this.displayController = NinjectGlobalKernel.GlobalKernel.Get<IDisplayController>(); this.controller = controller; this.canvas = DrawBox.CreateGraphics(); this.canvas.Clear(defaultBackgroundColor); PopulateBrains(); PopulateMaps(); }
// Start is called before the first frame update void Start() { _videoPlayer = GetComponent <VideoPlayer>(); display = DisplayController.ForDisplay(0); _fullScreen.onValueChanged.AddListener(delegate { FullScreen(); }); _forward.onClick.AddListener(ForwardVideo); _backward.onClick.AddListener(BackwardVideo); _play.onValueChanged.AddListener(delegate { PlayPause(); }); _restart.onClick.AddListener(Restart); PlayWebGL(); }
public MenuModel() { _displayController = ClassLocator.GetInstance <IDisplayController>(); Debug.Assert(_displayController != null, "IDisplayController not found for MenuModel"); MenuButtonCommands = new List <IButtonModel>() { new MenuButtonModel("Home", (s, a) => { _displayController.RevertDisplay(); }), new MenuButtonModel("About", (s, a) => { _displayController.ChangeDisplay(typeof(IAboutViewModel), DisplayActionTypes.PushPreviousDisplay, true); }), new MenuButtonModel("Configuraton", (s, a) => { _displayController.ChangeDisplay(typeof(IConfigurationViewModel), DisplayActionTypes.PushPreviousDisplay, true); }), }; }
private void TelemetryTestForm_Load(object sender, EventArgs e) { try { SetLoadingFormState(); _displayController = new DisplayController(this); _displayController.PropertyChanged += _displayController_PropertyChanged; _displayController.ActiveDisplayChanged += _displayController_ActiveDisplayChanged; _displayController.DisplayAdded += _displayController_DisplayAdded; _displayController.DisplayRemoved += _displayController_DisplayRemoved; ClearSession(); SetReadyFormState(); } catch (Exception ex) { ExceptionHandler(ex); } }
public async void Initialize() { ClassLocator.Register <IDisplayController>(() => new DisplayController()); ClassLocator.Register <IBottomBarModel>(() => new BottomBarModel()); _displayController = ClassLocator.GetInstance <IDisplayController>(); _bottomBarModel = ClassLocator.GetInstance <IBottomBarModel>(); Debug.Assert(_displayController != null, "IDisplayController not found for BackEndSimulator"); Debug.Assert(_bottomBarModel != null, "IBottomBarModel not found for BackEndSimulator"); ClassLocator.Register <IMenuModel>(() => new MenuModel()); ClassLocator.Register <IAboutModel>(() => new AboutModel()); ClassLocator.Register <IConfigurationModel>(() => new ConfigurationModel()); Initialized?.Invoke(this, new InitializedEventArgs()); await Task.Run(() => { Thread.Sleep(10000); _bottomBarModel.UpdateUserMessage("10 seconds have passed", MessageTypeEnum.Warning); // _displayController.ChangeDisplay(typeof(IAboutViewModel), true); }); }
public MainViewModel() { PrimaryViewModel = new SplashScreenViewModel { DisposeOfAfterUse = true }; if (this.IsInDesignMode) { _bottomBarModel = new BottomBarModelSimulator(); _displayController = new DisplayControllerSimulator(); } else { _displayController = ClassLocator.GetInstance <IDisplayController>(); Debug.Assert(_displayController != null, nameof(IDisplayController) + " not found for " + GetType().Name); _displayController.ChangeDisplayEvent += DisplayChangeEventHandler; _bottomBarModel = ClassLocator.GetInstance <IBottomBarModel>(); Debug.Assert(_bottomBarModel != null, nameof(IBottomBarModel) + " not found for " + GetType().Name); _bottomBarModel.UpdateEvent += UpdateUserMessageEventHandler; } UserMessage = _bottomBarModel.UserMessage; MessageType = _bottomBarModel.MessageType; }
/// <summary> /// Saves the handle to the controller for this display /// </summary> /// <param name="controller">The handle to the controller to save</param> public void AttachController(IDisplayController controller) { Controller = controller; }
public AboutModel() { _displayController = ClassLocator.GetInstance <IDisplayController>(); Debug.Assert(_displayController != null, "IDisplayController not found for AboutModel"); }