コード例 #1
0
        private void refreshFields()
        {
            numericUpDownSpotsX.Value = Settings.SpotsX;

            numericUpDownSpotsY.Value = Settings.SpotsY;

            numericUpDownLedsPerSpot.Value = Settings.LedsPerSpot;

            setTrackBarValue(trackBarOffsetX, Settings.OffsetX);

            setTrackBarValue(trackBarOffsetY, Settings.OffsetY);

            checkBoxTransferActive.Checked = Settings.TransferActive;

            checkBoxOverlayActive.Checked = Settings.OverlayActive;

            comboBoxComPort.Text = Settings.ComPort;
            comboBoxComPort.Items.Clear();
            foreach (string s in SerialPort.GetPortNames())
            {
                comboBoxComPort.Items.Add(s);
            }
            if (comboBoxComPort.Text.Equals("") && comboBoxComPort.Items.Count > 0)
            {
                comboBoxComPort.Text = (string)comboBoxComPort.Items[0];
            }

            numericUpDownSaturationTreshold.Value = Settings.SaturationTreshold;

            setTrackBarValue(trackBarSpotWidth, Settings.SpotWidth);

            setTrackBarValue(trackBarSpotHeight, Settings.SpotHeight);

            checkBoxMirrorX.Checked = Settings.MirrorX;

            checkBoxMirrorY.Checked = Settings.MirrorY;

            numericUpDownLedOffset.Value = Settings.OffsetLed;

            setTrackBarValue(trackBarBorderDistanceX, Settings.BorderDistanceX);

            setTrackBarValue(trackBarBorderDistanceY, Settings.BorderDistanceY);

            checkBoxAutostart.Checked = Settings.Autostart;

            checkBoxStartMinimized.Checked = Settings.StartMinimized;

            numericUpDownMinimumRefreshRateMs.Value = Settings.MinimumRefreshRateMs;

            groupBoxLEDs.Text = "LEDs (" + (SpotSet.CountSpots(Settings.SpotsX, Settings.SpotsY) * Settings.LedsPerSpot) + ")";
        }
コード例 #2
0
 private void refreshAll()
 {
     SpotSet.Refresh();
     refreshFields();
     RefreshOverlay();
 }