Beispiel #1
0
        private void btnInstBoot_Click(object sender, EventArgs e)
        {
            var frm = new USBFrm(Strings.InstallABootLoader, Strings.ChooseBootloader, Strings.Install, false, "Grub2");

            frm.BtnClicked += (o, args) =>
            {
                frm.ProgressVisible = true;
                frm.SetProgress(5);
                Grub2.Install(frm.SelectedUSB.Name);
                frm.SetProgress(100);
                MessageBox.Show(
                    string.Format(Strings.BootloaderInstalled,
                                  "Grub2",
                                  frm.SelectedUSB.Name), "SharpBoot", 0, MessageBoxIcon.Information);
            };
            frm.ShowDialog(this);
        }
Beispiel #2
0
        private void btnInstBoot_Click(object sender, EventArgs e)
        {
            var frm = new USBFrm(Strings.InstallABootLoader, Strings.ChooseBootloader, Strings.Install, false,
                                 cbxBootloader.Items.Cast <string>().ToArray());

            frm.BtnClicked += (o, args) =>
            {
                frm.ProgressVisible = true;
                frm.SetProgress(5);
                var bl = Bootloaders.Bloaders[frm.TheComboBox.SelectedIndex];
                BootloaderInst.Install(frm.SelectedUSB.Name, bl);
                frm.SetProgress(100);
                MessageBox.Show(
                    string.Format(Strings.BootloaderInstalled,
                                  bl.DisplayName,
                                  frm.SelectedUSB.Name), "SharpBoot", 0, MessageBoxIcon.Information);
            };
            frm.ShowDialog(this);
        }
Beispiel #3
0
 private void btnInstBoot_Click(object sender, EventArgs e)
 {
     var frm = new USBFrm(Strings.InstallABootLoader, Strings.ChooseBootloader, Strings.Install, false,
         cbxBootloader.Items.Cast<string>().ToArray());
     frm.BtnClicked += (o, args) =>
     {
         frm.ProgressVisible = true;
         frm.SetProgress(5);
         var bl = Bootloaders.Bloaders[frm.TheComboBox.SelectedIndex];
         BootloaderInst.Install(frm.SelectedUSB.Name, bl);
         frm.SetProgress(100);
         MessageBox.Show(
             string.Format(Strings.BootloaderInstalled,
                 bl.DisplayName,
                 frm.SelectedUSB.Name), "SharpBoot", 0, MessageBoxIcon.Information);
     };
     frm.ShowDialog(this);
 }