コード例 #1
0
ファイル: INWindow.cs プロジェクト: super860327/firstwpftest
 private void InitService()
 {
     try
     {
         this.Employee.DepartmentTree.SessionService = this.sessionService;
         this.Employee.DepartmentTree.DataService = this.dataService;
         this.AddEventListenerHandler();
         this.inViewModel = new INViewModel();
         this.inViewModel.InitService();
     }
     catch (System.Exception ex)
     {
         this.logger.Error(ex.ToString());
     }
 }
コード例 #2
0
 private void Update()
 {
     this.lblMsg.Text = "正在检查是否有更新...";
     try
     {
         INViewModel inViewModel = new INViewModel();
         inViewModel.InitService();
         inViewModel.GetAppUpdate(this.sessionService.Jid, AppUtil.Instance.AppUpdateVerson());
     }
     catch (System.InvalidOperationException)
     {
         this.lblMsg.Text = "更新发生错误,请重试!";
         this.btnCheckUpdate.Content = "重新检查";
         this.btnCheckUpdate.IsEnabled = true;
     }
 }
コード例 #3
0
 private void OnExitClick(object sender, System.EventArgs e)
 {
     try
     {
         INViewModel inViewModel = new INViewModel();
         inViewModel.InitService();
         inViewModel.LogOff();
         INWindow inWindow = this.dataService.INWindow as INWindow;
         if (inWindow != null)
         {
             inWindow.IsTaskClose = false;
         }
         System.Windows.Application.Current.Shutdown(1004);
     }
     catch (System.Exception ex)
     {
         this.logger.Error(ex.ToString());
     }
 }
コード例 #4
0
 private void InitData()
 {
     this.inViewModel = new INViewModel();
     this.sessionService = ServiceUtil.Instance.SessionService;
 }