Example #1
0
 public ProjectPresenter(ProjectView view,ProjectModel model,ILog logger)
 {
     this.view = view;
     this.logger = logger;
     probeLogger = LogManager.GetLogger("Probe");
     view.Disposed += new EventHandler(view_Disposed);
     this.model = model;
     view.CreateNewProject += new EventHandler(view_CreateNewProject);
     view.SaveProjectAs += new EventHandler(view_SaveProjectAs);
     view.SaveProject += new EventHandler(view_SaveProject);
     view.OpenProject += new EventHandler(view_OpenProject);
     view.OpenFileRequest += new EventHandler<NHibernate.Tool.WorkBench.Events.OpenFileRequest>(view_OpenFileRequest);
     view.AddMappingAssembly += new EventHandler(view_AddMappingAssembly);
     view.AddConfig += new EventHandler(view_AddConfig);
     view.AddItem += new EventHandler(view_AddItem);
     view.RemoveItem += new EventHandler(view_RemoveItem);
     view.AddMappingAssembly+=new EventHandler(view_AddMappingAssembly);
     view.ActivateConfiguration += new EventHandler(view_ActivateConfiguration);
     view.UpdateRootName(model);
     view.Showproject(model);
     view.CreateProbe += new EventHandler(view_CreateProbe);
     model.projectFileMoved += new EventHandler<ProjectFileMoved>(model_projectFileMoved);
     EventPublisher.Register((FileNameChanged e) => OnFileNameChanged(e));
 }
Example #2
0
 public void UpdateRootName(ProjectModel model)
 {
     this.model = model;
     if (null == root)
     {
         root = treeProject.Nodes.Add("");
     }
     root.Text = model.FileName;
     root.ImageIndex = root.SelectedImageIndex = 0;
 }
Example #3
0
 public void Showproject(ProjectModel model)
 {
     BuildTreeBasicStructure();
     foreach(MSBuild.BuildItemGroup group in model.GetProject().ItemGroups)
     {
         foreach (var item in group.ToArray())
         {
             InsertItem(item);
         }
     }
 }