Esempio n. 1
0
        private void FillSettings(MonitorShowSettings value)
        {
            if (value == null)
            {
                return;
            }
            switch (value.OutputRegion)
            {
            case MonitorShowSettings.enumOutputRegion.AllView: rdAllView.Checked = true;
                break;

            case MonitorShowSettings.enumOutputRegion.CurrentView: rdCurrentRegion.Checked = true;
                break;

            case MonitorShowSettings.enumOutputRegion.SomeRegion:
            {
                rdSetRegion.Checked     = true;
                comboBox1.SelectedIndex = GetRegionIndex(value.regionName);
            }
            break;
            }
        }
Esempio n. 2
0
        private MonitorShowSettings CollectSettings()
        {
            MonitorShowSettings settings = new MonitorShowSettings();

            settings.IsOrigResolution = rdOrigResolution.Checked;
            settings.IsOutputBinImage = ckIsOutputBin.Checked;
            settings.IsOutputVector   = ckIsOutputVector.Checked;
            settings.IsOutputGrid     = ckIsOutputGrid.Checked;
            if (rdAllView.Checked == true)
            {
                settings.OutputRegion = MonitorShowSettings.enumOutputRegion.AllView;
            }
            else if (rdCurrentRegion.Checked == true)
            {
                settings.OutputRegion = MonitorShowSettings.enumOutputRegion.CurrentView;
            }
            else if (rdSetRegion.Checked == true)
            {
                settings.OutputRegion = MonitorShowSettings.enumOutputRegion.SomeRegion;
                settings.regionName   = GetRegionName(comboBox1.SelectedIndex);
            }
            return(settings);
        }