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

            Helper.AssemblyInfoHelper asmhelper = new Helper.AssemblyInfoHelper(Assembly.GetExecutingAssembly());
            this.Text = asmhelper.Title;
            listView1.Items.Clear();
        }
        public SaveChangesDialog()
        { 
            InitializeComponent();

            Helper.AssemblyInfoHelper asmhelper = new Helper.AssemblyInfoHelper(Assembly.GetExecutingAssembly());
            this.Text = asmhelper.Title;
            listView1.Items.Clear();
        }
Example #3
0
        private void AboutDialog_Load(object sender, EventArgs e)
        {
            Helper.AssemblyInfoHelper asmhelper = new Helper.AssemblyInfoHelper(Assembly.GetExecutingAssembly());

            this.Text         = Strings.About + " " + asmhelper.Title;
            TitleLbl.Text     = asmhelper.Title;
            VersionLbl.Text   = Strings.Version + " " + asmhelper.AssemblyVersion;
            CopyrightLbl.Text = asmhelper.Copyright;
            richTextBox1.Clear();

            RegistryKey key2 = Registry.LocalMachine.OpenSubKey(@"Software\Microsoft\.NETMicroFrameworkPortingKit");

            if (key2 != null)
            {
                string[] subkeys = key2.GetSubKeyNames();
                string   path    = string.Empty;
                string   RegPath = string.Empty;

                richTextBox1.Clear();

                foreach (string s in subkeys)
                {
                    RegistryKey key = key2.OpenSubKey(s);

                    RegPath = key.GetValue("InstallRoot").ToString();
                    path    = PK.Wrapper.SpoClientPath;
                    if (path[path.Length - 1] != '\\')
                    {
                        path += "\\";
                    }

                    if (string.Compare(RegPath, path, true) == 0)
                    {
                        richTextBox1.AppendText(Strings.Version + ": " + s + "\r\n");
                    }
                }

                richTextBox1.AppendText(Strings.Location + ": " + PK.Wrapper.SpoClientPath);
            }
        }
Example #4
0
        private void AboutDialog_Load(object sender, EventArgs e)
        {
            Helper.AssemblyInfoHelper asmhelper = new Helper.AssemblyInfoHelper(Assembly.GetExecutingAssembly());

            this.Text = Strings.About + " " + asmhelper.Title;
            TitleLbl.Text = asmhelper.Title;
            VersionLbl.Text = Strings.Version + " " + asmhelper.AssemblyVersion;
            CopyrightLbl.Text = asmhelper.Copyright;
            richTextBox1.Clear();

            RegistryKey key2 = Registry.LocalMachine.OpenSubKey(@"Software\Microsoft\.NETMicroFrameworkPortingKit");
            if (key2 != null)
            {
                string[] subkeys = key2.GetSubKeyNames();
                string path = string.Empty;
                string RegPath = string.Empty;

                richTextBox1.Clear();

                foreach (string s in subkeys)
	            {
                    RegistryKey key = key2.OpenSubKey(s);

                    RegPath = key.GetValue("InstallRoot").ToString();
                    path = PK.Wrapper.SpoClientPath;
                    if (path[path.Length - 1] != '\\') path += "\\";

                    if (string.Compare(RegPath, path, true) == 0)
                    {
                        richTextBox1.AppendText(Strings.Version + ": " + s + "\r\n");
                    }
	            }

                richTextBox1.AppendText(Strings.Location + ": " + PK.Wrapper.SpoClientPath);
            }
        }
        private void ApplicationLoading_Load(object sender, EventArgs e)
        {
            Helper.AssemblyInfoHelper asmhelper = new Helper.AssemblyInfoHelper(Assembly.GetExecutingAssembly());

            TitleLbl.Text = asmhelper.Title;
            VersionLbl.Text = Strings.Version + " " + asmhelper.AssemblyVersion;
            CopyrightLbl.Text = asmhelper.Copyright;
            CopyrightLbl.SetBounds(this.Bounds.Width / 2 - CopyrightLbl.Bounds.Width / 2, CopyrightLbl.Bounds.Y, CopyrightLbl.Bounds.Width, CopyrightLbl.Bounds.Height);


            string path = Environment.GetEnvironmentVariable("SPOCLIENT");
            if (string.IsNullOrEmpty(path) || !Directory.Exists(path) || !Directory.Exists(path + @"\DeviceCode\Targets\"))
            {
                MessageBox.Show(this, "Please set environment variables manually or run PKStudioLauncher.exe", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

                this.DialogResult = System.Windows.Forms.DialogResult.Abort;
                this.Close();
            }

            PK.Wrapper.SpoClientPath = path;

            string srcDirEnvVar = Environment.GetEnvironmentVariable("SRC_DIR");

            if (srcDirEnvVar == null)
            {
                Environment.SetEnvironmentVariable("SRC_DIR", "");
            }

            //if (string.IsNullOrEmpty(portingKitRegistryValue) || !Directory.Exists(portingKitRegistryValue))
            //{
            //    portingKitRegistryValue = Helper.GetPortingKitRegistryValue("", "InstallRoot");    
            //}
            //if (!string.IsNullOrEmpty(portingKitRegistryValue) && Directory.Exists(portingKitRegistryValue))
            //{
            //    path = portingKitRegistryValue;
            //}

            //if (!Directory.Exists(path) || !Directory.Exists(path + @"\DeviceCode\Targets\"))
            //{
            //    using (SetSPOForm of = new SetSPOForm())
            //    {
            //        if (of.ShowDialog(this) != System.Windows.Forms.DialogResult.OK)
            //        {
            //            this.DialogResult = System.Windows.Forms.DialogResult.Abort;
            //            this.Close();
            //        }
            //        else
            //        {
            //            if (Directory.Exists(path + @"\DeviceCode\Targets\"))
            //                PK.Wrapper.SpoClientPath = of.Path;
            //            else
            //            {
            //                MessageBox.Show(this,".NET Micro Framework Porting Kit directory was not found.","Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

            //                this.DialogResult = System.Windows.Forms.DialogResult.Abort;
            //                this.Close();
            //            }

            //        }
            //    }
            //}
            //else
            //{
            //    Environment.SetEnvironmentVariable("SPOCLIENT", path);
            //    PK.Wrapper.SpoClientPath = path;
            //}

            //string srcDirEnvVar = Environment.GetEnvironmentVariable("SRC_DIR");

            //if (srcDirEnvVar == null)
            //{
            //    Environment.SetEnvironmentVariable("SRC_DIR", "");
            //}
        }
Example #6
0
        private void ApplicationLoading_Load(object sender, EventArgs e)
        {
            Helper.AssemblyInfoHelper asmhelper = new Helper.AssemblyInfoHelper(Assembly.GetExecutingAssembly());

            TitleLbl.Text     = asmhelper.Title;
            VersionLbl.Text   = Strings.Version + " " + asmhelper.AssemblyVersion;
            CopyrightLbl.Text = asmhelper.Copyright;
            CopyrightLbl.SetBounds(this.Bounds.Width / 2 - CopyrightLbl.Bounds.Width / 2, CopyrightLbl.Bounds.Y, CopyrightLbl.Bounds.Width, CopyrightLbl.Bounds.Height);


            string path = Environment.GetEnvironmentVariable("SPOCLIENT");

            if (string.IsNullOrEmpty(path) || !Directory.Exists(path) || !Directory.Exists(path + @"\DeviceCode\Targets\"))
            {
                MessageBox.Show(this, "Please set environment variables manually or run PKStudioLauncher.exe", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

                this.DialogResult = System.Windows.Forms.DialogResult.Abort;
                this.Close();
            }

            PK.Wrapper.SpoClientPath = path;

            string srcDirEnvVar = Environment.GetEnvironmentVariable("SRC_DIR");

            if (srcDirEnvVar == null)
            {
                Environment.SetEnvironmentVariable("SRC_DIR", "");
            }

            //if (string.IsNullOrEmpty(portingKitRegistryValue) || !Directory.Exists(portingKitRegistryValue))
            //{
            //    portingKitRegistryValue = Helper.GetPortingKitRegistryValue("", "InstallRoot");
            //}
            //if (!string.IsNullOrEmpty(portingKitRegistryValue) && Directory.Exists(portingKitRegistryValue))
            //{
            //    path = portingKitRegistryValue;
            //}

            //if (!Directory.Exists(path) || !Directory.Exists(path + @"\DeviceCode\Targets\"))
            //{
            //    using (SetSPOForm of = new SetSPOForm())
            //    {
            //        if (of.ShowDialog(this) != System.Windows.Forms.DialogResult.OK)
            //        {
            //            this.DialogResult = System.Windows.Forms.DialogResult.Abort;
            //            this.Close();
            //        }
            //        else
            //        {
            //            if (Directory.Exists(path + @"\DeviceCode\Targets\"))
            //                PK.Wrapper.SpoClientPath = of.Path;
            //            else
            //            {
            //                MessageBox.Show(this,".NET Micro Framework Porting Kit directory was not found.","Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

            //                this.DialogResult = System.Windows.Forms.DialogResult.Abort;
            //                this.Close();
            //            }

            //        }
            //    }
            //}
            //else
            //{
            //    Environment.SetEnvironmentVariable("SPOCLIENT", path);
            //    PK.Wrapper.SpoClientPath = path;
            //}

            //string srcDirEnvVar = Environment.GetEnvironmentVariable("SRC_DIR");

            //if (srcDirEnvVar == null)
            //{
            //    Environment.SetEnvironmentVariable("SRC_DIR", "");
            //}
        }
Example #7
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;

        }