private void TextListHandler(object sender, RoutedEventArgs e) { e.Handled = true; string[] data = (string[])((Button)sender).Tag; ListEditor window = new ListEditor(data[0], data[1]); window.Owner = this; window.ShowDialog(); }
private void GroupTextListHandler(object sender, RoutedEventArgs e) { e.Handled = true; UserGroup ug = (UserGroup)((Button)sender).Tag; openedUG = ug; ListEditor window = new ListEditor(ug.SettingName + "List", ug.Name); window.ItemRemoved += window_ItemRemoved; window.ItemAdded += window_ItemAdded; window.Owner = this; window.ShowDialog(); }
private void BanListClicked(object sender, RoutedEventArgs e) { e.Handled = true; SortedObservableCollection <string> List2 = new SortedObservableCollection <string>(); foreach (var item in GlobalManager.BanList) { List2.Add(item.Value); } ListEditor window = new ListEditor(List2, "Your ignore list"); window.ItemRemoved += RemoveUserFromBanList; window.ItemAdded += AddUserToBanList; window.Owner = this; window.ShowDialog(); }
private void ServerListEditClicked(object sender, RoutedEventArgs e) { SortedObservableCollection <string> serverList = new SortedObservableCollection <string>(); foreach (string server in this.ServerList) { serverList.Add(server); } ListEditor window = new ListEditor(serverList, "Server list", ListEditor.ListModes.Normal); window.ItemRemoved += RemoveServer; window.ItemAdded += AddServer; window.Owner = this; window.ShowDialog(); e.Handled = true; }