예제 #1
0
        private void onUpdate()
        {
            if (this.Visible == false)
            {
                return;
            }

            this.BeginInvoke(new Action(delegate()
            {
                var hardwareManager = HardwareManager.getInstance();

                for (int i = 0; i < hardwareManager.getSensorCount(); i++)
                {
                    var sensor = hardwareManager.getSensor(i);
                    if (sensor == null)
                    {
                        break;
                    }

                    mSensorLabelList[i].Text = sensor.getString();
                }

                for (int i = 0; i < hardwareManager.getFanCount(); i++)
                {
                    var fan = hardwareManager.getFan(i);
                    if (fan == null)
                    {
                        break;
                    }

                    mFanLabelList[i].Text = fan.getString();
                }

                for (int i = 0; i < hardwareManager.getControlCount(); i++)
                {
                    var control = hardwareManager.getControl(i);
                    if (control == null)
                    {
                        break;
                    }

                    if (mControlTextBoxList[i].Focused == false)
                    {
                        mControlTextBoxList[i].Text = control.Value.ToString();
                    }
                }

                if (mControlForm != null)
                {
                    mControlForm.onUpdateTimer();
                }
            }));
        }
예제 #2
0
        private void onUpdate()
        {
            if (this.Visible == false)
            {
                return;
            }

            this.BeginInvoke(new Action(delegate()
            {
                var hardwareManager = HardwareManager.getInstance();

                for (int i = 0; i < hardwareManager.TempBaseList.Count; i++)
                {
                    var device             = hardwareManager.TempBaseList[i];
                    mTempLabelList[i].Text = device.getString();
                }

                for (int i = 0; i < hardwareManager.FanBaseList.Count; i++)
                {
                    var device            = hardwareManager.FanBaseList[i];
                    mFanLabelList[i].Text = device.getString();
                }

                for (int i = 0; i < hardwareManager.ControlBaseList.Count; i++)
                {
                    var device = hardwareManager.ControlBaseList[i];
                    if (mControlTextBoxList[i].Focused == false)
                    {
                        mControlTextBoxList[i].Text = device.Value.ToString();
                    }
                }

                if (mControlForm != null)
                {
                    mControlForm.onUpdateTimer();
                }
            }));
        }