private void OnPlatformPopupClosed(object sender, DevExpress.Xpf.Editors.ClosePopupEventArgs e) { if (e.CloseMode == DevExpress.Xpf.Editors.PopupCloseMode.Normal) { this.Platforms = new List <BfcItem>(0); PlatformTextBox.Text = ""; ObservableCollection <object> SelectedItems = this.PlatformComboBoxEdit.SelectedItems; if (SelectedItems != null && SelectedItems.Count > 0) { String coma = ""; foreach (object obj in SelectedItems) { if (obj is BfcItem) { BfcItem item = (BfcItem)obj; this.Platforms.Add(item); PlatformTextBox.Text += coma + item.id; coma = ";"; } } } if (throwHandlers && FilterChanged != null) { FilterChanged(); } } }
private void PopupClosed(object sender, DevExpress.Xpf.Editors.ClosePopupEventArgs e) { //string selectcodetext = null; if (FunctionCodeComboBox.SelectedItem != null) { string selectcode = FunctionCodeComboBox.SelectedItem.ToString(); FunctionCodeComboBox.Text = selectcode; } else { UserMessageBox.Show("提醒", "请选择功能码!"); } //string[] selectcode = new string[FunctionCodeComboBox.SelectedItems.Count()]; //if (FunctionCodeComboBox.SelectedItems.Count()!=0) //{ // int index = 0; // for (int i = 0; i < FunctionCodeComboBox.SelectedItems.Count(); i++) // { // selectcode[index] = FunctionCodeComboBox.SelectedItems[i].ToString(); // index++; // } // Array.Sort(selectcode); // selectcodetext += selectcode[0]; // for (int j = 1; j < FunctionCodeComboBox.SelectedItems.Count(); j++) // { // selectcodetext += ";" + selectcode[j]; // } // FunctionCodeComboBox.Text = selectcodetext; //} CodeNum.Text = FunctionCodeComboBox.SelectedItems.Count().ToString(); }