public Game(StartupScreen startScreen, GameScreen gameScreen) { this.startScreen = startScreen; startScreen.GameStarted += OnStartupScreenGameStarted; this.gameScreen = gameScreen; gameScreen.Hide(); }
public void TestIfSettingsModelIsUsedBySettingsInSimulation() { //arrange Simulation test_Simulation; StartupScreen test_startupscreen; string test_path; //act test_startupscreen = new StartupScreen(); test_startupscreen.Settings = new SettingsModel { AmountOfMaids = 3, ElevatorDuration = 3, ElevatorCapicity = 3, HTEPerSeconds = 3, StairsDuration = 3, CinemaDuration = 3, RestaurantCapicity = 3, RestaurantDuration = 3, EatingDuration = 3, FitnessCapicity = 3, }; test_path = Path.GetFullPath(Directory.GetCurrentDirectory() + @"..\..\..\..\HotelSimulationTheLock\Assets\Libraries\Hotel_reparatie.layout"); test_startupscreen.layout = test_startupscreen.ReadLayoutJson(test_path); test_Simulation = new Simulation(test_startupscreen, test_startupscreen.layout, test_startupscreen.Settings); test_Simulation.Settings = test_startupscreen.Settings; //assert Assert.AreEqual(3, test_Simulation.Settings.EatingDuration); }
/// <summary> /// Initialize is called by Bootstrapper. /// </summary> public static void Initialize() { _startupScreen = new StartupScreen(); _startupScreen.Show(); var updater = new Updater(ServiceLocator.Current.GetInstance <Configuration>()); if (updater.IsPublishedUpdate()) { updater.Update(); } var databaseService = ServiceLocator.Current.GetInstance <DatabaseService>(); using (var connection = databaseService.Connect()) { connection.Initialize(); connection.Migration(); } var abemaApiClient = ServiceLocator.Current.GetInstance <AbemaApiClient>(); abemaApiClient.Initialize(); var timetableService = ServiceLocator.Current.GetInstance <TimetableService>(); timetableService.Initialize(); }
public void InitStartupScreens() { this.RadioChooserScreen = new StartupScreen(); this.WanSettingsScreen = new StartupScreen(); this.AccountSettingsScreen = new StartupScreen(); this._startupScreens.Add(this.RadioChooserScreen); this._startupScreens.Add(this.WanSettingsScreen); this._startupScreens.Add(this.AccountSettingsScreen); this.RadioChooserScreen.IsVisible = true; }
private void ShowScreen(StartupScreen screen) { if (screen == null) { return; } foreach (StartupScreen startupScreen in this._startupScreens) { startupScreen.IsVisible = (startupScreen == screen); } }
protected override void Initialize() { // TODO: Add your initialization logic here _startupScreen = new StartupScreen(this); _screenComponent = new ScreenGameComponent(this); _screenComponent.Register(_startupScreen); Components.Add(_screenComponent); base.Initialize(); }
public void TestIfJsonFileIsEmptyOrNot() { //arrange StartupScreen test_startupscreen; //act test_startupscreen = new StartupScreen(); //assert Assert.IsNotNull(test_startupscreen.ReadLayoutJson(Path.GetFullPath(Directory.GetCurrentDirectory() + @"..\..\..\..\HotelSimulationTheLock\Assets\Libraries\Hotel_reparatie.layout"))); }
public void TestIfCallElevatorIsWorkingOnGuestRequest() { //arrange Simulation test_Simulation; StartupScreen test_startupscreen; string test_path; Hotel HotelTest; Guest g; ElevatorCart elevator; IArea Areatest; //act test_startupscreen = new StartupScreen(); test_startupscreen.Settings = new SettingsModel { AmountOfMaids = 3, ElevatorDuration = 3, ElevatorCapicity = 3, HTEPerSeconds = 3, StairsDuration = 3, CinemaDuration = 3, RestaurantCapicity = 3, RestaurantDuration = 3, EatingDuration = 3, FitnessCapicity = 3, }; test_path = Path.GetFullPath(Directory.GetCurrentDirectory() + @"..\..\..\..\HotelSimulationTheLock\Assets\Libraries\Hotel_reparatie.layout"); test_startupscreen.layout = test_startupscreen.ReadLayoutJson(test_path); test_Simulation = new Simulation(test_startupscreen, test_startupscreen.layout, test_startupscreen.Settings); test_Simulation.Settings = test_startupscreen.Settings; HotelTest = new Hotel(test_startupscreen.layout, test_startupscreen.Settings, new JsonHotelBuilder()); g = new Guest(null, "SUPERMAN BOB", 155, new System.Drawing.Point(5, 5), 10); elevator = new ElevatorCart(new System.Drawing.Point(0, 1), HotelTest, 5); Areatest = new Room(); g.FinalDes = Areatest; HotelTest.CallElevator(g); elevator.RequestElevator(g, 5); Areatest.Position = new System.Drawing.Point(5, 5); elevator.RequestList.Add(g); //assert Assert.AreNotEqual(0, elevator.RequestList.Count); }
public void TestIfLabelIsNotNullOnStartUp() { //arrange StartupScreen test_startupscreen; //act test_startupscreen = new StartupScreen(); //assert Assert.IsNotNull(test_startupscreen.maid_LB.Text); }
public void TestIfThePathRouteIsNotNull() { //arrange StartupScreen test_startupscreen; //act test_startupscreen = new StartupScreen(); //assert Assert.IsNotNull(test_startupscreen._path); }
public void TestIfPathIsNotFound() { //arrange StartupScreen test_startupscreen; string test_path; //act test_startupscreen = new StartupScreen(); test_path = Path.GetFullPath(Directory.GetCurrentDirectory() + @"..\..\..\HotelSimulationTheLock\Assets\Libraries\Hotel_reparatie.layout"); test_startupscreen.layout = test_startupscreen.ReadLayoutJson(test_path); //assert Assert.IsNull(test_startupscreen.layout); }
/// <summary> /// PostInitialize is called by Bootstrapper. /// </summary> public static void PostInitialize() { var processes = Process.GetProcessesByName(Path.GetFileNameWithoutExtension(NormaConstants.IpsilonFileName)); if (processes.Length == 0) { if (File.Exists(NormaConstants.IpsilonExecutableFile)) { Process.Start(NormaConstants.IpsilonExecutableFile); } } _startupScreen.Hide(); _startupScreen.Close(); _startupScreen = null; }
public void TestIfCurrentValueOfMoveableMethodIsFilledWithData() { //arrange Simulation test_Simulation; StartupScreen test_startupscreen; string test_path; Hotel HotelTest; Guest g; List <string> ListTest; //act test_startupscreen = new StartupScreen(); test_startupscreen.Settings = new SettingsModel { AmountOfMaids = 3, ElevatorDuration = 3, ElevatorCapicity = 3, HTEPerSeconds = 3, StairsDuration = 3, CinemaDuration = 3, RestaurantCapicity = 3, RestaurantDuration = 3, EatingDuration = 3, FitnessCapicity = 3, }; test_path = Path.GetFullPath(Directory.GetCurrentDirectory() + @"..\..\..\..\HotelSimulationTheLock\Assets\Libraries\Hotel_reparatie.layout"); test_startupscreen.layout = test_startupscreen.ReadLayoutJson(test_path); test_Simulation = new Simulation(test_startupscreen, test_startupscreen.layout, test_startupscreen.Settings); test_Simulation.Settings = test_startupscreen.Settings; ListTest = new List <string>(); HotelTest = new Hotel(test_startupscreen.layout, test_startupscreen.Settings, new JsonHotelBuilder()); g = new Guest(null, "Arthas died as Lich King", 155, new System.Drawing.Point(5, 5), 10); ListTest = new List <string>(); ListTest = HotelTest.CurrentValue(); //assert Assert.AreEqual(ListTest, HotelTest.CurrentValue()); }
public void TestHotelGetAreaMethodReturnArea() { //arrange Simulation test_Simulation; StartupScreen test_startupscreen; string test_path; Hotel HotelTest; IArea AreaTest; //act test_startupscreen = new StartupScreen(); test_startupscreen.Settings = new SettingsModel { AmountOfMaids = 3, ElevatorDuration = 3, ElevatorCapicity = 3, HTEPerSeconds = 3, StairsDuration = 3, CinemaDuration = 3, RestaurantCapicity = 3, RestaurantDuration = 3, EatingDuration = 3, FitnessCapicity = 3, }; test_path = Path.GetFullPath(Directory.GetCurrentDirectory() + @"..\..\..\..\HotelSimulationTheLock\Assets\Libraries\Hotel_reparatie.layout"); test_startupscreen.layout = test_startupscreen.ReadLayoutJson(test_path); test_Simulation = new Simulation(test_startupscreen, test_startupscreen.layout, test_startupscreen.Settings); test_Simulation.Settings = test_startupscreen.Settings; HotelTest = new Hotel(test_startupscreen.layout, test_startupscreen.Settings, new JsonHotelBuilder()); AreaTest = new Room(); AreaTest.Position = new Point(5, 5); Point locationTest = new Point(5, 5); HotelTest.HotelAreas.Add(AreaTest); //assert Assert.AreNotEqual(AreaTest, HotelTest.GetArea(AreaTest.Position)); }
private void applet_DeviceArrival(object sender, LcdDeviceTypeEventArgs e) { device_ = applet_.OpenDeviceByType(e.DeviceType); device_.SoftButtonsChanged += new EventHandler <LcdSoftButtonsEventArgs>(buttonPressed); settings_.setDevice(device_); device_.SetAsForegroundApplet = settings_.alwaysOnTop_; Screen startupScreen = new StartupScreen(device_, device_.DeviceType, null, this, 0); lcdScreenList_.Add(startupScreen); device_.CurrentPage = startupScreen; device_.DoUpdateAndDraw(); if (mbApiInterface_.Player_GetPlayState() == PlayState.Playing) { openScreens(); } }
/// <summary> /// This event loads any files specified in command line to the sequence viewer. /// </summary> /// <param name="sender">SequeceAssembly instance.</param> /// <param name="e">Routed event args.</param> private void OnSequenceAssemblyLoaded(object sender, RoutedEventArgs e) { string[] filenames = Application.Current.Properties["FilesToLoad"] as string[]; if (filenames != null && this.controller != null) { this.controller.LoadFiles(new List <string>(filenames)); } else { StartupScreen startupScreen = new StartupScreen { Owner = this }; startupScreen.ShowDialog(); if (startupScreen.SelectedFilePath != null) { this.controller.LoadFiles(new List <string> { startupScreen.SelectedFilePath }); } else if (startupScreen.ShowOpenFileDialog) { this.applicationHelpText.Visibility = System.Windows.Visibility.Collapsed; this.controller.ShowOpenFileDialog(); } else { assembler.sequenceViewExpander.IsExpanded = true; assembler.consensusViewExpander.IsExpanded = false; // TODO: //assembler.blastResultsExpander.IsExpanded = false; this.overlayrect.Visibility = System.Windows.Visibility.Hidden; this.applicationHelpText.Visibility = System.Windows.Visibility.Collapsed; assembler.InvalidateMeasure(); } } }
public static void Main() { FConsole.Title = "CLIENT APP"; GlobalExceptionHandler.Setup(); Jit.PreJit(); StartupScreen.Draw(); while (true) { DrawUI(); //HomeScreen.Draw(); var input = FConsole.ReadLine(); if (input.StartsWith('/')) { var command = input.Split(' ')[0]; switch (command) { case "/s": ServerCommandHandler.Process(input); break; case "/c": ChannelCommandHandler.Process(input); break; case "/dm": ServerCommandHandler.Process("/s 0"); break; } } else { Core.MyUser.SendMessage(input); } } }
private void MainForm_Loaded(object sender, RoutedEventArgs e) { StartupScreen startup = new StartupScreen(this); startup.Show(); }