Example #1
0
 private void InitializeDataSourcesAndControls()
 {
     this.groupComboBox.Sorted     = true;
     this.groupComboBox.DataSource = System.Enum.GetValues(typeof(BuiltInParameterGroup));
     this.groupComboBox.Format    += new ListControlConvertEventHandler(this.groupComboBox_Format);
     this.typeComboBox.Sorted      = true;
     this.typeComboBox.DataSource  = System.Enum.GetValues(typeof(ParameterType));
     foreach (Category item in this.m_categories)
     {
         this.categoryCheckedListBox.Items.Add(item);
     }
     this.categoryCheckedListBox.DisplayMember = "Name";
     this.projectParameterRadioButton.Checked  = this.m_parameterInfo.ParameterIsProject;
     this.sharedParameterRadioButton.Checked   = !this.m_parameterInfo.ParameterIsProject;
     this.typeRadioButton.Checked     = this.m_parameterInfo.ParameterForType;
     this.instanceRadioButton.Checked = !this.m_parameterInfo.ParameterForType;
     this.nameTextBox.Text            = this.m_parameterInfo.ParameterName;
     this.groupComboBox.SelectedItem  = this.m_parameterInfo.ParameterGroup;
     this.typeComboBox.SelectedItem   = this.m_parameterInfo.ParameterType;
     if (this.m_parameterInfo.Categories != null)
     {
         foreach (Category value in this.m_parameterInfo.Categories)
         {
             int index = this.categoryCheckedListBox.Items.IndexOf(value);
             this.categoryCheckedListBox.SetItemChecked(index, true);
         }
     }
     ParameterPropertyForm.ComboBoxDropDownWidthFitToContent(this.groupComboBox);
     ParameterPropertyForm.ComboBoxDropDownWidthFitToContent(this.typeComboBox);
 }