Example #1
0
        public MainForm()
        {
            InitializeComponent();

            //InventoryHelper.ExhaustiveLibrarySearch = true;

            PK.Wrapper.AsyncProgressChanged           += new ProgressChangedEventHandler(m_worker_ProgressChanged);
            PK.Wrapper.SearchComplitedEvent           += new EventHandler <PortingKitWrapper.SearchComplitedEventArgs>(PKWrapper_SearchComplitedEvent);
            PK.Wrapper.LoadSolutionAsyncCompleteEvent += new EventHandler <PortingKitWrapper.LoadSolutionAsyncCompletedEventArgs>(Wrapper_LoadSolutionAsyncCompleteEvent);

            ProgressBar.Minimum = 0;
            ProgressBar.Maximum = 100;
            ProgressBar.Step    = 1;
            ProgressBar.Value   = 0;
            ProgressLabel.Text  = "";

            mProperties                 = new Forms.Properties();
            mFindComponentForm          = new Forms.Tools.FindComponentForm();
            mFindResultsForm            = new Forms.Tools.FindResultsForm();
            mFindResultsForm.EditEvent += new EventHandler <Forms.BaseForms.ObjectEventArgs>(OnEditEvent);
            mFindResultsForm.OpenContainingFolderEvent += new EventHandler <Forms.BaseForms.PathEventArgs>(explorer_OpenContainingFolderEvent);


            mMSBuildLogger           = new Helpers.MSBuildOutputLogger();
            mMSBuildLogger.Verbosity = LoggerVerbosity.Diagnostic;

            mOutputForm = new Forms.Output.OutputForm();
            mOutputForm.AttachLogger(mMSBuildLogger);
            mOutputForm.AttachLogger(mVereficationHelper);
            mErrorListForm = new Forms.Output.ErrorListForm();
            mErrorListForm.AttachLogger(mMSBuildLogger);
            mErrorListForm.AttachLogger(mVereficationHelper);


            mMSBuildLogger.LogStartedEvent  += new EventHandler(Logger_LogStartedEvent);
            mMSBuildLogger.BuildStepEvent   += new EventHandler(MSBuildLogger_BuildStepEvent);
            mMSBuildLogger.LogFinishedEvent += new EventHandler <LogFinishedEventArgs>(Logger_LogFinishedEvent);
            //MSBuildLogger.OpenContainingFolderEvent += new EventHandler<Forms.BaseForms.PathEventArgs>(explorer_OpenContainingFolderEvent);

            mErrorListForm.EditEvent += new EventHandler <Forms.BaseForms.ObjectEventArgs>(OnEditEvent);
            mErrorListForm.OpenContainingFolderEvent += new EventHandler <Forms.BaseForms.PathEventArgs>(explorer_OpenContainingFolderEvent);

            mOutputForm.EditEvent += new EventHandler <Forms.BaseForms.ObjectEventArgs>(OnEditEvent);
            mOutputForm.OpenContainingFolderEvent += new EventHandler <Forms.BaseForms.PathEventArgs>(explorer_OpenContainingFolderEvent);
            mMSBuildHelper.Loggers.Add(mMSBuildLogger);

            mApplicationLoading = new Dialogs.ApplicationLoading();

            mComponentReferencesDiagramForm = new Forms.Tools.ComponentReferencesDiagramForm();
            mComponentReferencesDiagramForm.SelectionChangedEvent     += new EventHandler <Forms.BaseForms.ObjectEventArgs>(OnSelectionChangedEvent);
            mComponentReferencesDiagramForm.ShowPropertiesEvent       += new EventHandler <Forms.BaseForms.ObjectEventArgs>(OnShowPropertiesEvent);
            mComponentReferencesDiagramForm.EditEvent                 += new EventHandler <Forms.BaseForms.ObjectEventArgs>(OnEditEvent);
            mComponentReferencesDiagramForm.OpenContainingFolderEvent += new EventHandler <Forms.BaseForms.PathEventArgs>(explorer_OpenContainingFolderEvent);

            //mInventoryTree = new Forms.InventoryTree(m_inv);
            mSolutionExplorer          = new Forms.Explorers.SolutionExplorer();
            mLibraryCategoriesExplorer = new Forms.Explorers.LibraryCategoriesExplorer();
            mFeaturesExplorer          = new Forms.Explorers.FeaturesExplorer();
            mLibrariesExplorer         = new Forms.Explorers.LibrariesExplorer();
            mProcessorsExplorer        = new Forms.Explorers.ProcessorExplorer();
            mAssembliesExplorer        = new Forms.Explorers.AssembliesExplorer();

            mExplorersList.Add(mSolutionExplorer);
            mExplorersList.Add(mLibraryCategoriesExplorer);
            mExplorersList.Add(mFeaturesExplorer);
            mExplorersList.Add(mLibrariesExplorer);
            mExplorersList.Add(mProcessorsExplorer);
            mExplorersList.Add(mAssembliesExplorer);

            foreach (Forms.BaseForms.BasePKInventoryForm explorer in mExplorersList)
            {
                explorer.GenerateEvent             += new EventHandler <Forms.BaseForms.GenerateEventArgs>(OnGenerateEvent);
                explorer.OpenContainingFolderEvent += new EventHandler <Forms.BaseForms.PathEventArgs>(explorer_OpenContainingFolderEvent);
                explorer.WrapperActionEvent        += new EventHandler <Forms.BaseForms.WrapperActionArgs>(explorer_WrapperActionEvent);
                RegisterEventComponent(explorer);
            }

            mEditorsController = new Helpers.EditorsFormsController(dockPanel1);

            this.mEditorsController.ShowEditorEvent += new EditorsFormsController.ShowEditorEventHandler(mEditorsController_ShowEditorEvent);

            //mLibraryCategoryEditor = new Forms.Editors.LibraryCategoryEditor();
            //mLibraryEditor = new Forms.Editors.LibraryEditor();
            //mFeatureEditor = new Forms.Editors.FeatureEditor();
            //mCodeFileEditor = new Forms.Editors.CodeFileEditor();


            Helper.AssemblyInfoHelper asmhelper = new Helper.AssemblyInfoHelper(Assembly.GetExecutingAssembly());

            this.Text = asmhelper.Title;
            aboutToolStripMenuItem.Text += " " + asmhelper.Title;

            buildToolStripMenuItem.Visible = false;

            BuildTypeCB.Visible             = false;
            BuildToolStripSeparator.Visible = false;
            BuildMediaTypeCB.Visible        = false;

            uVisionProjectGenerationToolStripMenuItem.Visible = false;
        }
Example #2
0
        public MainForm()
        {
            InitializeComponent();

            //InventoryHelper.ExhaustiveLibrarySearch = true;

            PK.Wrapper.AsyncProgressChanged += new ProgressChangedEventHandler(m_worker_ProgressChanged);
            PK.Wrapper.SearchComplitedEvent += new EventHandler<PortingKitWrapper.SearchComplitedEventArgs>(PKWrapper_SearchComplitedEvent);
            PK.Wrapper.LoadSolutionAsyncCompleteEvent += new EventHandler<PortingKitWrapper.LoadSolutionAsyncCompletedEventArgs>(Wrapper_LoadSolutionAsyncCompleteEvent);

            ProgressBar.Minimum = 0;
            ProgressBar.Maximum = 100;
            ProgressBar.Step = 1;
            ProgressBar.Value = 0;
            ProgressLabel.Text = "";

            mProperties = new Forms.Properties();
            mFindComponentForm = new Forms.Tools.FindComponentForm();
            mFindResultsForm = new Forms.Tools.FindResultsForm();
            mFindResultsForm.EditEvent += new EventHandler<Forms.BaseForms.ObjectEventArgs>(OnEditEvent);
            mFindResultsForm.OpenContainingFolderEvent += new EventHandler<Forms.BaseForms.PathEventArgs>(explorer_OpenContainingFolderEvent);


            mMSBuildLogger = new Helpers.MSBuildOutputLogger();
            mMSBuildLogger.Verbosity = LoggerVerbosity.Diagnostic;

            mOutputForm = new Forms.Output.OutputForm();
            mOutputForm.AttachLogger(mMSBuildLogger);
            mOutputForm.AttachLogger(mVereficationHelper);
            mErrorListForm = new Forms.Output.ErrorListForm();
            mErrorListForm.AttachLogger(mMSBuildLogger);
            mErrorListForm.AttachLogger(mVereficationHelper);


            mMSBuildLogger.LogStartedEvent += new EventHandler(Logger_LogStartedEvent);
            mMSBuildLogger.BuildStepEvent += new EventHandler(MSBuildLogger_BuildStepEvent);
            mMSBuildLogger.LogFinishedEvent += new EventHandler<LogFinishedEventArgs>(Logger_LogFinishedEvent);
            //MSBuildLogger.OpenContainingFolderEvent += new EventHandler<Forms.BaseForms.PathEventArgs>(explorer_OpenContainingFolderEvent);

            mErrorListForm.EditEvent += new EventHandler<Forms.BaseForms.ObjectEventArgs>(OnEditEvent);
            mErrorListForm.OpenContainingFolderEvent += new EventHandler<Forms.BaseForms.PathEventArgs>(explorer_OpenContainingFolderEvent);

            mOutputForm.EditEvent += new EventHandler<Forms.BaseForms.ObjectEventArgs>(OnEditEvent);
            mOutputForm.OpenContainingFolderEvent += new EventHandler<Forms.BaseForms.PathEventArgs>(explorer_OpenContainingFolderEvent);
            mMSBuildHelper.Loggers.Add(mMSBuildLogger);

            mApplicationLoading = new Dialogs.ApplicationLoading();

            mComponentReferencesDiagramForm = new Forms.Tools.ComponentReferencesDiagramForm();
            mComponentReferencesDiagramForm.SelectionChangedEvent += new EventHandler<Forms.BaseForms.ObjectEventArgs>(OnSelectionChangedEvent);
            mComponentReferencesDiagramForm.ShowPropertiesEvent += new EventHandler<Forms.BaseForms.ObjectEventArgs>(OnShowPropertiesEvent);
            mComponentReferencesDiagramForm.EditEvent += new EventHandler<Forms.BaseForms.ObjectEventArgs>(OnEditEvent);
            mComponentReferencesDiagramForm.OpenContainingFolderEvent += new EventHandler<Forms.BaseForms.PathEventArgs>(explorer_OpenContainingFolderEvent);

            //mInventoryTree = new Forms.InventoryTree(m_inv);
            mSolutionExplorer = new Forms.Explorers.SolutionExplorer();
            mLibraryCategoriesExplorer = new Forms.Explorers.LibraryCategoriesExplorer();
            mFeaturesExplorer = new Forms.Explorers.FeaturesExplorer();
            mLibrariesExplorer = new Forms.Explorers.LibrariesExplorer();
            mProcessorsExplorer = new Forms.Explorers.ProcessorExplorer();
            mAssembliesExplorer = new Forms.Explorers.AssembliesExplorer();

            mExplorersList.Add(mSolutionExplorer);
            mExplorersList.Add(mLibraryCategoriesExplorer);
            mExplorersList.Add(mFeaturesExplorer);
            mExplorersList.Add(mLibrariesExplorer);
            mExplorersList.Add(mProcessorsExplorer);
            mExplorersList.Add(mAssembliesExplorer);

            foreach (Forms.BaseForms.BasePKInventoryForm explorer in mExplorersList)
            {
                explorer.GenerateEvent += new EventHandler<Forms.BaseForms.GenerateEventArgs>(OnGenerateEvent);
                explorer.OpenContainingFolderEvent += new EventHandler<Forms.BaseForms.PathEventArgs>(explorer_OpenContainingFolderEvent);
                explorer.WrapperActionEvent += new EventHandler<Forms.BaseForms.WrapperActionArgs>(explorer_WrapperActionEvent);
                RegisterEventComponent(explorer);
            }

            mEditorsController = new Helpers.EditorsFormsController(dockPanel1);

            this.mEditorsController.ShowEditorEvent += new EditorsFormsController.ShowEditorEventHandler(mEditorsController_ShowEditorEvent);

            //mLibraryCategoryEditor = new Forms.Editors.LibraryCategoryEditor();
            //mLibraryEditor = new Forms.Editors.LibraryEditor();
            //mFeatureEditor = new Forms.Editors.FeatureEditor();
            //mCodeFileEditor = new Forms.Editors.CodeFileEditor();


            Helper.AssemblyInfoHelper asmhelper = new Helper.AssemblyInfoHelper(Assembly.GetExecutingAssembly());

            this.Text = asmhelper.Title;
            aboutToolStripMenuItem.Text += " " + asmhelper.Title;

            buildToolStripMenuItem.Visible = false;

            BuildTypeCB.Visible = false;
            BuildToolStripSeparator.Visible = false;
            BuildMediaTypeCB.Visible = false;

            uVisionProjectGenerationToolStripMenuItem.Visible = false;

        }