Skip to content

Commit

Permalink
MAJOR UPDATE - Added Custom Entry form (DOS, ReactOS, Grub entry, etc…
Browse files Browse the repository at this point in the history
…), fixed lots of translations and bugs, version 4.0
  • Loading branch information
zdimension committed Dec 20, 2015
1 parent d70b54f commit cc1d9ca
Show file tree
Hide file tree
Showing 123 changed files with 5,442 additions and 3,811 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
SharpBoot is a program for creating multiboot ISOs or USB keys by choosing other ISO files and putting them in categories.
You can choose between Syslinux and Grub4DOS, you can choose filesystem (when making an USB key) between FAT12, FAT16 or FAT32, you can choose resolution between 640x480, 800x600 and 1024x768.
You can also pick a custom background image (automatically resized to chosen resolution).
![SharpBoot 3.7](http://i.imgur.com/mvxdshD.png)
![SharpBoot 4.0](http://i.imgur.com/EDbrYOx.png)

# Translators
<table>
Expand Down
2 changes: 1 addition & 1 deletion SharpBoot/About.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 8 additions & 9 deletions SharpBoot/About.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,43 +3,42 @@
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Runtime.InteropServices;
using System.Windows.Forms;

namespace SharpBoot
{
public partial class About : Form
{
public static List<Image> Flags => new About().ilTranslators.Images.Cast<Image>().ToList();
public static List<Image> Flags => new About().ilTranslators.Images.Cast<Image>().ToList();


public About()
{
InitializeComponent();
richTextBox1.Text = richTextBox1.Text.Insert(9, " " + Program.GetVersion()).Replace("{0}", Strings.SharpBootUsesSoft);
if(Program.IsWin) Utils.SetWindowTheme(lvTranslators.Handle, "explorer", null);
richTextBox1.Text = richTextBox1.Text.Insert(9, " " + Program.GetVersion())
.Replace("{0}", Strings.SharpBootUsesSoft);
if (Program.IsWin) Utils.SetWindowTheme(lvTranslators.Handle, "explorer", null);
rtbMyWebsite.SelectAll();
rtbMyWebsite.SelectionAlignment = HorizontalAlignment.Right;
rtbMyWebsite.DeselectAll();

}

private void lvTranslators_DoubleClick(object sender, EventArgs e)
{
if(lvTranslators.SelectedItems.Count == 1)
if (lvTranslators.SelectedItems.Count == 1)
{
var it = lvTranslators.SelectedItems[0];
var url = "";
if (it.SubItems.Count > 1) url = it.SubItems[1].Text;
if(!string.IsNullOrEmpty(url)) Process.Start(url);
if (!string.IsNullOrEmpty(url)) Process.Start(url);
lvTranslators.SelectedIndices.Clear();
}
}

private void richTextBox1_LinkClicked(object sender, LinkClickedEventArgs e)
{
if(e.LinkText != "")
if (e.LinkText != "")
Process.Start(e.LinkText);
}
}
}
}
2 changes: 1 addition & 1 deletion SharpBoot/AddIso.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

65 changes: 43 additions & 22 deletions SharpBoot/AddIso.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,37 @@ public AddIso()
InitializeComponent();
ISOPath = "";
Closing += AddIso_Closing;
btnOK.Text = Strings.OK;
btnAnnul.Text = Strings.Cancel;
while (ISOInfo.ISOs.Count == 0) Thread.Sleep(50);
while (cbxDetIso.Items.Count < 2)
{
var isos =
ISOInfo.ISOs.Where(x => !x.NoDL)
.Select(x => new {Val = x, x.Name, Category = x.CategoryTxt, x.LatestVersion.Hash});

cbxISOS.DataSource = isos;
var iso2 = isos.ToList();
iso2.Insert(0,
new
{
Val = new ISOInfo("", new Dictionary<CultureInfo, string>(), IsoCategory.None),
Name = Strings.Other,
Category = "",
Hash = ""
});
iso2.AddRange(
ISOInfo.ISOs.Where(x => x.NoDL)
.Select(x => new {Val = x, x.Name, Category = x.CategoryTxt, Hash = ""})
.ToList());
cbxDetIso.DataSource = iso2;
cbxDetIso.DisplayMember = "Name";
fempty = true;
cbxDetIso.SelectedItem = null;
cbxISOS.SelectedItem = null;
cbxVersion.SelectedItem = null;
}
rtbIsoDesc.Text = "";
}

private void AddIso_Closing(object sender, CancelEventArgs e)
Expand All @@ -33,19 +64,6 @@ private void AddIso_Closing(object sender, CancelEventArgs e)

private void AddIso_Load(object sender, EventArgs e)
{
var isos = ISOInfo.ISOs.Where(x => !x.NoDL).Select(x => new { Val = x, x.Name, Category = x.CategoryTxt, x.LatestVersion.Hash });

cbxISOS.DataSource = isos;
var iso2 = isos.ToList();
iso2.Insert(0, new { Val = new ISOInfo("", new Dictionary<CultureInfo, string>(), IsoCategory.None), Name = Strings.Other, Category = "", Hash = "" });
iso2.AddRange(ISOInfo.ISOs.Where(x => x.NoDL).Select(x => new { Val = x, x.Name, Category = x.CategoryTxt, Hash = "" }).ToList());
cbxDetIso.DataSource = iso2;
cbxDetIso.DisplayMember = "Name";
fempty = true;
cbxDetIso.SelectedItem = null;
cbxISOS.SelectedItem = null;
cbxVersion.SelectedItem = null;
rtbIsoDesc.Text = "";
}

private void rbnFile_CheckedChanged(object sender, EventArgs e)
Expand Down Expand Up @@ -85,7 +103,7 @@ private void txtFile_TextChanged(object sender, EventArgs e)

private ISOInfo selinfo => cbxISOS.SelectedItem == null ? null : ((dynamic) cbxISOS.SelectedItem).Val;

private ISOInfo selinfo2 => cbxDetIso.SelectedItem == null ? null : ((dynamic)cbxDetIso.SelectedItem).Val;
private ISOInfo selinfo2 => cbxDetIso.SelectedItem == null ? null : ((dynamic) cbxDetIso.SelectedItem).Val;

private ISOV selinfoversion()
{
Expand All @@ -105,7 +123,7 @@ private void cbxISOS_SelectedIndexChanged(object sender, EventArgs e)
cbxVersion.DataSource = ds;
var latest = selinfo.LatestVersion;
cbxVersion.SelectedIndex = 0;
for (int i = 0; i < ds.Count; i++)
for (var i = 0; i < ds.Count; i++)
{
if (ds[i].Value == latest)
{
Expand Down Expand Up @@ -204,14 +222,14 @@ private void md5stuff()
else
{
IsoV = resk;
for (int index = 0; index < cbxDetIso.Items.Count; index++)
for (var index = 0; index < cbxDetIso.Items.Count; index++)
{
dynamic it = cbxDetIso.Items[index];
if (it.Val == resk.Parent)
{
changing = true;
cbxDetIso.SelectedIndex = index;

break;
}
}
Expand All @@ -225,7 +243,6 @@ private void md5stuff()
CurrentUICulture = CultureInfo.CurrentUICulture
};
th.Start();

}

public ISOV IsoV;
Expand All @@ -235,7 +252,7 @@ private void btnOK_Click(object sender, EventArgs e)
if (IsDownload)
{
IsoV = selinfoversion();
if(IsoV != null && IsoV.DownloadLink != "")
if (IsoV != null && IsoV.DownloadLink != "")
{
sfdIso.FileName = Path.GetFileName(IsoV.DownloadLink);
}
Expand Down Expand Up @@ -266,14 +283,18 @@ private void btnAnnul_Click(object sender, EventArgs e)
client?.CancelAsync();
}



private void cbxDetIso_SelectedIndexChanged(object sender, EventArgs e)
{
if (changing) return;
if(cbxDetIso.SelectedIndex != -1 && cbxDetIso.SelectedItem != null)
if (cbxDetIso.SelectedIndex != -1 && cbxDetIso.SelectedItem != null)
{
IsoV = cbxDetIso.SelectedIndex == 0 ? new ISOV("other", "") : (selinfo2 == null ? null : (selinfo2.LatestVersion ?? new ISOV("nover", selinfo2.Name, "", selinfo2.Filename, true) {Parent=selinfo2}));
IsoV = cbxDetIso.SelectedIndex == 0
? new ISOV("other", "")
: (selinfo2 == null
? null
: (selinfo2.LatestVersion ??
new ISOV("nover", selinfo2.Name, "", selinfo2.Filename, true) {Parent = selinfo2}));
}
}
}
Expand Down
3 changes: 0 additions & 3 deletions SharpBoot/AddIso.de.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="btnAnnul.Text" xml:space="preserve">
<value>Abbrechen</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>212, 30</value>
Expand Down
3 changes: 0 additions & 3 deletions SharpBoot/AddIso.es.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="btnAnnul.Text" xml:space="preserve">
<value>Cancelar</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>229, 30</value>
Expand Down
3 changes: 0 additions & 3 deletions SharpBoot/AddIso.fr.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="btnAnnul.Text" xml:space="preserve">
<value>Annuler</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>213, 30</value>
Expand Down
3 changes: 0 additions & 3 deletions SharpBoot/AddIso.it.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="btnAnnul.Text" xml:space="preserve">
<value>Cancella</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>136, 30</value>
Expand Down
3 changes: 0 additions & 3 deletions SharpBoot/AddIso.ro.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="btnAnnul.Text" xml:space="preserve">
<value>Anulează</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>204, 30</value>
Expand Down
3 changes: 0 additions & 3 deletions SharpBoot/AddIso.ru.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="btnAnnul.Text" xml:space="preserve">
<value>Отмена</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>199, 30</value>
Expand Down
3 changes: 0 additions & 3 deletions SharpBoot/AddIso.uk.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="btnAnnul.Text" xml:space="preserve">
<value>Відмінити</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>178, 30</value>
Expand Down
6 changes: 0 additions & 6 deletions SharpBoot/AddIso.zh-Hans.resx
Original file line number Diff line number Diff line change
Expand Up @@ -124,18 +124,12 @@
<data name="btnOK.Size" type="System.Drawing.Size, System.Drawing">
<value>91, 25</value>
</data>
<data name="btnOK.Text" xml:space="preserve">
<value>好的</value>
</data>
<data name="btnAnnul.Location" type="System.Drawing.Point, System.Drawing">
<value>438, 17</value>
</data>
<data name="btnAnnul.Size" type="System.Drawing.Size, System.Drawing">
<value>91, 25</value>
</data>
<data name="btnAnnul.Text" xml:space="preserve">
<value>返回</value>
</data>
<data name="panel1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 408</value>
</data>
Expand Down
6 changes: 0 additions & 6 deletions SharpBoot/AddIso.zh-Hant.resx
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,6 @@
<data name="btnOK.Size" type="System.Drawing.Size, System.Drawing">
<value>91, 25</value>
</data>
<data name="btnOK.Text" xml:space="preserve">
<value>確定</value>
</data>
<data name="btnAnnul.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft YaHei UI, 10pt</value>
</data>
Expand All @@ -139,9 +136,6 @@
<data name="btnAnnul.Size" type="System.Drawing.Size, System.Drawing">
<value>91, 25</value>
</data>
<data name="btnAnnul.Text" xml:space="preserve">
<value>取消</value>
</data>
<data name="panel1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 408</value>
</data>
Expand Down
Loading

0 comments on commit cc1d9ca

Please sign in to comment.