예제 #1
0
        private void button_Admin_Click()
        {
            IsWindowVisible = false;
            AdminLoginWindow adminWindow = new AdminLoginWindow();

            adminWindow.Show();
        }
        private void AdminOptionsButton_Click(object sender, RoutedEventArgs e)
        {
            AdminLoginWindow adminAccess = _viewmodel.AdminOptions();

            adminAccess.Owner = this;
            adminAccess.ShowDialog();
        }
예제 #3
0
        private void LoadOnlineApps()
        {
            string key = getKey(this.typeId, this.subTypeId, this.pageIndex);

            if (this.appItemOnlineDictionary.ContainsKey(key))
            {
                if (this.appItemOnlineDictionary[key].Count != 0)
                {
                    lock (this.appCollectionLocker)
                    {
                        this.appCollection.Clear();
                        this.appCollection.AddRange(this.appItemOnlineDictionary[key]);
                    }

                    this.FilterApps();

                    return;
                }
            }

            if (this.loadOnlineApps)
            {
                return;
            }

#if DEBUG
            if (TypeItem.NotApproved == this.typeId)
            {
                AdminLoginWindow adminLoginWindow = new AdminLoginWindow();
                if (!adminLoginWindow.ShowDialog().Value)
                {
                    return;
                }
            }
#endif

            this.loadOnlineApps = true;

            BackgroundWorker worker = new BackgroundWorker();
            worker.WorkerSupportsCancellation = true;
            worker.WorkerReportsProgress      = true;
            worker.DoWork             += new DoWorkEventHandler(worker_DoWork);
            worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(worker_RunWorkerCompleted);
            worker.RunWorkerAsync();

            this.loadingAnimationCtrl.Visibility    = System.Windows.Visibility.Visible;
            this.loadGadgetInfoTextBlock.Visibility = System.Windows.Visibility.Hidden;
        }
예제 #4
0
        protected override void OnStartup(StartupEventArgs e)
        {
            var bootstrapper = new BootStrapper();
            var container    = bootstrapper.BootStrap();

            // add custom accent and theme resource dictionaries
            ThemeManager.AddAccent("CustomAccent1", new Uri("pack://application:,,,/UniVoting.Admin;component/CustomAccents/CustomAccent.xaml"));

            // create custom accents
            ThemeManagerHelper.CreateAppStyleBy(Colors.Red);
            ThemeManagerHelper.CreateAppStyleBy(Colors.GreenYellow);
            ThemeManagerHelper.CreateAppStyleBy(Colors.Indigo, true);



            MainWindow = new AdminLoginWindow();
            MainWindow.Show();
            base.OnStartup(e);
        }