コード例 #1
0
        public ItemsOfInterest(PoeItemsManager items, PoeAccManager accounts)
        {
            if (FirstWindowLoad)
            {
                CleanObseleteFilters(items);
                FirstWindowLoad = false;
            }

            InitializeComponent();
            //AccountsManager = accounts;
            ItemsManager    = items;
            LeagueIndex     = (int)ItemsManager.LeagueIndex;
            InterestedItems = new Helpers.ObservableSortedList <ItemOfInterest>();

            FiltersList = new Helpers.ObservableSortedList <FilterEntry>();

            OwnersList = new SortedSet <string>();
            foreach (var cm in items.OwnerStashNames)
            {
                string owner = cm.Key;
                foreach (string stash in items.OwnerStashNames[owner])
                {
                    FiltersList.Add(new FilterEntry(cm.Key, stash, !UncheckedFiltersEx[LeagueIndex].Contains(cm.Key + '@' + stash)));
                }
            }

            foreach (PoeAccHandler acc in accounts)
            {
                OwnersList.Add(acc.UserDisplayName);
            }
            RefreshItemsOfInterest();
            RefreshVisibilityOfFilteredItems();
            lvItems.ItemsSource   = InterestedItems;
            lvFilters.ItemsSource = FiltersList;
        }
コード例 #2
0
 public SyncWaitWindow(MainWindow mWnd, PoeItemsManager[] iManagers, PoeAccManager accManager)
 {
     InitializeComponent();
     SyncSucceeded = false;
     ChangesFound  = false;
     MWnd          = mWnd;
     ItemsManagers = iManagers;
     AccManager    = accManager;
     DownloadedSerializedStashes = new Dictionary <string, byte[]>();
 }
コード例 #3
0
ファイル: MainWindow.xaml.cs プロジェクト: Vycka/PoeStasher
        public MainWindow()
        {
            InitializeComponent();
            AddLogEntry(Serializer <MainWindow> .ConfigurationDirectory);
            //Helpers.ItemsCategoryTable.Init();
            if (!Directory.Exists(@"Export"))
            {
                Directory.CreateDirectory(@"Export");
            }
            AccManager = new PoeAccManager(this);
            LoadItemManager();

            SetActiveLeague((LeagueId)Properties.Settings.Default.ActiveLeagueId);
            lvAccs.ItemsSource = AccManager.Accounts;

            bwDoAllTasks.DoWork                    += new DoWorkEventHandler(bwDoAllTasks_DoWork);
            bwDoAllTasks.RunWorkerCompleted        += new RunWorkerCompletedEventHandler(bwDoAllTasks_RunWorkerCompleted);
            bwDoAllTasks.WorkerSupportsCancellation = true;
            bwDoAllTasks.RunWorkerAsync();
        }