various fixes
This commit is contained in:
parent
2303d56d66
commit
e8d6b4f247
|
@ -81,9 +81,6 @@
|
||||||
<Compile Include="Controls\Button.cs">
|
<Compile Include="Controls\Button.cs">
|
||||||
<SubType>Component</SubType>
|
<SubType>Component</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Controls\Button.Designer.cs">
|
|
||||||
<DependentUpon>Button.cs</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Controls\FlatCheckBox.cs">
|
<Compile Include="Controls\FlatCheckBox.cs">
|
||||||
<SubType>Component</SubType>
|
<SubType>Component</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
@ -214,7 +211,6 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="BBD_small64.ico" />
|
<Content Include="BBD_small64.ico" />
|
||||||
<Content Include="fork.ico" />
|
|
||||||
<None Include="Resources\BBDVS.png" />
|
<None Include="Resources\BBDVS.png" />
|
||||||
<None Include="Resources\delete_small.png" />
|
<None Include="Resources\delete_small.png" />
|
||||||
<None Include="Resources\build_small.png" />
|
<None Include="Resources\build_small.png" />
|
||||||
|
|
|
@ -1,9 +1,17 @@
|
||||||
using System.Drawing;
|
using System.ComponentModel;
|
||||||
|
using System.Drawing;
|
||||||
using System.Drawing.Text;
|
using System.Drawing.Text;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace BandagedBD.Controls {
|
namespace BandagedBD.Controls {
|
||||||
class FlatCheckBox : CheckBox {
|
class FlatCheckBox : CheckBox {
|
||||||
|
|
||||||
|
[Description("Background color for the CheckBox"), Category("Flatpak")]
|
||||||
|
public Color BoxBackColor { get; set; } = Color.FromArgb(60, 60, 60);
|
||||||
|
|
||||||
|
[Description("Foreground color for the CheckBox"), Category("Flatpak")]
|
||||||
|
public Color BoxForeColor { get; set; } = Properties.Settings.Default.Accent;
|
||||||
|
|
||||||
public FlatCheckBox() {
|
public FlatCheckBox() {
|
||||||
SetStyle(ControlStyles.UserPaint, true);
|
SetStyle(ControlStyles.UserPaint, true);
|
||||||
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
|
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
|
||||||
|
@ -11,10 +19,10 @@ namespace BandagedBD.Controls {
|
||||||
|
|
||||||
protected override void OnPaint(PaintEventArgs e) {
|
protected override void OnPaint(PaintEventArgs e) {
|
||||||
base.OnPaint(e);
|
base.OnPaint(e);
|
||||||
e.Graphics.FillRectangle(new SolidBrush(Properties.Settings.Default.SecondaryBackground), new Rectangle(0, 0, 13, 14));
|
e.Graphics.FillRectangle(new SolidBrush(BoxBackColor), new Rectangle(0, 0, 13, 14));
|
||||||
if (Checked) {
|
if (Checked) {
|
||||||
e.Graphics.TextRenderingHint = TextRenderingHint.AntiAlias;
|
e.Graphics.TextRenderingHint = TextRenderingHint.AntiAlias;
|
||||||
e.Graphics.DrawString("\u2714", this.Font, new SolidBrush(Properties.Settings.Default.Accent), -1, 1);
|
e.Graphics.DrawString("\u2714", this.Font, new SolidBrush(BoxForeColor), -1, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,7 @@ namespace BandagedBD.Panels {
|
||||||
public bool shouldRestart => cbShouldRestart.Checked;
|
public bool shouldRestart => cbShouldRestart.Checked;
|
||||||
public string[] paths => Utilities.GetLocalPaths(discordLocator.stable, discordLocator.canary, discordLocator.ptb);
|
public string[] paths => Utilities.GetLocalPaths(discordLocator.stable, discordLocator.canary, discordLocator.ptb);
|
||||||
public string[] executables => Utilities.GetExecutables(discordLocator.stable, discordLocator.canary, discordLocator.ptb);
|
public string[] executables => Utilities.GetExecutables(discordLocator.stable, discordLocator.canary, discordLocator.ptb);
|
||||||
|
public string[] roamings => Utilities.GetRoamingPaths(discordLocator.stable, discordLocator.canary, discordLocator.ptb);
|
||||||
|
|
||||||
public InstallConfigPanel() {
|
public InstallConfigPanel() {
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
|
@ -138,6 +138,19 @@ namespace BandagedBD.Panels {
|
||||||
private int Verify(string installationPath) {
|
private int Verify(string installationPath) {
|
||||||
|
|
||||||
Append("Verifying installation");
|
Append("Verifying installation");
|
||||||
|
Append("Checking for old style injection");
|
||||||
|
foreach (var roaming in config.roamings) {
|
||||||
|
var core = $"{roaming}\\modules\\discord_desktop_core\\core";
|
||||||
|
Append($"Checking for old injection {roaming}", true);
|
||||||
|
if (!Directory.Exists(core)) continue;
|
||||||
|
Append($"Deleting old injection {roaming}", true);
|
||||||
|
try {
|
||||||
|
Directory.Delete(roaming, true);
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Append($"Please delete this folder: {roaming}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var appFolder = $"{installationPath}\\resources\\app";
|
var appFolder = $"{installationPath}\\resources\\app";
|
||||||
if (!Directory.Exists(appFolder)) {
|
if (!Directory.Exists(appFolder)) {
|
||||||
|
|
|
@ -133,6 +133,7 @@ namespace BandagedBD {
|
||||||
|
|
||||||
public static string GetLatestVersion(string path) {
|
public static string GetLatestVersion(string path) {
|
||||||
if (path == string.Empty) return path;
|
if (path == string.Empty) return path;
|
||||||
|
if (!Directory.Exists(path)) return string.Empty;
|
||||||
var dirs = Directory.GetDirectories(path);
|
var dirs = Directory.GetDirectories(path);
|
||||||
if (dirs.Length <= 0) return string.Empty;
|
if (dirs.Length <= 0) return string.Empty;
|
||||||
var latest = Path.GetFileName(dirs[0]);
|
var latest = Path.GetFileName(dirs[0]);
|
||||||
|
|
Loading…
Reference in New Issue