Skip to content

Commit a40c17c

Browse files
committed
Fixed bug in custom files form, fixed 2 russian localizations, release 4.2
1 parent 8f26cc6 commit a40c17c

25 files changed

+1065
-526
lines changed

SharpBoot.sln

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

2-
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 2013
2+
Microsoft Visual Studio Solution File, Format Version 14.00
3+
# Visual Studio 2015
44
VisualStudioVersion = 12.0.30501.0
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpBoot", "SharpBoot\SharpBoot.csproj", "{7EA17673-BEC5-4E2D-B51E-98FAA9C9B178}"

SharpBoot/Bootloaders.cs

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,13 @@ public void SetImage(Image image, Size sz)
408408
public long TotalSize { get; set; } = 280911;
409409
}
410410

411+
public interface IBootloaderTheme
412+
{
413+
Size Resolution { get; set; }
414+
415+
string GetCode();
416+
}
417+
411418
public class SyslinuxTheme
412419
{
413420
public int Margin { get; set; } = 4;
@@ -451,30 +458,40 @@ public string GetCode()
451458
(Program.UseCyrillicFont ? "FONT /boot/syslinux/cyrillic_cp866.psf\n" : "");
452459
}
453460

454-
public List<ThemeEntry> Entries = new List<ThemeEntry>
461+
public List<SLTEntry> Entries = new List<SLTEntry>
455462
{
456-
new ThemeEntry("border", "#ffffffff", "#ee000000", ShadowType.std),
457-
new ThemeEntry("title", "#ffffffff", "#ee000000", ShadowType.std),
458-
new ThemeEntry("sel", "#ffffffff", "#85000000", ShadowType.std),
459-
new ThemeEntry("unsel", "#ffffffff", "#ee000000", ShadowType.std),
460-
new ThemeEntry("pwdheader", "#ff000000", "#99ffffff", ShadowType.rev),
461-
new ThemeEntry("pwdborder", "#ff000000", "#99ffffff", ShadowType.rev),
462-
new ThemeEntry("pwdentry", "#ff000000", "#99ffffff", ShadowType.rev),
463-
new ThemeEntry("hotkey", "#ff00ff00", "#ee000000", ShadowType.std),
464-
new ThemeEntry("hotsel", "#ffffffff", "#85000000", ShadowType.std)
463+
new SLTEntry("screen", "#80ffffff", "#00000000", ShadowType.std),
464+
new SLTEntry("border", "#ffffffff", "#ee000000", ShadowType.std),
465+
new SLTEntry("title", "#ffffffff", "#ee000000", ShadowType.std),
466+
new SLTEntry("unsel", "#ffffffff", "#ee000000", ShadowType.std),
467+
new SLTEntry("hotkey", "#ff00ff00", "#ee000000", ShadowType.std),
468+
new SLTEntry("sel", "#ffffffff", "#85000000", ShadowType.std),
469+
new SLTEntry("hotsel", "#ffffffff", "#85000000", ShadowType.std),
470+
new SLTEntry("disabled", "#60cccccc", "#00000000", ShadowType.std),
471+
new SLTEntry("scrollbar", "#40000000", "#00000000", ShadowType.std),
472+
new SLTEntry("tabmsg", "#90ffff00", "#00000000", ShadowType.std),
473+
new SLTEntry("cmdmark", "#c000ffff", "#00000000", ShadowType.std),
474+
new SLTEntry("cmdline", "#c0ffffff", "#00000000", ShadowType.std),
475+
new SLTEntry("pwdborder", "#80ffffff", "#20ffffff", ShadowType.rev),
476+
new SLTEntry("pwdheader", "##80ff8080", "#20ffffff", ShadowType.rev),
477+
new SLTEntry("pwdentry", "#80ffffff", "#20ffffff", ShadowType.rev),
478+
new SLTEntry("timeout_msg", "#80ffffff", "#00000000", ShadowType.std),
479+
new SLTEntry("timeout", "#c0ffffff", "#00000000", ShadowType.std),
480+
new SLTEntry("help", "#c0ffffff", "#00000000", ShadowType.std)
465481
};
466482

467-
public class ThemeEntry
483+
// SLTEntry = SysLinux Theme Entry
484+
public class SLTEntry
468485
{
469-
public ThemeEntry(string name, Color foreground, Color background, ShadowType shadowType = ShadowType.none)
486+
public SLTEntry(string name, Color foreground, Color background, ShadowType shadowType = ShadowType.none)
470487
{
471488
Name = name;
472489
Foreground = foreground;
473490
Background = background;
474491
ShadowType = shadowType;
475492
}
476493

477-
public ThemeEntry(string name, string foreground, string background, ShadowType shadowType = ShadowType.none)
494+
public SLTEntry(string name, string foreground, string background, ShadowType shadowType = ShadowType.none)
478495
: this(name, ColorTranslator.FromHtml(foreground), ColorTranslator.FromHtml(background), shadowType)
479496
{
480497
}

SharpBoot/CustomFileFrm.Designer.cs

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

SharpBoot/CustomFileFrm.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ private void lvFiles_DragDrop(object sender, DragEventArgs e)
105105

106106
private void lvFiles_CellValidated(object sender, DataGridViewCellEventArgs e)
107107
{
108-
var cell = lvFiles.Rows[e.RowIndex].Cells[e.ColumnIndex];
108+
var cell = lvFiles.Rows[e.RowIndex].Cells[1];
109109
var cv = cell.Value?.ToString() ?? "";
110110
if (string.IsNullOrWhiteSpace(cv) || cv.EndsWith("/"))
111111
{
@@ -120,5 +120,18 @@ private void lvFiles_CellValidated(object sender, DataGridViewCellEventArgs e)
120120
}
121121
}
122122
}
123+
124+
private void lvFiles_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
125+
{
126+
if (e.ColumnIndex == 0)
127+
{
128+
ofpFile.Multiselect = false;
129+
if (ofpFile.ShowDialog() == DialogResult.OK)
130+
{
131+
lvFiles.Rows[e.RowIndex].Cells[0].Value = ofpFile.FileName;
132+
}
133+
ofpFile.Multiselect = true;
134+
}
135+
}
123136
}
124137
}

0 commit comments

Comments
 (0)