diff --git a/GUI/MainForm.cs b/GUI/MainForm.cs index 1ca5644..900c2dc 100644 --- a/GUI/MainForm.cs +++ b/GUI/MainForm.cs @@ -1,11 +1,10 @@ using Common; - namespace GUI; sealed public partial class MainForm : Form { public event DataRequest PathRequest; - public event DataRequest? RecipientRequest; + public event DataRequest? RecipientRequest; public MainForm(DataRequest PathRequest, DataRequest? RecipientRequest = null) { @@ -29,15 +28,15 @@ sealed public partial class MainForm : Form private void OpenPasswordGenerator(object sender, EventArgs e) { - if (RecipientRequest != null) - { - GeneratePassword gp = new GeneratePassword(PathRequest(), RecipientRequest(), ReloadResults, SearchBox.Text); - gp.ShowDialog(); - } - else - { - throw new InvalidOperationException("You cannot use the OpenPasswordGenerator method if you instantiated this form without a RecipientRequest event handler."); - } + if (RecipientRequest != null) + { + GeneratePassword gp = new GeneratePassword(PathRequest(), RecipientRequest(), ReloadResults, SearchBox.Text); + gp.ShowDialog(); + } + else + { + throw new InvalidOperationException("You cannot use the OpenPasswordGenerator method if you instantiated this form without a RecipientRequest event handler."); + } } private void CancelPressed(object sender, EventArgs e) diff --git a/GUI/obj/Debug/net7.0-windows/GUI.csproj.AssemblyReference.cache b/GUI/obj/Debug/net7.0-windows/GUI.csproj.AssemblyReference.cache index 1d778e3..a5eadad 100644 Binary files a/GUI/obj/Debug/net7.0-windows/GUI.csproj.AssemblyReference.cache and b/GUI/obj/Debug/net7.0-windows/GUI.csproj.AssemblyReference.cache differ diff --git a/GUI/obj/Debug/net7.0-windows/Password_Manager.GeneratePassword.resources b/GUI/obj/Debug/net7.0-windows/Password_Manager.GeneratePassword.resources deleted file mode 100644 index 6c05a97..0000000 Binary files a/GUI/obj/Debug/net7.0-windows/Password_Manager.GeneratePassword.resources and /dev/null differ diff --git a/GUI/obj/Debug/net7.0-windows/Password_Manager.MainForm.resources b/GUI/obj/Debug/net7.0-windows/Password_Manager.MainForm.resources deleted file mode 100644 index 6c05a97..0000000 Binary files a/GUI/obj/Debug/net7.0-windows/Password_Manager.MainForm.resources and /dev/null differ diff --git a/GUI/obj/Debug/net7.0-windows/apphost.exe b/GUI/obj/Debug/net7.0-windows/apphost.exe index d3eede5..9a8077a 100644 Binary files a/GUI/obj/Debug/net7.0-windows/apphost.exe and b/GUI/obj/Debug/net7.0-windows/apphost.exe differ