Example #1
0
        public void SetControl(IEnumerable <IComponentData> list)
        {
            RemoveEventHandlers();

            _storageSettingsData = list.OfType <JobSettingsData>().FirstOrDefault();

            if (_storageSettingsData != null)
            {
                enable_choiceComboControl.onOff_CheckBox.Checked    = _storageSettingsData.EnableJobStorage.Value;
                enable_choiceComboControl.choice_Combo.SelectedItem = _storageSettingsData.EnableJobStorage.Key;

                pinLength_choiceComboControl.onOff_CheckBox.Checked    = _storageSettingsData.MinLengthPin.Value;
                pinLength_choiceComboControl.choice_Combo.SelectedItem = ListValues.MinLengthPinRequirement.FirstOrDefault(x => x.Value == _storageSettingsData.MinLengthPin.Key);

                pinRequired_choiceComboControl.onOff_CheckBox.Checked    = _storageSettingsData.JobsPinRequired.Value;
                pinRequired_choiceComboControl.choice_Combo.SelectedItem = _storageSettingsData.JobsPinRequired.Key;

                retainJobs_choiceComboControl.onOff_CheckBox.Checked    = _storageSettingsData.RetainJobs.Value;
                retainJobs_choiceComboControl.choice_Combo.SelectedItem =
                    ListValues.JobRetentionDictionary.FirstOrDefault(x => x.Value == _storageSettingsData.RetainJobs.Key);

                folderName_choiceTextControl.onOff_CheckBox.Checked = _storageSettingsData.DefaultFolderName.Value;
                folderName_choiceTextControl.text_Box.Text          = _storageSettingsData.DefaultFolderName.Key;
            }

            AddEventHandlers();
        }
Example #2
0
        public JobStorageDefaultControl()
        {
            InitializeComponent();
            _storageSettingsData = new JobSettingsData();

            enable_choiceComboControl.choice_Combo.DataSource = ListValues.TrueFalseList.ToArray();
            SetChoiceControlDataSource(pinLength_choiceComboControl, ListValues.MinLengthPinRequirement);
            pinRequired_choiceComboControl.choice_Combo.DataSource = ListValues.TrueFalseList.ToArray();
            SetChoiceControlDataSource(retainJobs_choiceComboControl, ListValues.JobRetentionDictionary);
            folderName_choiceTextControl.text_Box.Text = "Untitled";

            AddEventHandlers();
        }