Exemplo n.º 1
0
        /// <summary>
        /// Shows up the Export view to user
        /// </summary>
        public void Execute()
        {
            _model = new ExportModel(_vbe, _vbe.ActiveVBProject.Name);
            _model.PathSelected += new EventHandler(_model_PathSelected);

            _view = ExportView;
            _view.PathSelecting         += new Events.ExportEventHandler(_view_PathSelecting);
            _view.ExportRequestedRaised += new Events.ExportEventHandler(_view_ExportRequestedRaised);
            _view.PathValidating        += new Events.ExportEventHandler(_view_PathValidating);

            _model.GetProjectPath(_config);
            _view.ProjectName = _vbe.ActiveVBProject.Name;
            _view.Items       = _vbe.GetAsComponents();
            _view.ShowView();

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