コード例 #1
0
ファイル: Game.cs プロジェクト: cyecp/DeltaEngine.OpenTK
 public Game(StartupScreen startScreen, GameScreen gameScreen)
 {
     this.startScreen         = startScreen;
     startScreen.GameStarted += OnStartupScreenGameStarted;
     this.gameScreen          = gameScreen;
     gameScreen.Hide();
 }
コード例 #2
0
        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);
        }
コード例 #3
0
        /// <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();
        }
コード例 #4
0
ファイル: Game.cs プロジェクト: whztt07/DeltaEngine
		public Game(StartupScreen startScreen, GameScreen gameScreen)
		{
			this.startScreen = startScreen;
			startScreen.GameStarted += OnStartupScreenGameStarted;
			this.gameScreen = gameScreen;
			gameScreen.Hide();
		}
コード例 #5
0
 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;
 }
コード例 #6
0
 private void ShowScreen(StartupScreen screen)
 {
     if (screen == null)
     {
         return;
     }
     foreach (StartupScreen startupScreen in this._startupScreens)
     {
         startupScreen.IsVisible = (startupScreen == screen);
     }
 }
コード例 #7
0
ファイル: Emulator.cs プロジェクト: lunacys/ATC-8
        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();
        }
コード例 #8
0
        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")));
        }
コード例 #9
0
        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);
        }
コード例 #10
0
        public void TestIfLabelIsNotNullOnStartUp()
        {
            //arrange
            StartupScreen test_startupscreen;

            //act
            test_startupscreen = new StartupScreen();


            //assert
            Assert.IsNotNull(test_startupscreen.maid_LB.Text);
        }
コード例 #11
0
        public void TestIfThePathRouteIsNotNull()
        {
            //arrange
            StartupScreen test_startupscreen;

            //act
            test_startupscreen = new StartupScreen();


            //assert
            Assert.IsNotNull(test_startupscreen._path);
        }
コード例 #12
0
        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);
        }
コード例 #13
0
        /// <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;
        }
コード例 #14
0
        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());
        }
コード例 #15
0
        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));
        }
コード例 #16
0
        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();
            }
        }
コード例 #17
0
ファイル: SequenceAssembly.xaml.cs プロジェクト: slogen/bio
        /// <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();
                }
            }
        }
コード例 #18
0
ファイル: Program.cs プロジェクト: Alumniminium/Chat
        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);
                }
            }
        }
コード例 #19
0
ファイル: MainWindow.xaml.cs プロジェクト: Blathers/PIE
 private void MainForm_Loaded(object sender, RoutedEventArgs e)
 {
     StartupScreen startup = new StartupScreen(this);
     startup.Show();
 }