From 21a8e4596af3d9b9984edc1406bcb34b1a73a651 Mon Sep 17 00:00:00 2001 From: rjindael Date: Fri, 28 Jul 2023 06:30:56 -0700 Subject: [PATCH] chore: revamp interfaces --- Kiseki.Launcher.Windows/Launcher.cs | 20 +++++++++++++++++++ Kiseki.Launcher.Windows/MainWindow.cs | 17 +--------------- .../{ProtocolHandler.cs => Protocol.cs} | 2 +- Kiseki.Launcher/Interfaces.cs | 14 ++++++------- 4 files changed, 29 insertions(+), 24 deletions(-) create mode 100644 Kiseki.Launcher.Windows/Launcher.cs rename Kiseki.Launcher.Windows/{ProtocolHandler.cs => Protocol.cs} (95%) diff --git a/Kiseki.Launcher.Windows/Launcher.cs b/Kiseki.Launcher.Windows/Launcher.cs new file mode 100644 index 0000000..74a4d6d --- /dev/null +++ b/Kiseki.Launcher.Windows/Launcher.cs @@ -0,0 +1,20 @@ +namespace Kiseki.Launcher.Windows +{ + public class Launcher : ILauncher + { + public void Register() + { + throw new NotImplementedException(); + } + + public void Unregister() + { + throw new NotImplementedException(); + } + + public void CreateShortcuts() + { + throw new NotImplementedException(); + } + } +} \ No newline at end of file diff --git a/Kiseki.Launcher.Windows/MainWindow.cs b/Kiseki.Launcher.Windows/MainWindow.cs index b8ea5ad..0981797 100644 --- a/Kiseki.Launcher.Windows/MainWindow.cs +++ b/Kiseki.Launcher.Windows/MainWindow.cs @@ -3,7 +3,7 @@ namespace Kiseki.Launcher.Windows { [System.ComponentModel.DesignerCategory("")] - public class MainWindow : Form, IMainWindow + public class MainWindow : Form { private readonly TaskDialogButton CloseButton; private readonly TaskDialogPage Page; @@ -83,20 +83,5 @@ namespace Kiseki.Launcher.Windows TaskDialog.ShowDialog(Page); } - - public void Register() - { - throw new NotImplementedException(); - } - - public void Unregister() - { - throw new NotImplementedException(); - } - - public void CreateShortcuts() - { - throw new NotImplementedException(); - } } } diff --git a/Kiseki.Launcher.Windows/ProtocolHandler.cs b/Kiseki.Launcher.Windows/Protocol.cs similarity index 95% rename from Kiseki.Launcher.Windows/ProtocolHandler.cs rename to Kiseki.Launcher.Windows/Protocol.cs index 01b04e5..d6d4b22 100644 --- a/Kiseki.Launcher.Windows/ProtocolHandler.cs +++ b/Kiseki.Launcher.Windows/Protocol.cs @@ -2,7 +2,7 @@ using Microsoft.Win32; namespace Kiseki.Launcher.Windows { - public class ProtocolHandler : IProtocolHandler + public class Protocol : IProtocol { public void Register(string key, string name, string handler) { diff --git a/Kiseki.Launcher/Interfaces.cs b/Kiseki.Launcher/Interfaces.cs index 28b8a33..891ef08 100644 --- a/Kiseki.Launcher/Interfaces.cs +++ b/Kiseki.Launcher/Interfaces.cs @@ -1,15 +1,15 @@ namespace Kiseki.Launcher { - interface IProtocolHandler - { - void Register(string key, string name, string handler); - void Unregister(string key); - } - - interface IMainWindow + interface ILauncher { void Register(); void Unregister(); void CreateShortcuts(); } + + interface IProtocol + { + void Register(string key, string name, string handler); + void Unregister(string key); + } } \ No newline at end of file