diff --git a/Rectify11Installer/Core/Backend/Common.cs b/Rectify11Installer/Core/Backend/Common.cs
index c30796b7c..8778e4d6b 100644
--- a/Rectify11Installer/Core/Backend/Common.cs
+++ b/Rectify11Installer/Core/Backend/Common.cs
@@ -1,10 +1,10 @@
-using KPreisser.UI;
-using Microsoft.Win32;
+using Microsoft.Win32;
using Rectify11Installer.Win32;
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
+using System.Windows.Forms;
namespace Rectify11Installer.Core
{
@@ -196,21 +196,22 @@ public static bool InstallRuntimes()
/// link to download the app
public static void RuntimeInstallError(string app, string info, string link)
{
- TaskDialog td = new();
- td.Page.Text = Rectify11Installer.Strings.Rectify11.rtInstallFailPart1 + app + Rectify11Installer.Strings.Rectify11.rtInstallFailPart2;
- td.Page.Instruction = Rectify11Installer.Strings.Rectify11.rtInstallFailInstruc;
- td.Page.Title = Rectify11Installer.Strings.Rectify11.Title;
- td.Page.StandardButtons = TaskDialogButtons.OK;
- td.Page.Icon = TaskDialogStandardIcon.SecurityWarningYellowBar;
- td.Page.EnableHyperlinks = true;
+ TaskDialogPage td = new();
+ td.Text = Strings.Rectify11.rtInstallFailPart1 + app + Strings.Rectify11.rtInstallFailPart2;
+ td.Heading = Strings.Rectify11.rtInstallFailInstruc;
+ td.Caption = Strings.Rectify11.Title;
+ td.Buttons = [TaskDialogButton.OK];
+ td.Icon = TaskDialogIcon.ShieldErrorRedBar;
+ td.EnableLinks = true;
+
TaskDialogExpander tde = new();
tde.Text = info + " \nDownload from here";
tde.Expanded = false;
- tde.ExpandFooterArea = true;
- tde.CollapsedButtonText = Rectify11Installer.Strings.Rectify11.moreInfo;
- tde.ExpandedButtonText = Rectify11Installer.Strings.Rectify11.lessInfo;
- td.Page.Expander = tde;
- td.Show();
+ tde.CollapsedButtonText = Strings.Rectify11.moreInfo;
+ tde.ExpandedButtonText = Strings.Rectify11.lessInfo;
+
+ td.Expander = tde;
+ TaskDialog.ShowDialog(td);
}
///
diff --git a/Rectify11Installer/Core/Backend/Icons.cs b/Rectify11Installer/Core/Backend/Icons.cs
index 8289ff45f..7a657cbd5 100644
--- a/Rectify11Installer/Core/Backend/Icons.cs
+++ b/Rectify11Installer/Core/Backend/Icons.cs
@@ -1,14 +1,11 @@
-using KPreisser.UI;
-using Microsoft.VisualBasic;
+using Microsoft.VisualBasic;
using Microsoft.Win32;
using System;
using System.Collections.Generic;
-using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Reflection;
using static System.Environment;
-using static System.Windows.Forms.VisualStyles.VisualStyleElement;
namespace Rectify11Installer.Core
{
diff --git a/Rectify11Installer/Core/Backend/Themes.cs b/Rectify11Installer/Core/Backend/Themes.cs
index ba69d6e72..92a72787f 100644
--- a/Rectify11Installer/Core/Backend/Themes.cs
+++ b/Rectify11Installer/Core/Backend/Themes.cs
@@ -6,7 +6,6 @@
using System.Diagnostics;
using System.IO;
using System.Windows.Forms;
-using static Rectify11Installer.Win32.NativeMethods;
namespace Rectify11Installer.Core
{
diff --git a/Rectify11Installer/Core/Helpers.cs b/Rectify11Installer/Core/Helpers.cs
index 44b95a4ad..0baceb2ad 100644
--- a/Rectify11Installer/Core/Helpers.cs
+++ b/Rectify11Installer/Core/Helpers.cs
@@ -1,5 +1,4 @@
-using KPreisser.UI;
-using Microsoft.VisualBasic;
+using Microsoft.VisualBasic;
using Microsoft.Win32;
using Rectify11Installer.Pages;
using Rectify11Installer.Win32;
@@ -10,6 +9,7 @@
using System.IO;
using System.Reflection;
using System.Text;
+using System.Windows.Forms;
namespace Rectify11Installer.Core
{
@@ -21,11 +21,12 @@ public static bool CheckIfUpdatesPending()
if (Variables.skipUpdateCheck) return true;
if (!RebootRequired()) return true;
- TaskDialog.Show(text: Strings.Rectify11.updatePending,
- instruction: "Compatibility Error",
- title: Strings.Rectify11.Title,
- buttons: TaskDialogButtons.OK,
- icon: TaskDialogStandardIcon.SecurityErrorRedBar);
+ TaskDialogPage pg = new TaskDialogPage();
+ pg.Text = Strings.Rectify11.updatePending;
+ pg.Caption = Strings.Rectify11.Title;
+ pg.Heading = "Compatibility check failed";
+ pg.Icon = TaskDialogIcon.ShieldErrorRedBar;
+ TaskDialog.ShowDialog(pg);
return false;
}
diff --git a/Rectify11Installer/Pages/DefenderPage.cs b/Rectify11Installer/Pages/DefenderPage.cs
index 8ef708fb3..57997f80c 100644
--- a/Rectify11Installer/Pages/DefenderPage.cs
+++ b/Rectify11Installer/Pages/DefenderPage.cs
@@ -1,14 +1,6 @@
-using KPreisser.UI;
-using Rectify11Installer.Core;
-using Rectify11Installer.Win32;
-using System;
-using System.Drawing;
-using System.IO;
-using System.Threading.Tasks;
-using System.Windows.Forms;
namespace Rectify11Installer.Pages
{
- public partial class DefenderPage : WizardPage
+ public partial class DefenderPage : WizardPage
{
#region Classes
#endregion
diff --git a/Rectify11Installer/Pages/ProgressPage.cs b/Rectify11Installer/Pages/ProgressPage.cs
index 8c47b5a63..c38731042 100644
--- a/Rectify11Installer/Pages/ProgressPage.cs
+++ b/Rectify11Installer/Pages/ProgressPage.cs
@@ -1,4 +1,3 @@
-using KPreisser.UI;
using Rectify11Installer.Core;
using Rectify11Installer.Win32;
using System;
@@ -8,7 +7,7 @@
using System.Windows.Forms;
namespace Rectify11Installer.Pages
{
- public partial class ProgressPage : WizardPage
+ public partial class ProgressPage : WizardPage
{
#region Variables
private FrmWizard frmwiz;
@@ -149,10 +148,7 @@ private async void NavigationHelper_OnNavigate(object sender, EventArgs e)
{
Common.Cleanup();
Logger.CommitLog();
- KPreisser.UI.TaskDialog.Show(text: Rectify11Installer.Strings.Rectify11.r11InstallErrorPart1 + Path.Combine(Variables.r11Folder, "installer.log") + Rectify11Installer.Strings.Rectify11.r11InstallErrorPart2,
- title: "Error",
- buttons: TaskDialogButtons.OK,
- icon: TaskDialogStandardIcon.Error);
+ MessageBox.Show(Strings.Rectify11.r11InstallErrorPart1 + Path.Combine(Variables.r11Folder, "installer.log") + Strings.Rectify11.r11InstallErrorPart2, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
Application.Exit();
}
//Logger.CommitLog();
@@ -184,10 +180,7 @@ private async void NavigationHelper_OnNavigate(object sender, EventArgs e)
{
Common.Cleanup();
Logger.CommitLog();
- KPreisser.UI.TaskDialog.Show(text: Rectify11Installer.Strings.Rectify11.r11InstallErrorPart1 + Path.Combine(Variables.r11Folder, "installer.log") + Rectify11Installer.Strings.Rectify11.r11InstallErrorPart2,
- title: "Error",
- buttons: TaskDialogButtons.OK,
- icon: TaskDialogStandardIcon.Error);
+ MessageBox.Show(text: Strings.Rectify11.r11InstallErrorPart1 + Path.Combine(Variables.r11Folder, "installer.log") + Strings.Rectify11.r11InstallErrorPart2, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
Application.Exit();
}
Logger.CommitLog();
@@ -199,10 +192,7 @@ private async void NavigationHelper_OnNavigate(object sender, EventArgs e)
{
Common.Cleanup();
Logger.CommitLog();
- KPreisser.UI.TaskDialog.Show(text: Rectify11Installer.Strings.Rectify11.r11InstallErrorPart1 + Path.Combine(Variables.r11Folder, "installer.log") + Rectify11Installer.Strings.Rectify11.r11InstallErrorPart2,
- title: "Error",
- buttons: TaskDialogButtons.OK,
- icon: TaskDialogStandardIcon.Error);
+ MessageBox.Show(Strings.Rectify11.r11InstallErrorPart1 + Path.Combine(Variables.r11Folder, "installer.log") + Strings.Rectify11.r11InstallErrorPart2, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
Application.Exit();
}
Logger.CommitLog();
diff --git a/Rectify11Installer/Program.cs b/Rectify11Installer/Program.cs
index 373d35de7..3d59b1ede 100644
--- a/Rectify11Installer/Program.cs
+++ b/Rectify11Installer/Program.cs
@@ -26,7 +26,14 @@ private static void Main(string[] args)
bool isAnotherInstanceOpen = !mutex.WaitOne(TimeSpan.Zero);
if (isAnotherInstanceOpen)
{
- MessageBox.Show("Another instance of the rectify11 setup is already running.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ // TODO localize
+ TaskDialogPage pg = new TaskDialogPage();
+ pg.Heading = "Installer is already running";
+ pg.Text = "Another instance of the rectify11 setup is already running.";
+ pg.Icon = TaskDialogIcon.ShieldGrayBar;
+ pg.Buttons = [TaskDialogButton.OK];
+ pg.Caption = Strings.Rectify11.Title;
+ TaskDialog.ShowDialog(pg);
return;
}
@@ -92,16 +99,16 @@ private static bool ShowCompatibilityMessage(bool CanAllow, string header, strin
if (CanAllow)
{
// in this case, we can skip the warning
- bool yes = false;
TaskDialogPage pg = new TaskDialogPage();
pg.Heading = text;
pg.Text = header;
pg.Buttons = [TaskDialogButton.OK];
pg.Icon = TaskDialogIcon.ShieldWarningYellowBar;
pg.EnableLinks = true;
+ pg.Caption = Strings.Rectify11.Title;
TaskDialogExpander tde = new();
- tde.Text = "Run anyway (not recommended)";
+ tde.Text = "Run anyway (not recommended)";
tde.Expanded = false;
tde.CollapsedButtonText = Strings.Rectify11.moreInfo;
tde.ExpandedButtonText = Strings.Rectify11.lessInfo;
@@ -110,7 +117,7 @@ private static bool ShowCompatibilityMessage(bool CanAllow, string header, strin
pg.LinkClicked += delegate (object s, TaskDialogLinkClickedEventArgs e)
{
- if (e.LinkHref == "link1")
+ if (e.LinkHref == "lnkRun")
{
pg.BoundDialog.Close();
}
@@ -127,6 +134,7 @@ private static bool ShowCompatibilityMessage(bool CanAllow, string header, strin
pg.Heading = text;
pg.Buttons = [TaskDialogButton.OK];
pg.Icon = TaskDialogIcon.ShieldErrorRedBar;
+ pg.Caption = Strings.Rectify11.Title;
TaskDialog.ShowDialog(pg);
return false;
}
diff --git a/Rectify11Installer/Rectify11Installer.csproj b/Rectify11Installer/Rectify11Installer.csproj
index dfb6a5bb5..2e57e7f7b 100644
--- a/Rectify11Installer/Rectify11Installer.csproj
+++ b/Rectify11Installer/Rectify11Installer.csproj
@@ -30,7 +30,6 @@
-
diff --git a/Rectify11Installer/frmWizard.cs b/Rectify11Installer/frmWizard.cs
index 99471285b..ae6289a3e 100644
--- a/Rectify11Installer/frmWizard.cs
+++ b/Rectify11Installer/frmWizard.cs
@@ -1,5 +1,4 @@
-using KPreisser.UI;
-using Microsoft.Win32;
+using Microsoft.Win32;
using Rectify11Installer.Core;
using Rectify11Installer.Pages;
using Rectify11Installer.Win32;
@@ -169,10 +168,7 @@ private void FrmWizard_FormClosing(object sender, FormClosingEventArgs e)
if (Variables.IsUninstall) { }
else if (!Variables.isInstall)
{
- if (KPreisser.UI.TaskDialog.Show(text: Strings.Rectify11.exitText,
- title: Strings.Rectify11.Title,
- buttons: TaskDialogButtons.Yes | TaskDialogButtons.No,
- icon: TaskDialogStandardIcon.Information) == TaskDialogResult.No) e.Cancel = true;
+ if (MessageBox.Show(Strings.Rectify11.exitText, Strings.Rectify11.Title, MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.No) e.Cancel = true;
}
else if (e.CloseReason == CloseReason.UserClosing) e.Cancel = true;
Theme.OnThemeChanged -= SystemEvents_UserPreferenceChanged;
@@ -291,11 +287,7 @@ private void UninstallButton_Click(object sender, EventArgs e)
{
if (Helper.CheckIfUpdatesPending())
{
- var res = KPreisser.UI.TaskDialog.Show(text: Strings.Rectify11.uninstallConfirmText,
- title: Strings.Rectify11.uninstallTitle,
- buttons: TaskDialogButtons.Yes | TaskDialogButtons.No,
- icon: TaskDialogStandardIcon.Information);
- if (res == TaskDialogResult.Yes)
+ if (MessageBox.Show(Strings.Rectify11.uninstallConfirmText, Strings.Rectify11.uninstallTitle, MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes)
{
Variables.IsUninstall = true;
Navigate(RectifyPages.ProgressPage);