Example #1
0
        /*updates connectionIO. If yolu do not wish to update some values, input negatives and they will be ignored
         * for connected, 0 is false, 1 is true*/
        public void Update_IO_Displays(int connected, long connections, long sentTelemetry, long recievedCommands, bool newconnection = false)
        {
            if (newconnection)
            {
                Logging.Add("Client N " + connected.ToString() + " connected");
                Logic.Status.LogChanges = Logging.GetFullLog();
            }
            else
            {
            }

            if (UI_Feedback.InvokeRequired)
            {
                UI_Feedback.Invoke(_iofeedback, connected, connections, sentTelemetry, recievedCommands, false);
            }
            else
            {
                if (connected >= 0)
                {
                    UI_DisplayConnectionStatus.Text = connected == 0 ? "No" : "Yes";
                }
                if (connections > 0)
                {
                    UI_DisplayNetworkConnections.Text = connections.ToString();
                }
                if (sentTelemetry > 0)
                {
                    UI_DisplaySentTelemetry.Text = sentTelemetry.ToString();
                }
                if (recievedCommands > 0)
                {
                    UI_DisplayRecievedComms.Text = recievedCommands.ToString();
                }
            }
        }
Example #2
0
        private void _leaveSomeFeedbackBtn_Click(object sender, EventArgs e)
        {
            UI_Feedback newFeedbackForm = new UI_Feedback();

            newFeedbackForm.Owner = this;
            newFeedbackForm.ShowDialog();
            this.ActiveControl = _rfidTriggerTextBox;
        }
Example #3
0
 /*provides Feedback*/
 public void Update_feedback(string text)
 {
     if (UI_Feedback.InvokeRequired)
     {
         UI_Feedback.Invoke(_updatefeedback, text);
     }
     else
     {
         UI_Feedback.Text = text;
     }
 }
Example #4
0
 public void Update_IP_Config(IPAddress address, ushort port)
 {
     if (UI_Feedback.InvokeRequired)
     {
         UI_Feedback.Invoke(_ipConfig, address, port);
     }
     else
     {
         UI_DisplayPort.Text     = port.ToString();
         UI_DisplayIpAdress.Text = address.ToString();
     }
 }