Ejemplo n.º 1
0
 /// <summary>
 /// Initialize the project controller
 /// </summary>
 /// <param name="xtmfRuntime">A connection back to the XTMF we are apart of</param>
 internal ProjectController(XTMFRuntime xtmfRuntime)
 {
     this.XTMFRuntime = xtmfRuntime;
     this.Configuration = xtmfRuntime.Configuration;
     this.DataView = new DataAccessView<IProject>( this.Configuration.ProjectRepository.Projects );
     // initialize the hooks into added / removed
     ( (ProjectRepository)this.Configuration.ProjectRepository ).ProjectAdded += new Action<IProject>( ProjectController_ProjectAdded );
     ( (ProjectRepository)this.Configuration.ProjectRepository ).ProjectRemoved += new Action<IProject, int>( ProjectController_ProjectRemoved );
 }
Ejemplo n.º 2
0
 internal ModelSystemController(XTMFRuntime xtmfRuntime)
 {
     this.XTMFRuntime   = xtmfRuntime;
     this.Configuration = this.XTMFRuntime.Configuration;
     this.DataView      = new DataAccessView <IModelSystem>(this.Configuration.ModelSystemRepository.ModelSystems);
     // initialize the add / remove modelsystems
     ((ModelSystemRepository)this.Configuration.ModelSystemRepository).ModelSystemAdded   += new Action <IModelSystem>(ModelSystemController_ModelSystemAdded);
     ((ModelSystemRepository)this.Configuration.ModelSystemRepository).ModelSystemRemoved += new Action <IModelSystem, int>(ModelSystemController_ModelSystemRemoved);
 }