Exemplo n.º 1
0
 public StateHandlerViewModel(IUpdateProgramViewModel updateProgramViewModel, IHealthCheckViewModel healthCheckViewModel, ILoginViewModel loginViewModel, IOngoingExamViewModel ongoingExamViewModel, IWorkSpaceViewModel workSpaceViewModel, IHandInReceivedViewModel handInReceivedViewModel, IMessenger messenger, IStateViewModel stateViewModel, ISubmitHandInViewModel submitHandInViewModel, IHandInSubmittingViewModel handInSubmittingViewModel)
 {
     this._updateProgramViewModel  = updateProgramViewModel;
     this._healthCheckViewModel    = healthCheckViewModel;
     this._loginViewModel          = loginViewModel;
     this._workSpaceViewModel      = workSpaceViewModel;
     this._ongoingExamViewModel    = ongoingExamViewModel;
     this._handInReceivedViewModel = handInReceivedViewModel;
     this._messenger                 = messenger;
     this._stateViewModel            = stateViewModel;
     this._submitHandInViewModel     = submitHandInViewModel;
     this._handInSubmittingViewModel = handInSubmittingViewModel;
     messenger.Register <OnSuccessfulLogin>((object)this, new Action <OnSuccessfulLogin>(this.OnSuccessfulLogin));
     messenger.Register <OnSuccessfulHealthCheck>((object)this, new Action <OnSuccessfulHealthCheck>(this.OnSuccessfulHealthCheck));
     messenger.Register <OnExamStarted>((object)this, new Action <OnExamStarted>(this.OnExamStarted));
     messenger.Register <OnHandInStatusHandInTypeUpdated>((object)this, new Action <OnHandInStatusHandInTypeUpdated>(this.OnHandInReceivedUpdated));
     messenger.Register <OnUpdateFinished>((object)this, new Action <OnUpdateFinished>(this.OnUpdateFinished));
     this.OnCheckForUpdates((OnCheckForUpdates)null);
     messenger.Register <OnCheckForUpdates>((object)this, new Action <OnCheckForUpdates>(this.OnCheckForUpdates));
     messenger.Register <OnSubmitBlankHandIn>((object)this, new Action <OnSubmitBlankHandIn>(this.OnSubmitBlankHandIn));
     messenger.Register <OnSubmitHandIn>((object)this, new Action <OnSubmitHandIn>(this.OnSubmitHandIn));
     messenger.Register <OnInitiateSubmitHandIn>((object)this, new Action <OnInitiateSubmitHandIn>(this.OnInitiateSubmitHandIn));
     messenger.Register <OnEnableHandInReceived>((object)this, new Action <OnEnableHandInReceived>(this.OnEnableHandInReceived));
     messenger.Register <OnAllowHandInReceived>((object)this, new Action <OnAllowHandInReceived>(this.OnAllowHandInReceived));
 }
Exemplo n.º 2
0
 /// <summary>
 /// class constructor
 /// </summary>
 /// <param name="workSpaceViewModel"></param>
 /// <param name="initialPath"></param>
 public DocumentViewModel(IWorkSpaceViewModel workSpaceViewModel,
                          string initialPath)
     : this(workSpaceViewModel)
 {
     _initialPath = initialPath;
     ContentId    = initialPath;
 }
Exemplo n.º 3
0
        /// <summary>
        /// Class constructor
        /// </summary>
        /// <param name="workSpaceViewModel">Is the link to the application's viewmodel
        /// to enable (event based) communication between this viewmodel and the application.</param>
        public ColorPickerViewModel(IWorkSpaceViewModel workSpaceViewModel)
            : base(ToolTitle)
        {
            _workSpaceViewModel = workSpaceViewModel;

            SetupADToolDefaults();
            SetupToolDefaults();
        }
Exemplo n.º 4
0
        public FileViewModel(string filePath, IWorkSpaceViewModel workSpaceViewModel)
            : this(workSpaceViewModel)
        {
            FilePath = filePath;
            Title    = FileName;

            //Set the icon only for open documents (just a test)
            IconSource = ISC.ConvertFromInvariantString(@"pack://application:,,/Demos/Images/document.png") as ImageSource;
        }
Exemplo n.º 5
0
        /// <summary>
        /// Class constructor
        /// </summary>
        /// <param name="workSpaceViewModel">Is the link to the application's viewmodel
        /// to enable (event based) communication between this viewmodel and the application.</param>
        public FileStatsViewModel(IWorkSpaceViewModel workSpaceViewModel)
            : base(ToolTitle)
        {
            _workSpaceViewModel = workSpaceViewModel;

            _workSpaceViewModel.ActiveDocumentChanged += new EventHandler(OnActiveDocumentChanged);
            ContentId = ToolContentId;

            BitmapImage bi = new BitmapImage();

            bi.BeginInit();
            bi.UriSource = new Uri("pack://application:,,/Demos/Images/property-blue.png");
            bi.EndInit();
            IconSource = bi;
        }
Exemplo n.º 6
0
        /// <summary>
        /// class constructor
        /// </summary>
        /// <param name="workSpaceViewModel"></param>
        /// <param name="initialPath"></param>
        public DocumentViewModel(IWorkSpaceViewModel workSpaceViewModel,
                                 string initialPath,
                                 bool isExistingInFileSystem)
            : this(workSpaceViewModel)
        {
            _initialPath = initialPath;

            try
            {
                Title = System.IO.Path.GetFileName(initialPath);
            }
            catch { }

            ContentId = initialPath;
            _IsExistingInFileSystem = isExistingInFileSystem;
        }
Exemplo n.º 7
0
        /// <summary>
        /// class constructor
        /// </summary>
        /// <param name="workSpaceViewModel"></param>
        /// <param name="initialPath"></param>
        /// <param name="isExistingInFileSystem"></param>
        public DocumentViewModel(IWorkSpaceViewModel workSpaceViewModel,
                                 FileSystemInfoModel model,
                                 bool isExistingInFileSystem)
            : this(workSpaceViewModel)
        {
            fileinfo     = model;
            _initialPath = fileinfo.FullName;

            try
            {
                Title = System.IO.Path.GetFileName(fileinfo.FullName);
            }
            catch { }

            ContentId = fileinfo.FullName;
            _IsExistingInFileSystem = isExistingInFileSystem;
        }
Exemplo n.º 8
0
 /// <summary>
 /// class constructor
 /// </summary>
 /// <param name="workSpaceViewModel"></param>
 public DocumentViewModel(IWorkSpaceViewModel workSpaceViewModel)
     : this()
 {
     _workSpaceViewModel = workSpaceViewModel;
 }
Exemplo n.º 9
0
 /// <summary>
 /// Standard Constructor
 /// </summary>
 public AppViewModel(AppLifeCycleViewModel lifecycle)
     : this()
 {
     _AppLifeCycle = lifecycle;
     _AD_WorkSpace = new WorkSpaceViewModel();
 }
Exemplo n.º 10
0
 public FileViewModel(IWorkSpaceViewModel workSpaceViewModel)
 {
     _workSpaceViewModel = workSpaceViewModel;
     IsDirty             = true;
     Title = FileName;
 }
Exemplo n.º 11
0
 /// <summary>
 /// Hidden standard constructor
 /// </summary>
 protected AppViewModel()
 {
     _AD_WorkSpace = new WorkSpaceViewModel();
     _AppTheme     = new ThemeViewModel();
 }
Exemplo n.º 12
0
 private DocumentViewModel(IWorkSpaceViewModel workSpaceViewModel)
     : this()
 {
     _workSpaceViewModel = workSpaceViewModel;
 }