Пример #1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(true);

            UpdateCheck check = new UpdateCheck();

            Application.Run(check);

            if (check.checkSwitch == false)
            {
                //Login login = new Login();
                MainInterface main = new MainInterface();
                Application.Run(main);

                //Application.Run(login);

                //if (login.switches == true)
                //{
                //}
            }
            else
            {
                Application.Exit();
            }
        }
Пример #2
0
        public Satellite(GameObject body, MainInterface mainScript)
        {
            this.body       = body;
            this.mainScript = mainScript;

            unhandledMessages = new Queue <CommMessage>();
        }
        public void UpdateNotifications()
        {
            string        path;
            MainInterface mainInterface = new MainInterface();
            Process       p             = new Process();

            p.StartInfo.FileName               = "cmd.exe";
            p.StartInfo.UseShellExecute        = false;
            p.StartInfo.RedirectStandardInput  = true;
            p.StartInfo.RedirectStandardOutput = true;
            p.StartInfo.RedirectStandardError  = true;
            p.StartInfo.CreateNoWindow         = true;
            p.StartInfo.WorkingDirectory       = "../../" + "Properties\\Get_Notifications\\dist\\";
            p.Start();
            p.StandardInput.WriteLine("Get_Notifications.exe");
            p.StandardInput.WriteLine("exit");

            path = "../../" + "Properties\\Get_Notifications\\dist\\";

            int count = 0;

            while (count < 500000000)
            {
                count += 5;
                count -= 4;
                count *= 3;
                count /= 3;
            }

            Assert.IsTrue(File.Exists(path + "Campus_Notification.txt"));
            Assert.IsTrue(File.Exists(path + "Lecture_Notification.txt"));
            Assert.IsTrue(File.Exists(path + "Student_Notification.txt"));
            Assert.IsTrue(File.Exists(path + "Teacher_Notification.txt"));
        }
Пример #4
0
 /// <summary>
 /// Constructeur <see cref="Winner"/> class.
 /// </summary>
 /// <param name="mI">Accès à la fenetre principale</param>
 /// <param name="winnerGame">Joueur gagnant</param>
 /// <param name="IDDB">Id de la partie</param>
 public Winner(MainInterface mI, Player winnerGame, int IDDB)
 {
     mW          = new ModelWinner(mI, IDDB);
     DataContext = mW;
     InitializeComponent();
     playerWin.Text = winnerGame.Name;
 }
Пример #5
0
 /// <summary>
 /// Constructeur <see cref="GameManagerModel"/> class.
 /// </summary>
 /// <param name="game">Modele du jeu</param>
 /// <param name="mI">Acces à la fenetre principale</param>
 public GameManagerModel(Diaballik.Game game, MainInterface mI)
 {
     this.mI       = mI;
     this.game     = game;
     actionPlayer1 = new DiaballikGame.PlayerAction.ActionPlayer(game.P1);
     actionPlayer2 = new DiaballikGame.PlayerAction.ActionPlayer(game.P2);
 }
Пример #6
0
 /// <summary>
 /// Constructeur <see cref="ReplayModel" /> class.
 /// </summary>
 /// <param name="mI">Accès à la fenetre principale</param>
 /// <param name="replayM">Modele du replay</param>
 public ReplayModel(MainInterface mI, Diaballik.Replay.ReplayManager replayM)
 {
     this.mI      = mI;
     this.replayM = replayM;
     AccessStop   = Visibility.Collapsed;
     AccessStart  = Visibility.Visible;
 }
Пример #7
0
    public HelpBar(string assetPath)
    {
        background = (Texture2D) Resources.Load(assetPath + "BAR_top_help");

        barHeight = background.height;
        container = ScaledRect.Rect(0, 0, ScaledRect.FullScreenRect.width, barHeight);
        textRect = ScaledRect.Rect(0, 0, ScaledRect.FullScreenRect.width, barHeight);

        textStyle = new GUIStyle();

        HELP_centerMarker = (Texture2D) Resources.Load(assetPath + "HELP_centerMarker");
        HELP_chooseItem = (Texture2D) Resources.Load(assetPath + "HELP_chooseItem");
        HELP_delete = (Texture2D) Resources.Load(assetPath + "HELP_delete");
        HELP_drag = (Texture2D) Resources.Load(assetPath + "HELP_drag");
        //HELP_lock = (Texture2D) Resources.Load(assetPath + "HELP_lock");
        HELP_switchToFreeze = (Texture2D) Resources.Load(assetPath + "HELP_switchToFreeze");

        mi = Camera.mainCamera.GetComponent<MainInterface>();

        jman = Camera.mainCamera.GetComponent<JeffARManager>();
        jman.Locked += () => {Locked = true;};
        jman.Lost += () => {Locked = false;};

        mi.AmountFurniture += (furnCount) => {this.furnCount = furnCount;};

        visible = UserOptions.GetPersistantHelpState();
    }
Пример #8
0
        public Editorcontact_telephone(MainInterface mi)
        {
            InitializeComponent();
            this._mainInterface = mi;

            this.contact.provider      = new SearchProvidercontact();
            this.contact.mainInterface = mi;
        }
        public Editorgroup_type(MainInterface mi)
        {
            InitializeComponent();
            this._mainInterface = mi;

            this.group_type2.provider      = new SearchProvidergroup_type();
            this.group_type2.mainInterface = mi;
        }
Пример #10
0
        public Editormenu(MainInterface mi)
        {
            InitializeComponent();
            this._mainInterface = mi;

            this.menu2.provider      = new SearchProvidermenu();
            this.menu2.mainInterface = mi;
        }
Пример #11
0
        public Editordevice_history_action(MainInterface mi)
        {
            InitializeComponent();
            this._mainInterface = mi;

            this.device.provider      = new SearchProviderdevice();
            this.device.mainInterface = mi;
        }
Пример #12
0
        public Editordevice_type(MainInterface mi)
        {
            InitializeComponent();
            this._mainInterface = mi;

            this.unit.provider      = new SearchProviderunit();
            this.unit.mainInterface = mi;
        }
        public EditorCollection(MainInterface mi)
        {
            InitializeComponent();
            this._mainInterface = mi;

            this.listTracks.provider      = new SearchProviderTrack();
            this.listTracks.mainInterface = mi;
        }
Пример #14
0
 public override void Unload()
 {
     if (!Main.dedServ)
     {
         MainUI = null;
         //ItemConfig.Instance.Save();
         //ItemConfig.Instance = null;
     }
 }
        //
        //Starts the selected campaign.
        private void BtnLaunchSelected_Click(object sender, RoutedEventArgs e)
        {
            CampaignDataService.SelectedCampaign.LastAccessed = DateTime.Now;
            MainInterface startSelectedCampaign = new MainInterface();

            startSelectedCampaign.Visibility = Visibility.Visible;
            startSelectedCampaign.IsEnabled  = true;
            this.Close();
        }
Пример #16
0
        public Editordevice_address(MainInterface mi)
        {
            InitializeComponent();
            this._mainInterface = mi;

            this.device.provider                   = new SearchProviderdevice();
            this.device.mainInterface              = mi;
            this.device_address_type.provider      = new SearchProviderdevice_address_type();
            this.device_address_type.mainInterface = mi;
        }
Пример #17
0
        public Editorcontact_history(MainInterface mi)
        {
            InitializeComponent();
            this._mainInterface = mi;

            this.contact.provider            = new SearchProvidercontact();
            this.contact.mainInterface       = mi;
            this.history_event.provider      = new SearchProviderhistory_event();
            this.history_event.mainInterface = mi;
        }
Пример #18
0
        public Editoraction_level(MainInterface mi)
        {
            InitializeComponent();
            this._mainInterface = mi;

            this.action_type.provider      = new SearchProvideraction_type();
            this.action_type.mainInterface = mi;
            this.device.provider           = new SearchProviderdevice();
            this.device.mainInterface      = mi;
        }
        public Editorrss_configuration(MainInterface mi)
        {
            InitializeComponent();
            this._mainInterface = mi;

            this.device.provider             = new SearchProviderdevice();
            this.device.mainInterface        = mi;
            this.update_period.provider      = new SearchProviderupdate_period();
            this.update_period.mainInterface = mi;
        }
Пример #20
0
        public Editorgroup_member(MainInterface mi)
        {
            InitializeComponent();
            this._mainInterface = mi;

            this.contact.provider         = new SearchProvidercontact();
            this.contact.mainInterface    = mi;
            this.group_type.provider      = new SearchProvidergroup_type();
            this.group_type.mainInterface = mi;
        }
        public Editorapplication_log(MainInterface mi)
        {
            InitializeComponent();
            this._mainInterface = mi;

            this.application.provider       = new SearchProviderapplication();
            this.application.mainInterface  = mi;
            this.message_type.provider      = new SearchProvidermessage_type();
            this.message_type.mainInterface = mi;
        }
Пример #22
0
 // Use this for initialization
 void Start()
 {
     mi = Camera.mainCamera.GetComponent<MainInterface>();
     buttonStyle = new GUIStyle();
     stringStyle = new GUIStyle();
     buttonStyle.normal.background = null;
     buttonStyle.active.background = null;
     buttonStyle.hover.background = null;
     stringStyle.alignment = TextAnchor.MiddleCenter;
     stringStyle.wordWrap = true;
 }
Пример #23
0
 public override void PostSetupContent()
 {
     if (!Main.dedServ)
     {
         (MainUI = new MainInterface()).Activate();
         if (UIConfig.Instance.DebugLogs)
         {
             Logger.Info(MainUI.ToTreeString());
         }
     }
 }
        public Editorcontact(MainInterface mi)
        {
            InitializeComponent();
            this._mainInterface = mi;

            this.contact_type.provider      = new SearchProvidercontact_type();
            this.contact_type.mainInterface = mi;
            this.supplier.provider          = new SearchProvidersupplier();
            this.supplier.mainInterface     = mi;
            this.user.provider      = new SearchProvideruser();
            this.user.mainInterface = mi;
        }
Пример #25
0
        public virtual void Destroy()
        {
            if (!initialized)
            {
                return;
            }

            GameManager.Instance.DeleteHandler(this);
            MainInterface.Destroy();

            initialized = false;
        }
Пример #26
0
        public Editoralarm(MainInterface mi)
        {
            InitializeComponent();
            this._mainInterface = mi;

            this.alarm_type.provider      = new SearchProvideralarm_type();
            this.alarm_type.mainInterface = mi;
            this.device.provider          = new SearchProviderdevice();
            this.device.mainInterface     = mi;
            this.group_type.provider      = new SearchProvidergroup_type();
            this.group_type.mainInterface = mi;
        }
Пример #27
0
 void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else if (Instance != this)
     {
         Destroy(gameObject);
     }
     checker = PeriodicRefresh(5f);
     StartCoroutine(checker);
 }
Пример #28
0
 private void btnLogin_Click(object sender, EventArgs e)
 {
     if (txtUsername.Text == "admin" && txtPassword.Text == "12345")
     {
         MainInterface main = new MainInterface();
         main.Show();
         this.Hide();
     }
     else
     {
         MessageBox.Show("Sorry wrong credentials or no account found!");
     }
 }
Пример #29
0
        /// <summary>
        /// Constructeur <see cref="Replay"/> class.
        /// </summary>
        /// <param name="mI">Accès à la fenetre principale.</param>
        /// <param name="replayM">Modele du replay</param>
        /// <param name="replayType">Type de replay</param>
        public Replay(MainInterface mI, ReplayManager replayM, ReplayModel.TYPE_REPLAY replayType = ReplayModel.TYPE_REPLAY.REPLAY_FROM_FINISHED_GAME)
        {
            InitializeComponent();
            DataContext        = new ReplayModel(mI, replayM);
            player1.Text       = replayM.P1.Name;
            player1.Foreground = new SolidColorBrush(Color.FromArgb(replayM.P1.Color.A, replayM.P1.Color.R, replayM.P1.Color.G, replayM.P1.Color.B));
            player2.Text       = replayM.P2.Name;
            player2.Foreground = new SolidColorBrush(Color.FromArgb(replayM.P2.Color.A, replayM.P2.Color.R, replayM.P2.Color.G, replayM.P2.Color.B));

            if (replayType == ReplayModel.TYPE_REPLAY.REPLAY_FROM_FINISHED_GAME)
            {
                this.resumeGameButton.Visibility = Visibility.Hidden;
            }
        }
Пример #30
0
        public override void OnNewGame(Game game)
        {
            Log.Verbose.Write(ErrorSystemType.Application, "Client viewer: New game");

            var music = MainInterface.Audio?.GetMusicPlayer();

            if (music != null)
            {
                music.PlayTrack((int)Audio.Audio.TypeMidi.Track0);
            }

            MainInterface.SetGame(game);
            MainInterface.SetPlayer(client.PlayerIndex);
        }
Пример #31
0
        public InterfaceWindow()
        {
            InitializeComponent();

            this._mainInterface  = new MainInterface();
            this.content.Content = this._mainInterface;

            this.addEditorButton("action_level", new SearchProvideraction_level(), new Editoraction_level(this._mainInterface));
            this.addEditorButton("action_type", new SearchProvideraction_type(), new Editoraction_type(this._mainInterface));
            this.addEditorButton("alarm", new SearchProvideralarm(), new Editoralarm(this._mainInterface));
            this.addEditorButton("alarm_type", new SearchProvideralarm_type(), new Editoralarm_type(this._mainInterface));
            this.addEditorButton("application", new SearchProviderapplication(), new Editorapplication(this._mainInterface));
            this.addEditorButton("application_log", new SearchProviderapplication_log(), new Editorapplication_log(this._mainInterface));
            this.addEditorButton("backup_log", new SearchProviderbackup_log(), new Editorbackup_log(this._mainInterface));
            this.addEditorButton("bbc_rss_barometric_change", new SearchProviderbbc_rss_barometric_change(), new Editorbbc_rss_barometric_change(this._mainInterface));
            this.addEditorButton("bbc_rss_general", new SearchProviderbbc_rss_general(), new Editorbbc_rss_general(this._mainInterface));
            this.addEditorButton("bbc_rss_visibility", new SearchProviderbbc_rss_visibility(), new Editorbbc_rss_visibility(this._mainInterface));
            this.addEditorButton("contact", new SearchProvidercontact(), new Editorcontact(this._mainInterface));
            this.addEditorButton("contact_email", new SearchProvidercontact_email(), new Editorcontact_email(this._mainInterface));
            this.addEditorButton("contact_history", new SearchProvidercontact_history(), new Editorcontact_history(this._mainInterface));
            this.addEditorButton("contact_telephone", new SearchProvidercontact_telephone(), new Editorcontact_telephone(this._mainInterface));
            this.addEditorButton("contact_type", new SearchProvidercontact_type(), new Editorcontact_type(this._mainInterface));
            this.addEditorButton("database_config", new SearchProviderdatabase_config(), new Editordatabase_config(this._mainInterface));
            this.addEditorButton("device", new SearchProviderdevice(), new Editordevice(this._mainInterface));
            this.addEditorButton("device_address", new SearchProviderdevice_address(), new Editordevice_address(this._mainInterface));
            this.addEditorButton("device_address_type", new SearchProviderdevice_address_type(), new Editordevice_address_type(this._mainInterface));
            this.addEditorButton("device_history", new SearchProviderdevice_history(), new Editordevice_history(this._mainInterface));
            this.addEditorButton("device_history_action", new SearchProviderdevice_history_action(), new Editordevice_history_action(this._mainInterface));
            this.addEditorButton("device_type", new SearchProviderdevice_type(), new Editordevice_type(this._mainInterface));
            this.addEditorButton("device_url", new SearchProviderdevice_url(), new Editordevice_url(this._mainInterface));
            this.addEditorButton("device_value", new SearchProviderdevice_value(), new Editordevice_value(this._mainInterface));
            this.addEditorButton("group_action", new SearchProvidergroup_action(), new Editorgroup_action(this._mainInterface));
            this.addEditorButton("group_member", new SearchProvidergroup_member(), new Editorgroup_member(this._mainInterface));
            this.addEditorButton("group_type", new SearchProvidergroup_type(), new Editorgroup_type(this._mainInterface));
            this.addEditorButton("history_event", new SearchProviderhistory_event(), new Editorhistory_event(this._mainInterface));
            this.addEditorButton("menu", new SearchProvidermenu(), new Editormenu(this._mainInterface));
            this.addEditorButton("message_type", new SearchProvidermessage_type(), new Editormessage_type(this._mainInterface));
            this.addEditorButton("rss_configuration", new SearchProviderrss_configuration(), new Editorrss_configuration(this._mainInterface));
            this.addEditorButton("supplier", new SearchProvidersupplier(), new Editorsupplier(this._mainInterface));
            this.addEditorButton("unit", new SearchProviderunit(), new Editorunit(this._mainInterface));
            this.addEditorButton("update_period", new SearchProviderupdate_period(), new Editorupdate_period(this._mainInterface));
            this.addEditorButton("user", new SearchProvideruser(), new Editoruser(this._mainInterface));


            var button = new Button();

            button.Content = "[New Window]";
            button.Click  += (sender, e) => (new InterfaceWindow()).Show();
            this.toolbar.Items.Add(button);
        }
Пример #32
0
        public EditorTrack(MainInterface mi)
        {
            InitializeComponent();
            this._mainInterface = mi;

            this.selectorFormat.provider      = new SearchProviderFormat();
            this.selectorFormat.mainInterface = mi;

            this.listMoods.provider      = new SearchProviderMood();
            this.listMoods.mainInterface = mi;

            this.listGenres.provider      = new SearchProviderGenre();
            this.listGenres.mainInterface = mi;
        }
Пример #33
0
 new void Start()
 {
     mi = Camera.mainCamera.GetComponent<MainInterface>();
     base.Start ();
 }