/// <summary> /// Attach aggregates /// </summary> private void LoadAggregates() { LocalizedComboBox cbx = cmbAggregate; DataView dv = AppData.Instance.SupportedAggregatesDataTable.DefaultView; cbx.DataSource = dv; cbx.DisplayMember = ColumnNames.NAME; cbx.ValueMember = ColumnNames.ID; cbx.SelectedIndex = -1; cbx.SkipTranslation = false; }
/// <summary> /// Loads the Variable Type combo box /// </summary> private void LoadVarTypes() { LocalizedComboBox cmb = cmbVarType; if (cmb.DataSource == null) { cmb.Items.Clear(); cmb.DataSource = AppData.Instance.DataTypesDataTable.DefaultView; cmb.DisplayMember = ColumnNames.NAME; cmb.ValueMember = ColumnNames.DATATYPEID; cmb.SkipTranslation = false; cmb.SelectedIndex = -1; } //Localization.LocalizeComboBoxItems(cmb,false); }
/// <summary> /// Handles SelectedIndexChanged event of Dialog Type combo /// </summary> /// <param name="sender">Object that fired the event.</param> /// <param name="e">.NET supplied event args.</param> private void cmbDialogType_SelectedIndexChanged(object sender, EventArgs e) { LocalizedComboBox cmb = cmbDialogType; multichoiceList = string.Empty; txtLength.Enabled = (cmb.SelectedIndex < 1); lblLength.Enabled = (cmb.SelectedIndex < 1); if (cmb.DataSource != null && cmbDialogType.SelectedIndex > 0) { CheckForInputSufficiency(); DataRow row = ((DataRowView)cmb.SelectedItem).Row; if (string.Compare(row[ColumnNames.EXPRESSION].ToString(), "<StringList>") == 0) { multichoiceList = GetSelectionList(); } } }