public CalculationOptionsPanelEnhance() { InitializeComponent(); if (bosslist == null) { bosslist = new BossList(); } comboBoxBoss.Items.AddRange(bosslist.GetBetterBossNamesAsArray()); comboBoxCalculationToGraph.Items.AddRange(Graph.GetCalculationNames()); }
public BossPicker() { isLoading = true; try { InitializeComponent(); //TheScroll.SetIsMouseWheelScrollingEnabled(true); // Create our local Boss List if (bosslist == null) { bosslist = new BossList(); } // Populate the Boss List ComboBox if (CB_BossList.Items.Count < 1) { CB_BossList.Items.Add("Custom"); } if (CB_BossList.Items.Count < 2) { foreach (string s in bosslist.GetBetterBossNamesAsArray()) { CB_BossList.Items.Add(s); } } // Set the default Filter Type if (CB_BL_FilterType.SelectedIndex == -1) { CB_BL_FilterType.SelectedIndex = 0; } // Set the Default filter to All and Populate the list based upon the Filter Type // E.g.- If the type is Content, the Filter List will be { "All", "T7", "T7.5",... } // E.g.- If the type is Version, the Filter List will be { "All", "10 Man", "25 man", "25 Man Heroic",... } if (CB_BL_Filter.Items.Count < 1) { CB_BL_Filter.Items.Add("All"); } if (CB_BL_Filter.SelectedItem == null) { CB_BL_Filter.SelectedIndex = 0; } bosslist.GenCalledList(BossList.FilterType.Content, CB_BL_Filter.SelectedItem as String); if (CB_BL_Filter.Items.Count < 2) { foreach (string s in bosslist.GetFilterListAsArray((BossList.FilterType)(CB_BL_FilterType.SelectedIndex))) { CB_BL_Filter.Items.Add(s); } } if (CB_BossList.Items.Count > 0) { CB_BossList.Items.Clear(); } CB_BossList.Items.Add("Custom"); foreach (string s in bosslist.GetBetterBossNamesAsArray()) { CB_BossList.Items.Add(s); } } catch (Exception ex) { new Base.ErrorBox() { Title = "Error in creating the BossTab Pane", Function = "BossPicker()", TheException = ex, }.Show(); } isLoading = false; }