Exemplo n.º 1
0
 public HallWindow()
     : base(Singleton<ApplicationViewModel>.Instance.HallWindowVM)
 {
     ShowInTaskbar = true;
     try
     {
         hallVM = Singleton<ApplicationViewModel>.Instance.HallWindowVM;
         hallVM.Load(AllWebPages.HallPage);
         hallVM.Initialize();
         InitializeComponent();
         Loaded += EssentialWindow_Loaded;
         Closing += HallWindow_Closing;
     }
     catch (Exception ex)
     {
         Helper.Logger.Error("Constructor of HallWindow", ex);
     }
     Helper.MainWindow = this;
 }
Exemplo n.º 2
0
 public LoginWindow()
     : base(Singleton<ApplicationViewModel>.Instance.HallWindowVM)
 {
     
     ShowInTaskbar = true;
     InitializeComponent();
     MinHeight = ActualHeight;
     if(!Utility.CheckNetwork())
     {
         MessageBox.Show("没有网络连接,请稍后再试。");
         this.Close();
     }
     // Compute the updater.exe path relative to the application main module path
     updaterModulePath = System.IO.Path.Combine(Environment.CurrentDirectory, "updater.exe");
     hallVM = Singleton<ApplicationViewModel>.Instance.HallWindowVM;
     hallVM.BusyMessage = "正在检查可用更新,请稍后。。。";
     BackgroundWorker work = new BackgroundWorker();
     work.DoWork += work_DoWork;
     work.RunWorkerCompleted += work_RunWorkerCompleted;
     work.RunWorkerAsync();
     localVersion = getLocalVersion();
 }