Ejemplo n.º 1
0
 private void Window_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.F3)
     {
         txtSearch.Visibility = (txtSearch.Visibility == Visibility.Visible ? Visibility.Collapsed : Visibility.Visible);
         if (txtSearch.Visibility == System.Windows.Visibility.Visible)
         {
             txtSearch.Focus();
         }
     }
     if (e.Key == Key.F5)
     {
         if (PoeSorter.SelectedTab != null && PoeSorter.SelectedTab.Items != null)
         {
             PoeSorter.SelectedTab.Items.ForEach(c =>
             {
                 if (PoeSorter.ItemCanvas.Children.Contains(c.Image))
                 {
                     PoeSorter.ItemCanvas.Children.Remove(c.Image);
                 }
             });
             PoeSorter.SelectedTab.Items = null;
             PoeSorter.SetSelectedTab(PoeSorter.SelectedTab); // trigger download
         }
     }
 }
Ejemplo n.º 2
0
 private void ddlSortMode_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     PoeSorter.SelectSortingAlgoritm((SortingAlgorithm)ddlSortMode.SelectedItem);
     if (PoeSorter.SelectedSortingAlgorithm != null)
     {
         ddlSortOption.ItemsSource  = PoeSorter.SelectedSortingAlgorithm.SortOption.Options;
         ddlSortOption.SelectedItem = PoeSorter.SelectedSortingAlgorithm.SortOption.SelectedOption;
     }
 }
Ejemplo n.º 3
0
 public MainWindow()
 {
     InitializeComponent();
     PoeSorter.Initialize(stashPanel, Dispatcher, ddlSortMode, ddlSortOption);
     txtSearch.Visibility          = System.Windows.Visibility.Hidden;
     StashTabs.DisplayMemberPath   = "Name";
     ddlSortMode.DisplayMemberPath = "Name";
     PopulateLeagueDDL();
     PopulateSpeedSlider();
     PopulateSortingDDL();
     this.Activated += OnFocus;
 }
Ejemplo n.º 4
0
 private void StartSorting_Click(object sender, RoutedEventArgs e)
 {
     PoeSorter.StartSorting();
 }
Ejemplo n.º 5
0
 private void StashTabs_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     PoeSorter.SetSelectedTab((Tab)StashTabs.SelectedItem);
 }
Ejemplo n.º 6
0
 private void ddlLeague_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     PoeSorter.ChangeLeague((League)ddlLeague.SelectedItem);
     StashTabs.ItemsSource  = PoeSorter.SelectedLeague.Tabs;
     StashTabs.SelectedItem = PoeSorter.SelectedLeague.Tabs.FirstOrDefault();
 }
Ejemplo n.º 7
0
 private void OnFocus(object sender, EventArgs e)
 {
     PoeSorter.ReloadAlgorithms();
 }
Ejemplo n.º 8
0
 private void ReloadAlgorithms(object sender, RoutedEventArgs e)
 {
     PoeSorter.ReloadAlgorithms();
 }
Ejemplo n.º 9
0
 private void ddlSortOption_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     PoeSorter.SelectSortOption((string)(ddlSortOption.SelectedItem));
 }