Example #1
0
 private void refreshBuildPlatform()
 {
     platform = new currentDrivePlatform();  // Reinitialize.
     currentDrivePlatform.LoadPlatFormTableByEnumerateFiles();
     toolStripPlatformCombo.Items.Clear();
     currentDrivePlatform.LoadComboBox(toolStripPlatformCombo);
     toolStripPlatformCombo.Text = currentDrivePlatform.Version;
 }
Example #2
0
        public FormDrives()
        {
            // Get the current process.
            // Process currentProcess = Process.GetCurrentProcess();


            InitializeComponent();

            UsbNotification.RegisterUsbDeviceNotification(this.Handle);

            platform = new currentDrivePlatform();

            currentDrivePlatform.LoadPlatFormTableByEnumerateFiles();

            // load the form combo box
            currentDrivePlatform.LoadComboBox(toolStripPlatformCombo);
            formHeight = 500;
            Size       = new Size(Width, formHeight);

            RunningAsAdministrator = IsProcessRunningInAdmin();

            if (RunningAsAdministrator)
            {
                treeView1.BackColor = Color.Beige;
                this.BackColor      = Color.DarkGray;
                this.ForeColor      = Color.White;

                toolStrip1.BackColor = Color.DarkGray;
                //        toolStrip1.ForeColor = Color.Black;

                statusStrip1.BackColor = Color.DarkGray;

                //foreach (ToolStripItem c in toolStrip1.Items)
                //{
                //    currentDrivePlatform.UpdateColorControls(c, Color.DarkGray, Color.Black);
                //}

                //foreach (Control c in Controls)
                //{
                //    currentDrivePlatform.UpdateColorControls(c, Color.DarkGray, Color.White);
                //}
            }

            toolStripPlatformCombo.Text = currentDrivePlatform.Version;

            treeView1.Location = new Point(0, toolStrip1.Location.Y + toolStrip1.Height);
            treeView1.Size     = new Size(treeView1.Size.Width, formHeight - (toolStrip1.Location.Y + toolStrip1.Height + 40));
            treeView1.Update();

            toolStripStatusLabel1.Text = "Drive Loaded Time : " + currentDrivePlatform.loadVersionTableElapsedTime;
            Application.EnableVisualStyles();
            // currentProcess

            AllInitialized = true;
        }