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)); }
/// <summary> /// class constructor /// </summary> /// <param name="workSpaceViewModel"></param> /// <param name="initialPath"></param> public DocumentViewModel(IWorkSpaceViewModel workSpaceViewModel, string initialPath) : this(workSpaceViewModel) { _initialPath = initialPath; ContentId = initialPath; }
/// <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(); }
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; }
/// <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; }
/// <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; }
/// <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; }
/// <summary> /// class constructor /// </summary> /// <param name="workSpaceViewModel"></param> public DocumentViewModel(IWorkSpaceViewModel workSpaceViewModel) : this() { _workSpaceViewModel = workSpaceViewModel; }
/// <summary> /// Standard Constructor /// </summary> public AppViewModel(AppLifeCycleViewModel lifecycle) : this() { _AppLifeCycle = lifecycle; _AD_WorkSpace = new WorkSpaceViewModel(); }
public FileViewModel(IWorkSpaceViewModel workSpaceViewModel) { _workSpaceViewModel = workSpaceViewModel; IsDirty = true; Title = FileName; }
/// <summary> /// Hidden standard constructor /// </summary> protected AppViewModel() { _AD_WorkSpace = new WorkSpaceViewModel(); _AppTheme = new ThemeViewModel(); }
private DocumentViewModel(IWorkSpaceViewModel workSpaceViewModel) : this() { _workSpaceViewModel = workSpaceViewModel; }