示例#1
0
        private static void UIActivate(MainWindow mainAppwindow)
        {
            MainAppwindow = mainAppwindow;
            mainUIModel   = new Models.MainUIModel();
            var ctrlMain = new UI.CtrlMain();

            ctrlMain.DataContext = new Models.MainUIViewModel(mainUIModel);
            mainAppwindow.SetUserName(Authorization.CurentUser.FullName);
            mainAppwindow.SetMainControl(ctrlMain);
            mainAppwindow.Closing += MainAppwindow_Closing;
        }
示例#2
0
 public MainUIViewModel(MainUIModel _model)
 {
     model              = _model;
     model.BusyStarted += new EventHandler((sender, e) =>
     {
         IsBusy = true;
     });
     model.BusyStoped += new EventHandler((sender, e) =>
     {
         IsBusy = false;
     });
     model.BusyMessageSended += new EventHandler <string>((sender, s) =>
     {
         InvokeOnUIThread(() =>
         {
             this.BusyContent = s;
         });
     });
 }