private void ChooseList_DropDownClosed(object sender, EventArgs e) { ComboBox mCB = sender as ComboBox; Managable settingItem = SettingManager.Get(SettingTitle.Text); settingItem.Select(mCB.SelectedIndex); }
private void Confirm_Click(object sender, RoutedEventArgs e) { Button btn = e.Source as Button; switch ((string)btn.Tag) { case "AddData": Managable settingItem = SettingManager.Get(SettingTitle.Text); bool added = settingItem.Add(float.Parse(CreateData.Text)); PopUpdate(); break; case "Confirm": string confirmVal = ChooseList.Text; if (origin != confirmVal && SettingTitle.Text != SettingManager.DPIWORDING) { if (SettingTitle.Text == SettingManager.MARGINGWORDING) { arrangement.Remargin(); } arrangement.Arrange(); } SettingDialog.IsOpen = false; break; default: break; } }
private void PopUpdate() { CreateData.Text = ""; Managable settingItem = SettingManager.Get(SettingTitle.Text); ChooseList.ItemsSource = settingItem.Get(); ChooseList.SelectedIndex = settingItem.Current(); }