Exemplo n.º 1
0
        private void UpdateDisplay()
        {
            _serverCombo.SelectedItem = Model.SelectedServerLabel;

            _customUrl.Text         = Model.URL;
            _customUrl.Visible      = Model.CustomUrlSelected;
            _customUrlLabel.Visible = Model.CustomUrlSelected;

            _accountName.Text = Model.AccountName;
            _password.Text    = Model.Password;
            _projectId.Text   = Model.ProjectId;


            _accountName.Visible    = Model.NeedProjectDetails;
            _projectId.Visible      = Model.NeedProjectDetails;
            _password.Visible       = Model.NeedProjectDetails;
            _showCharacters.Visible = Model.NeedProjectDetails;
            _accountLabel.Visible   = Model.NeedProjectDetails;
            _projectIdLabel.Visible = Model.NeedProjectDetails;
            _passwordLabel.Visible  = Model.NeedProjectDetails;

            if (DisplayUpdated != null)
            {
                DisplayUpdated.Invoke(this, null);
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Updates the LED display
 /// </summary>
 /// <param name="s">Module that sent the update command</param>
 /// <param name="ls">Array containing values for each LED in the strip</param>
 public void UpdateLEDDisplay(object s, Led[] ls, LightingMode mode)
 {
     if (updatingDisplay)
     {
         Console.WriteLine("SEVERE: UpdateLEDDisplay was called at the same time as an ongoing one");
         return;
     }
     updatingDisplay = true;
     this.leds       = ls;
     DisplayUpdated?.Invoke(this.leds, mode);
     SendData(mode);
     updatingDisplay = false;
 }
Exemplo n.º 3
0
        private void UpdateDisplay()
        {
            _username.Text = Model.Username;
            _password.Text = Model.Password;
            _checkRememberPassword.Checked = Model.RememberPassword;

            _customUrl.Text    = Model.URL;
            _customUrl.Visible = _checkCustomUrl.Checked = Model.IsCustomUrl;

            _tlpLogIn.Visible    = !Model.IsCustomUrl;
            _buttonLogIn.Enabled = Model.CanLogIn;

            _bandwidth.SelectedItem = Model.Bandwidth;
            _bandwidthLabel.Visible = _bandwidth.Visible = !Model.IsCustomUrl && Model.HasLoggedIn;

            _projectId.Text         = Model.ProjectId;
            _projectIdLabel.Visible = _projectId.Visible = !Model.IsCustomUrl && Model.HasLoggedIn;

            DisplayUpdated?.Invoke(this, null);
        }
Exemplo n.º 4
0
 /// from there was can walk through the list linked list
 /// updating each and every game object image.
 /// when it gets to the end of the list it:
 ///  - Checks if there are more nodes connected to it
 ///  - If so it recursively goes in it and checks to see if it has more connected
 ///  - Once it does not, it destroys that game object and returns
 ///  and the objects do the same until it gets back to the begining
 /// <summary>
 ///
 /// </summary>
 /// <param name="playerHP"></param>
 public void UpdateHPPips(PlayerHealth playerHP)
 {
     pipLinkedList.UpdateNodes(playerHealth);
     DisplayUpdated.Invoke(pipLinkedList.Head);
 }
Exemplo n.º 5
0
 /// <summary>
 /// Updates the LED display
 /// </summary>
 /// <param name="s">Module that sent the update command</param>
 /// <param name="ls">Array containing values for each LED in the strip</param>
 public void UpdateLEDDisplay(object s, Led[] ls, LightingMode mode)
 {
     this.leds = ls;
     DisplayUpdated?.Invoke(this.leds, mode);
     SendData(mode);
 }
Exemplo n.º 6
0
 private void SendLedData(LEDFrame frame)
 {
     lightControllers.ForEach(controller => controller.SendData(frame));
     DisplayUpdated?.Invoke(frame);
 }