Esempio n. 1
0
        public void Execute()
        {
            _model = new ImportModel(_vbe, _config, _vbe.ActiveVBProject.Name);
            _model.ValidProjectAdded     += new EventHandler(ProjectsUpdated);
            _model.CurrentProjectChanged += new EventHandler(SetDefaultProject);

            _view = GetView;
            _view.PathSelecting         += new Events.ImportEventHandler(view_PathSelecting);
            _view.ImportRequestedRaised += new Events.ImportEventHandler(ImportRequestedRaised);
            _view.ProjectName            = _vbe.ActiveVBProject.Name;

            _model.LoadProjects();
            _view.SelectedProject = _model.SetDefaultProject(_vbe.ActiveVBProject.Name);
            _view.ShowView();

            // due to using the ImportView getter, we need to dispose the view object to unsubscribe all events
            _view.CloseForm();
            _view = null;
        }