public Win_regex() { InitializeComponent(); var appSettings = ConfigurationManager.AppSettings; player_name = appSettings["PLAYER"]; ContextMenu dg_games_cm = new ContextMenu(); MenuItem win_saveas = new MenuItem(); win_saveas.Header = "Copy result ..."; win_saveas.Click += new RoutedEventHandler(dg_games_cm_Copy_Click); dg_games_cm.Items.Add(win_saveas); dg_games.ContextMenu = dg_games_cm; dg_games.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(dg_games_DClick); dbfil = new dsdbfilter(this); tb_filter.KeyUp += new System.Windows.Input.KeyEventHandler(tb_filter_KeyDown); DSDBITEMS = new ObservableCollection <string>(mw.s_races); //tb_filter.SetBinding(DSDBITEMS); foreach (var bab in hash.Keys.Cast <String>().OrderBy(c => c)) { cb_filter.Items.Add(bab); } cb_filter.SelectedItem = cb_filter.Items[4]; }
public Win_regex() { InitializeComponent(); player_name = Properties.Settings.Default.PLAYER; if (player_name.Contains(";")) { player_name = string.Concat(player_name.Where(c => !char.IsWhiteSpace(c))); if (player_name.EndsWith(";")) { player_name = player_name.Remove(player_name.Length - 1); } player_list = player_name.Split(';').ToList(); } else { player_list.Add(player_name); } ContextMenu dg_games_cm = new ContextMenu(); MenuItem win_saveas = new MenuItem(); win_saveas.Header = "Copy result ..."; win_saveas.Click += new RoutedEventHandler(dg_games_cm_Copy_Click); dg_games_cm.Items.Add(win_saveas); dg_games.ContextMenu = dg_games_cm; dg_games.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(dg_games_DClick); dg_player.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(Dg_player_MouseDoubleClick); dbfil = new dsdbfilter(this, mw); tb_filter.KeyUp += new System.Windows.Input.KeyEventHandler(tb_filter_KeyDown); DSDBITEMS = new ObservableCollection <string>(mw.s_races); //tb_filter.SetBinding(DSDBITEMS); foreach (var bab in hash.Keys.Cast <String>().OrderBy(c => c)) { cb_filter.Items.Add(bab); } cb_filter.SelectedItem = cb_filter.Items[4]; }