diff --git a/BandagedBD/Controls/DiscordLocator.Designer.cs b/BandagedBD/Controls/DiscordLocator.Designer.cs index 063d9de..1000e3b 100644 --- a/BandagedBD/Controls/DiscordLocator.Designer.cs +++ b/BandagedBD/Controls/DiscordLocator.Designer.cs @@ -16,7 +16,7 @@ base.Dispose(disposing); } - #region Component Designer generated code + #region Component D esigner generated code /// /// Required method for Designer support - do not modify @@ -36,6 +36,10 @@ this.discordPTB = new BandagedBD.Controls.FlatCheckBox(); this.discordCanary = new BandagedBD.Controls.FlatCheckBox(); this.discordStable = new BandagedBD.Controls.FlatCheckBox(); + this.browseDevelopment = new BandagedBD.Controls.Button(); + this.tbDevelopment = new System.Windows.Forms.TextBox(); + this.panel4 = new System.Windows.Forms.Panel(); + this.discordDevelopment = new BandagedBD.Controls.FlatCheckBox(); this.SuspendLayout(); // // titleLabel @@ -43,7 +47,7 @@ this.titleLabel.AutoSize = true; this.titleLabel.BackColor = System.Drawing.Color.Transparent; this.titleLabel.ForeColor = global::BandagedBD.Properties.Settings.Default.TextColor; - this.titleLabel.Location = new System.Drawing.Point(7, 10); + this.titleLabel.Location = new System.Drawing.Point(6, 9); this.titleLabel.Name = "titleLabel"; this.titleLabel.Size = new System.Drawing.Size(533, 13); this.titleLabel.TabIndex = 37; @@ -58,9 +62,9 @@ this.browsePTB.FlatAppearance.BorderSize = 0; this.browsePTB.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.browsePTB.ForeColor = System.Drawing.Color.White; - this.browsePTB.Location = new System.Drawing.Point(657, 138); + this.browsePTB.Location = new System.Drawing.Point(573, 120); this.browsePTB.Name = "browsePTB"; - this.browsePTB.Size = new System.Drawing.Size(86, 26); + this.browsePTB.Size = new System.Drawing.Size(75, 23); this.browsePTB.TabIndex = 36; this.browsePTB.Text = "Browse"; this.browsePTB.UseVisualStyleBackColor = false; @@ -74,10 +78,10 @@ this.tbPTB.BorderStyle = System.Windows.Forms.BorderStyle.None; this.tbPTB.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128))); this.tbPTB.ForeColor = System.Drawing.Color.White; - this.tbPTB.Location = new System.Drawing.Point(194, 143); + this.tbPTB.Location = new System.Drawing.Point(169, 125); this.tbPTB.Name = "tbPTB"; this.tbPTB.ReadOnly = true; - this.tbPTB.Size = new System.Drawing.Size(441, 15); + this.tbPTB.Size = new System.Drawing.Size(385, 13); this.tbPTB.TabIndex = 34; // // panel3 @@ -85,9 +89,9 @@ this.panel3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.panel3.BackColor = global::BandagedBD.Properties.Settings.Default.SecondaryBackground; - this.panel3.Location = new System.Drawing.Point(179, 138); + this.panel3.Location = new System.Drawing.Point(156, 120); this.panel3.Name = "panel3"; - this.panel3.Size = new System.Drawing.Size(471, 26); + this.panel3.Size = new System.Drawing.Size(411, 23); this.panel3.TabIndex = 35; // // browseCanary @@ -98,9 +102,9 @@ this.browseCanary.FlatAppearance.BorderSize = 0; this.browseCanary.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.browseCanary.ForeColor = System.Drawing.Color.White; - this.browseCanary.Location = new System.Drawing.Point(657, 89); + this.browseCanary.Location = new System.Drawing.Point(573, 78); this.browseCanary.Name = "browseCanary"; - this.browseCanary.Size = new System.Drawing.Size(86, 26); + this.browseCanary.Size = new System.Drawing.Size(75, 23); this.browseCanary.TabIndex = 33; this.browseCanary.Text = "Browse"; this.browseCanary.UseVisualStyleBackColor = false; @@ -114,10 +118,10 @@ this.tbCanary.BorderStyle = System.Windows.Forms.BorderStyle.None; this.tbCanary.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128))); this.tbCanary.ForeColor = System.Drawing.Color.White; - this.tbCanary.Location = new System.Drawing.Point(194, 95); + this.tbCanary.Location = new System.Drawing.Point(169, 83); this.tbCanary.Name = "tbCanary"; this.tbCanary.ReadOnly = true; - this.tbCanary.Size = new System.Drawing.Size(441, 15); + this.tbCanary.Size = new System.Drawing.Size(385, 13); this.tbCanary.TabIndex = 31; // // panel1 @@ -125,9 +129,9 @@ this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.panel1.BackColor = global::BandagedBD.Properties.Settings.Default.SecondaryBackground; - this.panel1.Location = new System.Drawing.Point(179, 89); + this.panel1.Location = new System.Drawing.Point(156, 78); this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(471, 26); + this.panel1.Size = new System.Drawing.Size(411, 23); this.panel1.TabIndex = 32; // // browseStable @@ -138,9 +142,9 @@ this.browseStable.FlatAppearance.BorderSize = 0; this.browseStable.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.browseStable.ForeColor = System.Drawing.Color.White; - this.browseStable.Location = new System.Drawing.Point(657, 42); + this.browseStable.Location = new System.Drawing.Point(573, 37); this.browseStable.Name = "browseStable"; - this.browseStable.Size = new System.Drawing.Size(86, 26); + this.browseStable.Size = new System.Drawing.Size(75, 23); this.browseStable.TabIndex = 30; this.browseStable.Text = "Browse"; this.browseStable.UseVisualStyleBackColor = false; @@ -154,10 +158,10 @@ this.tbStable.BorderStyle = System.Windows.Forms.BorderStyle.None; this.tbStable.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128))); this.tbStable.ForeColor = System.Drawing.Color.White; - this.tbStable.Location = new System.Drawing.Point(194, 48); + this.tbStable.Location = new System.Drawing.Point(169, 42); this.tbStable.Name = "tbStable"; this.tbStable.ReadOnly = true; - this.tbStable.Size = new System.Drawing.Size(441, 15); + this.tbStable.Size = new System.Drawing.Size(385, 13); this.tbStable.TabIndex = 28; // // panel2 @@ -165,9 +169,9 @@ this.panel2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.panel2.BackColor = global::BandagedBD.Properties.Settings.Default.SecondaryBackground; - this.panel2.Location = new System.Drawing.Point(179, 42); + this.panel2.Location = new System.Drawing.Point(156, 37); this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(471, 26); + this.panel2.Size = new System.Drawing.Size(411, 23); this.panel2.TabIndex = 29; // // discordPTB @@ -177,7 +181,7 @@ this.discordPTB.BoxForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(62)))), ((int)(((byte)(130)))), ((int)(((byte)(229))))); this.discordPTB.Cursor = System.Windows.Forms.Cursors.Hand; this.discordPTB.ForeColor = global::BandagedBD.Properties.Settings.Default.TextColor; - this.discordPTB.Location = new System.Drawing.Point(10, 142); + this.discordPTB.Location = new System.Drawing.Point(9, 124); this.discordPTB.Name = "discordPTB"; this.discordPTB.Size = new System.Drawing.Size(98, 17); this.discordPTB.TabIndex = 27; @@ -192,7 +196,7 @@ this.discordCanary.BoxForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(62)))), ((int)(((byte)(130)))), ((int)(((byte)(229))))); this.discordCanary.Cursor = System.Windows.Forms.Cursors.Hand; this.discordCanary.ForeColor = global::BandagedBD.Properties.Settings.Default.TextColor; - this.discordCanary.Location = new System.Drawing.Point(10, 94); + this.discordCanary.Location = new System.Drawing.Point(9, 82); this.discordCanary.Name = "discordCanary"; this.discordCanary.Size = new System.Drawing.Size(110, 17); this.discordCanary.TabIndex = 26; @@ -207,7 +211,7 @@ this.discordStable.BoxForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(62)))), ((int)(((byte)(130)))), ((int)(((byte)(229))))); this.discordStable.Cursor = System.Windows.Forms.Cursors.Hand; this.discordStable.ForeColor = global::BandagedBD.Properties.Settings.Default.TextColor; - this.discordStable.Location = new System.Drawing.Point(10, 47); + this.discordStable.Location = new System.Drawing.Point(9, 41); this.discordStable.Name = "discordStable"; this.discordStable.Size = new System.Drawing.Size(107, 17); this.discordStable.TabIndex = 25; @@ -215,11 +219,69 @@ this.discordStable.UseVisualStyleBackColor = true; this.discordStable.CheckedChanged += new System.EventHandler(this.discordStable_CheckedChanged); // + // browseDevelopment + // + this.browseDevelopment.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.browseDevelopment.BackColor = global::BandagedBD.Properties.Settings.Default.Accent; + this.browseDevelopment.Cursor = System.Windows.Forms.Cursors.Hand; + this.browseDevelopment.FlatAppearance.BorderSize = 0; + this.browseDevelopment.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.browseDevelopment.ForeColor = System.Drawing.Color.White; + this.browseDevelopment.Location = new System.Drawing.Point(573, 162); + this.browseDevelopment.Name = "browseDevelopment"; + this.browseDevelopment.Size = new System.Drawing.Size(75, 23); + this.browseDevelopment.TabIndex = 41; + this.browseDevelopment.Text = "Browse"; + this.browseDevelopment.UseVisualStyleBackColor = false; + // + // tbDevelopment + // + this.tbDevelopment.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tbDevelopment.BackColor = global::BandagedBD.Properties.Settings.Default.SecondaryBackground; + this.tbDevelopment.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.tbDevelopment.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128))); + this.tbDevelopment.ForeColor = System.Drawing.Color.White; + this.tbDevelopment.Location = new System.Drawing.Point(169, 167); + this.tbDevelopment.Name = "tbDevelopment"; + this.tbDevelopment.ReadOnly = true; + this.tbDevelopment.Size = new System.Drawing.Size(385, 13); + this.tbDevelopment.TabIndex = 39; + // + // panel4 + // + this.panel4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.panel4.BackColor = global::BandagedBD.Properties.Settings.Default.SecondaryBackground; + this.panel4.Location = new System.Drawing.Point(156, 162); + this.panel4.Name = "panel4"; + this.panel4.Size = new System.Drawing.Size(411, 23); + this.panel4.TabIndex = 40; + // + // discordDevelopment + // + this.discordDevelopment.AutoSize = true; + this.discordDevelopment.BoxBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60))))); + this.discordDevelopment.BoxForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(62)))), ((int)(((byte)(130)))), ((int)(((byte)(229))))); + this.discordDevelopment.Cursor = System.Windows.Forms.Cursors.Hand; + this.discordDevelopment.ForeColor = global::BandagedBD.Properties.Settings.Default.TextColor; + this.discordDevelopment.Location = new System.Drawing.Point(9, 166); + this.discordDevelopment.Name = "discordDevelopment"; + this.discordDevelopment.Size = new System.Drawing.Size(140, 17); + this.discordDevelopment.TabIndex = 38; + this.discordDevelopment.Text = "Repair On Development"; + this.discordDevelopment.UseVisualStyleBackColor = true; + this.discordDevelopment.CheckedChanged += new System.EventHandler(this.discordDevelopment_CheckedChanged); + // // DiscordLocator // - this.AutoScaleDimensions = new System.Drawing.SizeF(110F, 110F); + this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.BackColor = System.Drawing.Color.Transparent; + this.Controls.Add(this.browseDevelopment); + this.Controls.Add(this.tbDevelopment); + this.Controls.Add(this.panel4); + this.Controls.Add(this.discordDevelopment); this.Controls.Add(this.titleLabel); this.Controls.Add(this.browsePTB); this.Controls.Add(this.tbPTB); @@ -234,7 +296,7 @@ this.Controls.Add(this.discordCanary); this.Controls.Add(this.discordStable); this.Name = "DiscordLocator"; - this.Size = new System.Drawing.Size(759, 184); + this.Size = new System.Drawing.Size(662, 202); this.ResumeLayout(false); this.PerformLayout(); @@ -255,5 +317,9 @@ private BandagedBD.Controls.FlatCheckBox discordCanary; private BandagedBD.Controls.FlatCheckBox discordStable; private System.Windows.Forms.Label titleLabel; + private Controls.Button browseDevelopment; + private System.Windows.Forms.TextBox tbDevelopment; + private System.Windows.Forms.Panel panel4; + private BandagedBD.Controls.FlatCheckBox discordDevelopment; } } diff --git a/BandagedBD/Controls/DiscordLocator.cs b/BandagedBD/Controls/DiscordLocator.cs index 6bb848f..246bae9 100644 --- a/BandagedBD/Controls/DiscordLocator.cs +++ b/BandagedBD/Controls/DiscordLocator.cs @@ -7,6 +7,8 @@ namespace BandagedBD.Controls { public bool stable => discordStable.Checked; public bool canary => discordCanary.Checked; public bool ptb => discordPTB.Checked; + public bool development => discordDevelopment.Checked; + public EventHandler OnCheckedChange; public DiscordLocator() { @@ -14,9 +16,11 @@ namespace BandagedBD.Controls { if (Utilities.CurrentStablePath != null) tbStable.Text = Utilities.CurrentStablePath; if (Utilities.CurrentCanaryPath != null) tbCanary.Text = Utilities.CurrentCanaryPath; if (Utilities.CurrentPtbPath != null) tbPTB.Text = Utilities.CurrentPtbPath; + if (Utilities.CurrentDevelopmentPath != null) tbDevelopment.Text = Utilities.CurrentDevelopmentPath; Utilities.EnsureDiscord(tbStable, discordStable, Discord.Stable); Utilities.EnsureDiscord(tbCanary, discordCanary, Discord.Canary); Utilities.EnsureDiscord(tbPTB, discordPTB, Discord.PTB); + Utilities.EnsureDiscord(tbDevelopment, discordDevelopment, Discord.Development); } public void setLabel(string label) { @@ -27,6 +31,7 @@ namespace BandagedBD.Controls { if (which == Discord.Stable) discordStable.Text = label; if (which == Discord.Canary) discordCanary.Text = label; if (which == Discord.PTB) discordPTB.Text = label; + if (which == Discord.Development) discordDevelopment.Text = label; } private void browseStable_Click(object sender, EventArgs e) { @@ -50,6 +55,14 @@ namespace BandagedBD.Controls { Utilities.EnsureDiscord(tbPTB, discordPTB, Discord.PTB); } + private void browseDevelopment_Click(object sender, EventArgs e) + { + var fbd = new FolderBrowserDialog { SelectedPath = tbDevelopment.Text }; + fbd.ShowDialog(); + tbDevelopment.Text = fbd.SelectedPath; + Utilities.EnsureDiscord(tbDevelopment, discordDevelopment, Discord.Development); + } + private void discordStable_CheckedChanged(object sender, EventArgs e) { if (discordStable.Checked) Utilities.EnsureDiscord(tbStable, discordStable, Discord.Stable); OnCheckedChange?.Invoke(sender, e); @@ -64,5 +77,11 @@ namespace BandagedBD.Controls { if (discordPTB.Checked) Utilities.EnsureDiscord(tbPTB, discordPTB, Discord.PTB); OnCheckedChange?.Invoke(sender, e); } + + private void discordDevelopment_CheckedChanged(object sender, EventArgs e) + { + if (discordDevelopment.Checked) Utilities.EnsureDiscord(tbDevelopment, discordDevelopment, Discord.Development); + OnCheckedChange?.Invoke(sender, e); + } } } diff --git a/BandagedBD/FormMain.Designer.cs b/BandagedBD/FormMain.Designer.cs index bea8933..d651ab7 100644 --- a/BandagedBD/FormMain.Designer.cs +++ b/BandagedBD/FormMain.Designer.cs @@ -51,7 +51,7 @@ namespace BandagedBD { this.panelDock.BackColor = System.Drawing.Color.Transparent; this.panelDock.Location = new System.Drawing.Point(12, 96); this.panelDock.Name = "panelDock"; - this.panelDock.Size = new System.Drawing.Size(752, 339); + this.panelDock.Size = new System.Drawing.Size(752, 377); this.panelDock.TabIndex = 0; // // lblTitle @@ -86,7 +86,7 @@ namespace BandagedBD { this.linkLabel1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128))); this.linkLabel1.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline; this.linkLabel1.LinkColor = global::BandagedBD.Properties.Settings.Default.Accent; - this.linkLabel1.Location = new System.Drawing.Point(172, 471); + this.linkLabel1.Location = new System.Drawing.Point(174, 509); this.linkLabel1.Name = "linkLabel1"; this.linkLabel1.Size = new System.Drawing.Size(95, 13); this.linkLabel1.TabIndex = 34; @@ -101,7 +101,7 @@ namespace BandagedBD { this.label1.AutoSize = true; this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128))); this.label1.ForeColor = global::BandagedBD.Properties.Settings.Default.TextColor; - this.label1.Location = new System.Drawing.Point(13, 471); + this.label1.Location = new System.Drawing.Point(15, 509); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(120, 13); this.label1.TabIndex = 33; @@ -116,7 +116,7 @@ namespace BandagedBD { this.btnCancel.FlatAppearance.BorderSize = 0; this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnCancel.ForeColor = global::BandagedBD.Properties.Settings.Default.TextColor; - this.btnCancel.Location = new System.Drawing.Point(689, 466); + this.btnCancel.Location = new System.Drawing.Point(689, 504); this.btnCancel.Name = "btnCancel"; this.btnCancel.Size = new System.Drawing.Size(75, 23); this.btnCancel.TabIndex = 8; @@ -132,7 +132,7 @@ namespace BandagedBD { this.btnNext.FlatAppearance.BorderSize = 0; this.btnNext.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnNext.ForeColor = global::BandagedBD.Properties.Settings.Default.TextColor; - this.btnNext.Location = new System.Drawing.Point(608, 466); + this.btnNext.Location = new System.Drawing.Point(608, 504); this.btnNext.Name = "btnNext"; this.btnNext.Size = new System.Drawing.Size(75, 23); this.btnNext.TabIndex = 7; @@ -148,7 +148,7 @@ namespace BandagedBD { this.btnBack.FlatAppearance.BorderSize = 0; this.btnBack.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnBack.ForeColor = global::BandagedBD.Properties.Settings.Default.TextColor; - this.btnBack.Location = new System.Drawing.Point(527, 466); + this.btnBack.Location = new System.Drawing.Point(527, 504); this.btnBack.Name = "btnBack"; this.btnBack.Size = new System.Drawing.Size(75, 23); this.btnBack.TabIndex = 6; @@ -160,7 +160,7 @@ namespace BandagedBD { // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = global::BandagedBD.Properties.Settings.Default.PrimaryBackground; - this.ClientSize = new System.Drawing.Size(776, 501); + this.ClientSize = new System.Drawing.Size(776, 539); this.Controls.Add(this.linkLabel1); this.Controls.Add(this.btnCancel); this.Controls.Add(this.label1); diff --git a/BandagedBD/Panels/InstallConfigPanel.Designer.cs b/BandagedBD/Panels/InstallConfigPanel.Designer.cs index 7b65fd0..5c81687 100644 --- a/BandagedBD/Panels/InstallConfigPanel.Designer.cs +++ b/BandagedBD/Panels/InstallConfigPanel.Designer.cs @@ -44,7 +44,7 @@ this.cbShouldRestart.Cursor = System.Windows.Forms.Cursors.Hand; this.cbShouldRestart.FlatAppearance.CheckedBackColor = System.Drawing.Color.Transparent; this.cbShouldRestart.ForeColor = global::BandagedBD.Properties.Settings.Default.TextColor; - this.cbShouldRestart.Location = new System.Drawing.Point(10, 212); + this.cbShouldRestart.Location = new System.Drawing.Point(11, 232); this.cbShouldRestart.Name = "cbShouldRestart"; this.cbShouldRestart.Size = new System.Drawing.Size(162, 17); this.cbShouldRestart.TabIndex = 5; @@ -59,15 +59,16 @@ this.discordLocator.BackColor = System.Drawing.Color.Transparent; this.discordLocator.Location = new System.Drawing.Point(0, 3); this.discordLocator.Name = "discordLocator"; - this.discordLocator.Size = new System.Drawing.Size(662, 176); + this.discordLocator.Size = new System.Drawing.Size(662, 200); this.discordLocator.TabIndex = 6; + this.discordLocator.Load += new System.EventHandler(this.discordLocator_Load); // // label1 // this.label1.Anchor = System.Windows.Forms.AnchorStyles.Top; this.label1.AutoSize = true; this.label1.ForeColor = global::BandagedBD.Properties.Settings.Default.TextColor; - this.label1.Location = new System.Drawing.Point(7, 186); + this.label1.Location = new System.Drawing.Point(8, 206); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(95, 13); this.label1.TabIndex = 8; diff --git a/BandagedBD/Panels/InstallConfigPanel.cs b/BandagedBD/Panels/InstallConfigPanel.cs index ecbdcc7..736eb39 100644 --- a/BandagedBD/Panels/InstallConfigPanel.cs +++ b/BandagedBD/Panels/InstallConfigPanel.cs @@ -14,9 +14,9 @@ namespace BandagedBD.Panels { public PanelTypes NextPanel => PanelTypes.Install; public bool shouldRestart => cbShouldRestart.Checked; - public string[] paths => Utilities.GetLocalPaths(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 string[] paths => Utilities.GetLocalPaths(discordLocator.stable, discordLocator.canary, discordLocator.ptb, discordLocator.development); + public string[] executables => Utilities.GetExecutables(discordLocator.stable, discordLocator.canary, discordLocator.ptb, discordLocator.development); + public string[] roamings => Utilities.GetRoamingPaths(discordLocator.stable, discordLocator.canary, discordLocator.ptb, discordLocator.development); public InstallConfigPanel() { InitializeComponent(); @@ -24,6 +24,7 @@ namespace BandagedBD.Panels { discordLocator.setCheckboxLabel(Discord.Stable, "Install To Stable"); discordLocator.setCheckboxLabel(Discord.Canary, "Install To Canary"); discordLocator.setCheckboxLabel(Discord.PTB, "Install To PTB"); + discordLocator.setCheckboxLabel(Discord.Development, "Install to Development"); discordLocator.OnCheckedChange += OnCheckedChange; } @@ -34,12 +35,17 @@ namespace BandagedBD.Panels { } private void OnCheckedChange(object sender, EventArgs e) { - if (discordLocator.stable || discordLocator.canary || discordLocator.ptb) Window.btnNext.ShowEnable("Install"); + if (discordLocator.stable || discordLocator.canary || discordLocator.ptb || discordLocator.development) Window.btnNext.ShowEnable("Install"); else Window.btnNext.ShowDisable("Install"); } private void InstallConfigPanel_Load(object sender, EventArgs e) { } + + private void discordLocator_Load(object sender, EventArgs e) + { + + } } } diff --git a/BandagedBD/Panels/RepairConfigPanel.Designer.cs b/BandagedBD/Panels/RepairConfigPanel.Designer.cs index d92b80e..91db2a1 100644 --- a/BandagedBD/Panels/RepairConfigPanel.Designer.cs +++ b/BandagedBD/Panels/RepairConfigPanel.Designer.cs @@ -46,7 +46,7 @@ this.label2.AutoSize = true; this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.ForeColor = global::BandagedBD.Properties.Settings.Default.TextColor; - this.label2.Location = new System.Drawing.Point(6, 212); + this.label2.Location = new System.Drawing.Point(6, 239); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(292, 13); this.label2.TabIndex = 25; @@ -60,7 +60,7 @@ this.cbBootLoop.BoxForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(62)))), ((int)(((byte)(130)))), ((int)(((byte)(229))))); this.cbBootLoop.Cursor = System.Windows.Forms.Cursors.Hand; this.cbBootLoop.ForeColor = global::BandagedBD.Properties.Settings.Default.TextColor; - this.cbBootLoop.Location = new System.Drawing.Point(120, 238); + this.cbBootLoop.Location = new System.Drawing.Point(120, 265); this.cbBootLoop.Name = "cbBootLoop"; this.cbBootLoop.Size = new System.Drawing.Size(121, 17); this.cbBootLoop.TabIndex = 26; @@ -75,7 +75,7 @@ this.cbInfinite.BoxForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(62)))), ((int)(((byte)(130)))), ((int)(((byte)(229))))); this.cbInfinite.Cursor = System.Windows.Forms.Cursors.Hand; this.cbInfinite.ForeColor = global::BandagedBD.Properties.Settings.Default.TextColor; - this.cbInfinite.Location = new System.Drawing.Point(120, 272); + this.cbInfinite.Location = new System.Drawing.Point(120, 299); this.cbInfinite.Name = "cbInfinite"; this.cbInfinite.Size = new System.Drawing.Size(167, 17); this.cbInfinite.TabIndex = 27; @@ -90,7 +90,7 @@ this.cbError.BoxForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(62)))), ((int)(((byte)(130)))), ((int)(((byte)(229))))); this.cbError.Cursor = System.Windows.Forms.Cursors.Hand; this.cbError.ForeColor = global::BandagedBD.Properties.Settings.Default.TextColor; - this.cbError.Location = new System.Drawing.Point(358, 272); + this.cbError.Location = new System.Drawing.Point(358, 299); this.cbError.Name = "cbError"; this.cbError.Size = new System.Drawing.Size(176, 17); this.cbError.TabIndex = 28; @@ -105,7 +105,7 @@ this.cbUninjected.BoxForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(62)))), ((int)(((byte)(130)))), ((int)(((byte)(229))))); this.cbUninjected.Cursor = System.Windows.Forms.Cursors.Hand; this.cbUninjected.ForeColor = global::BandagedBD.Properties.Settings.Default.TextColor; - this.cbUninjected.Location = new System.Drawing.Point(358, 238); + this.cbUninjected.Location = new System.Drawing.Point(358, 265); this.cbUninjected.Name = "cbUninjected"; this.cbUninjected.Size = new System.Drawing.Size(218, 17); this.cbUninjected.TabIndex = 29; @@ -120,8 +120,9 @@ this.discordLocator.BackColor = System.Drawing.Color.Transparent; this.discordLocator.Location = new System.Drawing.Point(0, 2); this.discordLocator.Name = "discordLocator"; - this.discordLocator.Size = new System.Drawing.Size(662, 175); + this.discordLocator.Size = new System.Drawing.Size(662, 202); this.discordLocator.TabIndex = 30; + this.discordLocator.Load += new System.EventHandler(this.discordLocator_Load); // // label1 // @@ -129,7 +130,7 @@ this.label1.AutoSize = true; this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128))); this.label1.ForeColor = global::BandagedBD.Properties.Settings.Default.TextColor; - this.label1.Location = new System.Drawing.Point(141, 307); + this.label1.Location = new System.Drawing.Point(141, 334); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(144, 13); this.label1.TabIndex = 31; @@ -144,7 +145,7 @@ this.linkLabel1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128))); this.linkLabel1.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline; this.linkLabel1.LinkColor = global::BandagedBD.Properties.Settings.Default.Accent; - this.linkLabel1.Location = new System.Drawing.Point(328, 307); + this.linkLabel1.Location = new System.Drawing.Point(328, 334); this.linkLabel1.Name = "linkLabel1"; this.linkLabel1.Size = new System.Drawing.Size(114, 13); this.linkLabel1.TabIndex = 32; @@ -158,7 +159,7 @@ this.label3.Anchor = System.Windows.Forms.AnchorStyles.Top; this.label3.AutoSize = true; this.label3.ForeColor = global::BandagedBD.Properties.Settings.Default.TextColor; - this.label3.Location = new System.Drawing.Point(6, 184); + this.label3.Location = new System.Drawing.Point(6, 211); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(95, 13); this.label3.TabIndex = 34; @@ -175,7 +176,7 @@ this.cbShouldRestart.Cursor = System.Windows.Forms.Cursors.Hand; this.cbShouldRestart.FlatAppearance.CheckedBackColor = System.Drawing.Color.Transparent; this.cbShouldRestart.ForeColor = global::BandagedBD.Properties.Settings.Default.TextColor; - this.cbShouldRestart.Location = new System.Drawing.Point(120, 183); + this.cbShouldRestart.Location = new System.Drawing.Point(120, 210); this.cbShouldRestart.Name = "cbShouldRestart"; this.cbShouldRestart.Size = new System.Drawing.Size(162, 17); this.cbShouldRestart.TabIndex = 33; @@ -198,7 +199,7 @@ this.Controls.Add(this.cbBootLoop); this.Controls.Add(this.label2); this.Name = "RepairConfigPanel"; - this.Size = new System.Drawing.Size(662, 335); + this.Size = new System.Drawing.Size(662, 375); this.ResumeLayout(false); this.PerformLayout(); diff --git a/BandagedBD/Panels/RepairConfigPanel.cs b/BandagedBD/Panels/RepairConfigPanel.cs index 04e3d42..3c8d848 100644 --- a/BandagedBD/Panels/RepairConfigPanel.cs +++ b/BandagedBD/Panels/RepairConfigPanel.cs @@ -13,9 +13,9 @@ namespace BandagedBD.Panels { public string Title => "Repair Setup"; public UserControl Control => this; - public string[] localPaths => Utilities.GetLocalPaths(discordLocator.stable, discordLocator.canary, discordLocator.ptb, "resources\\app"); - public string[] roamingPaths => Utilities.GetRoamingPaths(discordLocator.stable, discordLocator.canary, discordLocator.ptb); - public string[] executables => Utilities.GetExecutables(discordLocator.stable, discordLocator.canary, discordLocator.ptb); + public string[] localPaths => Utilities.GetLocalPaths(discordLocator.stable, discordLocator.canary, discordLocator.ptb, discordLocator.development, "resources\\app"); + public string[] roamingPaths => Utilities.GetRoamingPaths(discordLocator.stable, discordLocator.canary, discordLocator.ptb, discordLocator.development); + public string[] executables => Utilities.GetExecutables(discordLocator.stable, discordLocator.canary, discordLocator.ptb, discordLocator.development); public bool shouldDeleteRoaming => cbError.Checked || cbBootLoop.Checked; public bool shouldDeleteLocal => cbBootLoop.Checked; @@ -29,6 +29,7 @@ namespace BandagedBD.Panels { discordLocator.setCheckboxLabel(Discord.Stable, "Repair On Stable"); discordLocator.setCheckboxLabel(Discord.Canary, "Repair On Canary"); discordLocator.setCheckboxLabel(Discord.PTB, "Repair On PTB"); + discordLocator.setCheckboxLabel(Discord.Development, "Repair On Development"); discordLocator.OnCheckedChange += OnCheckedChange; cbError.CheckedChanged += OnCheckedChange; cbBootLoop.CheckedChanged += OnCheckedChange; @@ -43,7 +44,7 @@ namespace BandagedBD.Panels { } private void OnCheckedChange(object sender, EventArgs e) { - bool location = discordLocator.stable || discordLocator.canary || discordLocator.ptb; + bool location = discordLocator.stable || discordLocator.canary || discordLocator.ptb || discordLocator.development; bool problem = cbError.Checked || cbBootLoop.Checked || cbUninjected.Checked || cbInfinite.Checked; if (location && problem) Window.btnNext.ShowEnable("Repair"); else Window.btnNext.ShowDisable("Repair"); @@ -53,5 +54,9 @@ namespace BandagedBD.Panels { Utilities.OpenProcess("https://0x71.cc/bd/troubleshoot/"); } + private void discordLocator_Load(object sender, EventArgs e) + { + + } } } diff --git a/BandagedBD/Panels/UninstallConfigPanel.Designer.cs b/BandagedBD/Panels/UninstallConfigPanel.Designer.cs index 1805aa8..55cd9d1 100644 --- a/BandagedBD/Panels/UninstallConfigPanel.Designer.cs +++ b/BandagedBD/Panels/UninstallConfigPanel.Designer.cs @@ -43,7 +43,7 @@ this.userData.Cursor = System.Windows.Forms.Cursors.Hand; this.userData.FlatAppearance.CheckedBackColor = System.Drawing.Color.Transparent; this.userData.ForeColor = global::BandagedBD.Properties.Settings.Default.TextColor; - this.userData.Location = new System.Drawing.Point(9, 209); + this.userData.Location = new System.Drawing.Point(15, 232); this.userData.Name = "userData"; this.userData.Size = new System.Drawing.Size(170, 17); this.userData.TabIndex = 5; @@ -55,7 +55,7 @@ this.label1.Anchor = System.Windows.Forms.AnchorStyles.Top; this.label1.AutoSize = true; this.label1.ForeColor = global::BandagedBD.Properties.Settings.Default.TextColor; - this.label1.Location = new System.Drawing.Point(6, 183); + this.label1.Location = new System.Drawing.Point(12, 206); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(95, 13); this.label1.TabIndex = 7; @@ -72,7 +72,7 @@ this.cbShouldRestart.Cursor = System.Windows.Forms.Cursors.Hand; this.cbShouldRestart.FlatAppearance.CheckedBackColor = System.Drawing.Color.Transparent; this.cbShouldRestart.ForeColor = global::BandagedBD.Properties.Settings.Default.TextColor; - this.cbShouldRestart.Location = new System.Drawing.Point(9, 232); + this.cbShouldRestart.Location = new System.Drawing.Point(15, 255); this.cbShouldRestart.Name = "cbShouldRestart"; this.cbShouldRestart.Size = new System.Drawing.Size(162, 17); this.cbShouldRestart.TabIndex = 34; @@ -87,7 +87,7 @@ this.discordLocator.BackColor = System.Drawing.Color.Transparent; this.discordLocator.Location = new System.Drawing.Point(0, 3); this.discordLocator.Name = "discordLocator"; - this.discordLocator.Size = new System.Drawing.Size(662, 177); + this.discordLocator.Size = new System.Drawing.Size(662, 187); this.discordLocator.TabIndex = 6; // // UninstallConfigPanel @@ -100,7 +100,7 @@ this.Controls.Add(this.userData); this.Controls.Add(this.discordLocator); this.Name = "UninstallConfigPanel"; - this.Size = new System.Drawing.Size(662, 284); + this.Size = new System.Drawing.Size(662, 294); this.ResumeLayout(false); this.PerformLayout(); diff --git a/BandagedBD/Panels/UninstallConfigPanel.cs b/BandagedBD/Panels/UninstallConfigPanel.cs index db77fd9..6213e5e 100644 --- a/BandagedBD/Panels/UninstallConfigPanel.cs +++ b/BandagedBD/Panels/UninstallConfigPanel.cs @@ -16,12 +16,12 @@ namespace BandagedBD.Panels { public string[] pathsToDelete { get { - List paths = new List(Utilities.GetLocalPaths(discordLocator.stable, discordLocator.canary, discordLocator.ptb, "resources\\app")); + List paths = new List(Utilities.GetLocalPaths(discordLocator.stable, discordLocator.canary, discordLocator.ptb, discordLocator.development, "resources\\app")); if (userData.Checked) paths.Add($"{Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)}\\BetterDiscord"); return paths.ToArray(); } } - public string[] executables => Utilities.GetExecutables(discordLocator.stable, discordLocator.canary, discordLocator.ptb); + public string[] executables => Utilities.GetExecutables(discordLocator.stable, discordLocator.canary, discordLocator.ptb, discordLocator.development); public bool shouldRestart => cbShouldRestart.Checked; public UninstallConfigPanel() { @@ -30,6 +30,7 @@ namespace BandagedBD.Panels { discordLocator.setCheckboxLabel(Discord.Stable, "Remove from Stable"); discordLocator.setCheckboxLabel(Discord.Canary, "Remove from Canary"); discordLocator.setCheckboxLabel(Discord.PTB, "Remove from PTB"); + discordLocator.setCheckboxLabel(Discord.Development, "Remove from Development"); discordLocator.OnCheckedChange += OnCheckedChange; } @@ -40,7 +41,7 @@ namespace BandagedBD.Panels { } private void OnCheckedChange(object sender, EventArgs e) { - if (discordLocator.stable || discordLocator.canary || discordLocator.ptb) Window.btnNext.ShowEnable("Uninstall"); + if (discordLocator.stable || discordLocator.canary || discordLocator.ptb || discordLocator.development) Window.btnNext.ShowEnable("Uninstall"); else Window.btnNext.ShowDisable("Uninstall"); } diff --git a/BandagedBD/Utilities.cs b/BandagedBD/Utilities.cs index 3b04d1a..171e552 100644 --- a/BandagedBD/Utilities.cs +++ b/BandagedBD/Utilities.cs @@ -9,7 +9,7 @@ using System.Windows.Forms; namespace BandagedBD { - public enum Discord { Stable, Canary, PTB }; + public enum Discord { Stable, Canary, PTB, Development }; public class Utilities { public static readonly Regex _matcher = new Regex(@"[0-9]+\.[0-9]+\.[0-9]+"); @@ -29,9 +29,14 @@ namespace BandagedBD { public static string PtbPathPD => PDPath("DiscordPTB"); public static string PtbPathEXE => EXEPath(GetProcess("DiscordPTB")); + public static string DevelopmentPath => LADPath("DiscordDevelopment"); + public static string DevelopmentPathPD => PDPath("DiscordDevelopment"); + public static string DevelopmentPathEXE => EXEPath(GetProcess("DiscordDevelopment")); + public static string CurrentStablePath = Directory.Exists(StablePathEXE) ? StablePathEXE : Directory.Exists(StablePathPD) ? StablePathPD : Directory.Exists(StablePath) ? StablePath : null; public static string CurrentCanaryPath = Directory.Exists(CanaryPathEXE) ? CanaryPathEXE : Directory.Exists(CanaryPathPD) ? CanaryPathPD : Directory.Exists(CanaryPath) ? CanaryPath : null; public static string CurrentPtbPath = Directory.Exists(PtbPathEXE) ? PtbPathEXE : Directory.Exists(PtbPathPD) ? PtbPathPD : Directory.Exists(PtbPath) ? PtbPath : null; + public static string CurrentDevelopmentPath = Directory.Exists(DevelopmentPathEXE) ? DevelopmentPathEXE : Directory.Exists(DevelopmentPathPD) ? DevelopmentPathPD : Directory.Exists(DevelopmentPath) ? DevelopmentPath : null; public static void OpenProcess(string url) { Process.Start(url); @@ -96,30 +101,34 @@ namespace BandagedBD { return currentExecutable; } - public static string[] GetExecutables(bool stable, bool canary, bool ptb) { + public static string[] GetExecutables(bool stable, bool canary, bool ptb, bool development) { List exes = new List(); if (stable) exes.Add("Discord"); if (canary) exes.Add("DiscordCanary"); if (ptb) exes.Add("DiscordPTB"); + if (development) exes.Add("DiscordDevelopment"); return exes.ToArray(); } - public static string[] GetRoamingPaths(bool stable, bool canary, bool ptb, string subFolder = "") { + public static string[] GetRoamingPaths(bool stable, bool canary, bool ptb, bool development, string subFolder = "") { List roaming = new List(); var stableFolder = GetRoaming("discord"); var canaryFolder = GetRoaming("discordcanary"); var ptbFolder = GetRoaming("discordptb"); + var developmentFolder = GetRoaming("discorddevelopment"); if (stable && stableFolder != string.Empty) roaming.Add($"{stableFolder}\\{subFolder}"); if (canary && canaryFolder != string.Empty) roaming.Add($"{canaryFolder}\\{subFolder}"); if (ptb && ptbFolder != string.Empty) roaming.Add($"{ptbFolder}\\{subFolder}"); + if (development && developmentFolder != string.Empty) roaming.Add($"{developmentFolder}\\{subFolder}"); return roaming.ToArray(); } - public static string[] GetLocalPaths(bool stable, bool canary, bool ptb, string subFolder = "") { + public static string[] GetLocalPaths(bool stable, bool canary, bool ptb, bool development, string subFolder = "") { List paths = new List(); if (stable) paths.Add($"{CurrentStablePath}\\{subFolder}"); if (canary) paths.Add($"{CurrentCanaryPath}\\{subFolder}"); if (ptb) paths.Add($"{CurrentPtbPath}\\{subFolder}"); + if (development) paths.Add($"{CurrentDevelopmentPath}\\{subFolder}"); return paths.ToArray(); } @@ -127,6 +136,7 @@ namespace BandagedBD { if (which == Discord.Stable) return "Discord"; if (which == Discord.Canary) return "DiscordCanary"; if (which == Discord.PTB) return "DiscordPTB"; + if (which == Discord.Development) return "DiscordDevelopment"; return ""; } @@ -150,6 +160,7 @@ namespace BandagedBD { if (which == Discord.Stable) CurrentStablePath = baseFolder; if (which == Discord.Canary) CurrentCanaryPath = baseFolder; if (which == Discord.PTB) CurrentPtbPath = baseFolder; + if (which == Discord.Development) CurrentDevelopmentPath = baseFolder; } }