Exemple #1
0
 public TaskAddWindow()
 {
     InitializeComponent();
     this.monsterNames     = this.GetMonsterNames().OrderBy(s => s).ToArray();
     this.bossMonsterNames = this.GetBossMonsterNames().OrderBy(s => s).ToArray();
     PopulateViews();
     mainWindow = Application.Current.Windows.OfType <MainWindow>().ElementAt(0);
     if (mainWindow.Tabs.Items[0] is TabItem t)
     {
         if (t.Content is Frame f)
         {
             if (f.Content is SlayerPage p)
             {
                 slayerPage = p;
             }
         }
     }
     BossListView.Items.Refresh();
     ContractCheckBox.Visibility = Visibility.Hidden;
 }
Exemple #2
0
        /// <summary>
        /// initializes application view
        /// </summary>
        private void ApplicationInit()
        {
            TabItem item1, item2, item3;

            item1 = new TabItem();
            item2 = new TabItem();
            item3 = new TabItem();

            Frame f1, f2, f3;

            f1 = new Frame();
            f2 = new Frame();
            f3 = new Frame();

            f1.Background = Brushes.LightGray;
            f2.Background = Brushes.LightGray;
            f3.Background = Brushes.LightGray;

            item1.Header = "Slayer tasks";
            item2.Header = "Gold balances";
            item3.Header = "In-game time";

            this.slayerPage = new SlayerPage();
            f1.Content      = slayerPage;

            this.goldBalancePage = new GoldBalancePage();
            f2.Content           = goldBalancePage;

            this.inGameTimePage = new InGameTimePage();
            f3.Content          = inGameTimePage;

            item1.Content = f1;
            item2.Content = f2;
            item3.Content = f3;

            this.Tabs.Items.Add(item1);
            this.Tabs.Items.Add(item2);
            this.Tabs.Items.Add(item3);
        }
Exemple #3
0
 public SlayerPlotViewModel()
 {
     this.slayerPage = Application.Current.Windows.OfType <MainWindow>().ElementAt(0).GetSlayerPage();
     this.SetUpViewModel();
 }