Exemplo n.º 1
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                label4.Text = Path.GetDirectoryName(openFileDialog1.FileName);
                label3.Text = "Forced VirtualBox path:";

                _Client = new VirtualBoxClient(label4.Text);
                UpdateInstallButtons();
            }
        }
Exemplo n.º 2
0
        public MainForm()
        {
            InitializeComponent();

            try
            {
                string dir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + @"\target";
                if (Directory.Exists(dir))
                    _GuestInstallerDir = dir;
                else
                    button6.Enabled = false;

                string vmmon = "vmmon.exe";
                if (Is64Bit())
                    vmmon = "vmmon64.exe";

                vmmon = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + @"\" + vmmon;
                if (File.Exists(vmmon))
                    _VMMonPath = vmmon;
                else
                    button4.Enabled = false;

                VirtualBoxClient clt = new VirtualBoxClient();
                if ((clt.VirtualBoxPath == null) || (clt.VirtualBoxVersion == null))
                    label1.Text = "VirtualBox not found";
                else
                {
                    label1.Text = "VirtualBox " + clt.Version + " detected. ";
                    switch(clt.State)
                    {
                        case VirtualBoxClient.IntegrationState.NotInstalled:
                            label1.Text += "VirtualKD is not integrated. ";
                            break;
                        case VirtualBoxClient.IntegrationState.Successful:
                            label1.Text += "No problems found. ";
                            break;
                        case VirtualBoxClient.IntegrationState.VBoxReinstallRequired:
                            label1.Text += "VirtualBox must be reinstalled! ";
                            button1.Enabled = false;
                            break;
                    }
                    if (clt.StateComment != null)
                        label1.Text += (clt.StateComment + ".");
                }
            }
            catch (System.Exception)
            {
            }
        }
Exemplo n.º 3
0
 string FileSourceToString(VirtualBoxClient.FileSource src)
 {
     switch(src)
     {
         case VirtualBoxClient.FileSource.Missing:
             return "not found";
         case VirtualBoxClient.FileSource.VirtualBox:
             return "original VirtualBox";
         case VirtualBoxClient.FileSource.VirtualKD:
             return "patched VirtualKD";
         default:
             return "unknown version";
     }
 }
Exemplo n.º 4
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                label4.Text = Path.GetDirectoryName(openFileDialog1.FileName);
                label3.Text = "Forced VirtualBox path:";

                _Client = new VirtualBoxClient(label4.Text);
                UpdateInstallButtons();
            }
        }
Exemplo n.º 5
0
        public MainForm()
        {
            InitializeComponent();

            try
            {
                string dir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + @"\target";
                if (Directory.Exists(dir))
                {
                    _GuestInstallerDir = dir;
                }
                else
                {
                    button6.Enabled = false;
                }

                string vmmon = "vmmon.exe";
                if (Is64Bit())
                {
                    vmmon = "vmmon64.exe";
                }

                vmmon = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + @"\" + vmmon;
                if (File.Exists(vmmon))
                {
                    _VMMonPath = vmmon;
                }
                else
                {
                    button4.Enabled = false;
                }

                VirtualBoxClient clt = new VirtualBoxClient();
                if ((clt.VirtualBoxPath == null) || (clt.VirtualBoxVersion == null))
                {
                    label1.Text = "VirtualBox not found";
                }
                else
                {
                    label1.Text = "VirtualBox " + clt.Version + " detected. ";
                    switch (clt.State)
                    {
                    case VirtualBoxClient.IntegrationState.NotInstalled:
                        label1.Text += "VirtualKD is not integrated. ";
                        break;

                    case VirtualBoxClient.IntegrationState.Successful:
                        label1.Text += "No problems found. ";
                        break;

                    case VirtualBoxClient.IntegrationState.VBoxReinstallRequired:
                        label1.Text    += "VirtualBox must be reinstalled! ";
                        button1.Enabled = false;
                        break;
                    }
                    if (clt.StateComment != null)
                    {
                        label1.Text += (clt.StateComment + ".");
                    }
                }
            }
            catch (System.Exception)
            {
            }
        }