private void btnClearAnomList_Click(object sender, RoutedEventArgs e) { EVEData.AnomData ad = MainAnomGrid.DataContext as EVEData.AnomData; if (ad != null) { ad.Anoms.Clear(); AnomSigList.Items.Refresh(); AnomSigList.UpdateLayout(); CollectionViewSource.GetDefaultView(AnomSigList.ItemsSource).Refresh(); } }
/// <summary> /// Clear system Anoms button clicked /// </summary> private void btnClearAnomList_Click(object sender, RoutedEventArgs e) { EVEData.AnomData ad = ANOMManager.ActiveSystem; if (ad != null) { ad.Anoms.Clear(); AnomSigList.Items.Refresh(); AnomSigList.UpdateLayout(); CollectionViewSource.GetDefaultView(AnomSigList.ItemsSource).Refresh(); } }
private void btnUpdateAnomList_Click(object sender, RoutedEventArgs e) { string pasteData = Clipboard.GetText(); if (pasteData != null || pasteData != string.Empty) { EVEData.AnomData ad = MainAnomGrid.DataContext as EVEData.AnomData; if (ad != null) { ad.UpdateFromPaste(pasteData); AnomSigList.Items.Refresh(); AnomSigList.UpdateLayout(); CollectionViewSource.GetDefaultView(AnomSigList.ItemsSource).Refresh(); } } }
public AnomData GetSystemAnomData(string sysName) { AnomData ret; if (Systems.Keys.Contains(sysName)) { ret = Systems[sysName]; } else { ret = new AnomData(); ret.SystemName = sysName; Systems.Add(sysName, ret); } return(ret); }
/// <summary> /// Update Anoms clicked /// </summary> private void btnUpdateAnomList_Click(object sender, RoutedEventArgs e) { string pasteData = Clipboard.GetText(); if (!string.IsNullOrEmpty(pasteData)) { EVEData.AnomData ad = ANOMManager.ActiveSystem; if (ad != null) { ad.UpdateFromPaste(pasteData); AnomSigList.Items.Refresh(); AnomSigList.UpdateLayout(); CollectionViewSource.GetDefaultView(AnomSigList.ItemsSource).Refresh(); } } }
private void SelectSystem(string name) { EVEData.MapRegion rd = RegionDropDown.SelectedItem as EVEData.MapRegion; foreach (EVEData.MapSystem es in rd.MapSystems.Values.ToList()) { if (es.Name == name) { SystemDropDownAC.SelectedItem = es; SelectedSystem = es.Name; AddHighlightToSystem(name); break; } } // now setup the anom data EVEData.AnomData system = ANOMManager.GetSystemAnomData(name); MainAnomGrid.DataContext = system; AnomSigList.ItemsSource = system.Anoms.Values; }