From 95d88f1a8d0d2d2094968f11cd2a6dd2f15583fc Mon Sep 17 00:00:00 2001 From: Stone_Red <56473591+Stone-Red-Code@users.noreply.github.com> Date: Fri, 19 Jun 2026 00:56:46 +0200 Subject: [PATCH] Reorganize project structure --- .gitignore | 2 +- .../Bootloader}/limine.conf | 2 +- .../Cryptography}/CryptoManager.cs | 4 +- Kernel.cs => RemSox.Kernel/Kernel.cs | 14 +++--- {Logging => RemSox.Kernel/Logging}/ILogger.cs | 2 +- .../Logging}/InMemoryLogger.cs | 2 +- .../Logging}/LogEntry.cs | 2 +- .../Logging}/LogSeverity.cs | 2 +- .../Logging}/ProxyLogger.cs | 2 +- ...RandomNumberGeneratorImplementationPlug.cs | 2 +- .../Plugs}/RuntimeExports.cs | 4 +- .../Processes}/CliProcess.cs | 6 +-- .../Processes}/DesktopProcess.cs | 15 ++++--- .../Processes}/RemoteDesktopProcess.cs | 13 +++--- .../Processes}/TerminalProcess.cs | 10 ++--- .../Processes}/TestProcess.cs | 10 ++--- .../Processes}/YesNtInterpreterProcess.cs | 6 +-- .../IPC/InterProcessCommunicator.cs | 2 +- .../Processing}/IPC/Message.cs | 2 +- .../Processing}/Process.cs | 8 ++-- .../Processing}/ProcessManager.cs | 6 +-- .../Processing}/ProcessManiest.cs | 4 +- .../Processing}/ProcessMetrics.cs | 2 +- .../Properties}/launchSettings.json | 2 +- .../RemSox.Kernel.csproj | 5 ++- .../UI}/CLI/CommandManager.cs | 2 +- .../UI}/CLI/Commands/ClearCommand.cs | 2 +- .../UI}/CLI/Commands/HaltCommand.cs | 2 +- .../UI}/CLI/Commands/HelpCommand.cs | 2 +- .../UI}/CLI/Commands/ProcessCommands.cs | 6 +-- .../UI}/CLI/Commands/RebootCommand.cs | 2 +- .../UI}/CLI/Commands/StartGuiCommand.cs | 6 +-- .../CLI/Commands/StartRemoteDesktopCommand.cs | 6 +-- .../UI}/CLI/Commands/StopGuiCommand.cs | 6 +-- .../CLI/Commands/StopRemoteDesktopCommand.cs | 6 +-- .../UI}/CLI/Commands/ViewProcessLogs.cs | 6 +-- .../UI}/CLI/Commands/YesNtCommand.cs | 4 +- {UI => RemSox.Kernel/UI}/CLI/ICommand.cs | 2 +- .../UI}/GUI/Layout/GridLayout.cs | 6 +-- .../UI}/GUI/Layout/LayoutExtensions.cs | 4 +- .../UI}/GUI/Layout/StackLayout.cs | 6 +-- .../UI}/GUI/Rendering/CanvasRenderSource.cs | 7 +-- .../UI}/GUI/Rendering/NetworkRenderSource.cs | 5 ++- .../UI}/GUI/UIEelements/Control.cs | 3 +- .../UI}/GUI/UIEelements/Controls/Button.cs | 5 ++- .../UI}/GUI/UIEelements/Controls/CheckBox.cs | 5 ++- .../UI}/GUI/UIEelements/Controls/Panel.cs | 4 +- .../GUI/UIEelements/Controls/ProgressBar.cs | 4 +- .../GUI/UIEelements/Controls/RadioButton.cs | 5 ++- .../UI}/GUI/UIEelements/Controls/Slider.cs | 5 ++- .../UI}/GUI/UIEelements/Shape.cs | 2 +- .../UI}/GUI/UIEelements/Shapes/Circle.cs | 4 +- .../UI}/GUI/UIEelements/Shapes/Line.cs | 4 +- .../UI}/GUI/UIEelements/Shapes/Pixel.cs | 4 +- .../UI}/GUI/UIEelements/Shapes/Rectangle.cs | 4 +- .../UI}/GUI/UIEelements/Shapes/Text.cs | 4 +- .../UI}/GUI/UIEelements/UIEelement.cs | 6 +-- .../UI}/GUI/Windows/Window.cs | 7 +-- .../UI}/GUI/Windows/WindowLayer.cs | 2 +- .../UI}/GUI/Windows/WindowManager.cs | 7 +-- .../Utils}/CanvasExtensions.cs | 4 +- .../Utils}/ChangedPropertiesTracker.cs | 2 +- .../Utils}/ConcurrentHashSet.cs | 0 .../Utils}/YesNtWindowStatements.cs | 14 +++--- RemSox.Kernel/build-and-run.ps1 | 5 +++ .../Cryptography}/AesGcmCrypto.cs | 4 +- .../Cryptography}/PasswordKeyDeriver.cs | 6 +-- .../Networking}/AesPacketCrypto.cs | 6 +-- .../Networking}/IPacketCrypto.cs | 4 +- .../Networking}/TcpConnection.cs | 4 +- .../Networking}/TcpMessage.cs | 4 +- .../Networking}/TcpRpcBase.cs | 6 +-- .../Networking}/TcpRpcClient.cs | 10 ++--- .../Networking}/TcpRpcServer.cs | 6 +-- RemSox.Shared/RemSox.Shared.csproj | 11 +++++ .../UI}/GUI/Rendering/IRenderSource.cs | 4 +- .../UI}/GUI/Rendering/RenderCommand.cs | 4 +- .../UI}/GUI/Rendering/RenderCommandType.cs | 2 +- {UI => RemSox.Shared/UI}/MouseEvent.cs | 4 +- RemSox.Viewer/Program.cs | 43 +++++++++++++++++++ RemSox.Viewer/RemSox.Viewer.csproj | 12 ++++++ RemSox.slnx | 4 +- build-and-run.ps1 | 7 --- src/C/.gitkeep | 3 -- 84 files changed, 267 insertions(+), 186 deletions(-) rename {Bootloader => RemSox.Kernel/Bootloader}/limine.conf (88%) rename {Cryptography => RemSox.Kernel/Cryptography}/CryptoManager.cs (92%) rename Kernel.cs => RemSox.Kernel/Kernel.cs (93%) rename {Logging => RemSox.Kernel/Logging}/ILogger.cs (88%) rename {Logging => RemSox.Kernel/Logging}/InMemoryLogger.cs (96%) rename {Logging => RemSox.Kernel/Logging}/LogEntry.cs (72%) rename {Logging => RemSox.Kernel/Logging}/LogSeverity.cs (64%) rename {Logging => RemSox.Kernel/Logging}/ProxyLogger.cs (95%) rename {Plugs => RemSox.Kernel/Plugs}/RandomNumberGeneratorImplementationPlug.cs (99%) rename {Plugs => RemSox.Kernel/Plugs}/RuntimeExports.cs (85%) rename {Processes => RemSox.Kernel/Processes}/CliProcess.cs (97%) rename {Processes => RemSox.Kernel/Processes}/DesktopProcess.cs (96%) rename {Processes => RemSox.Kernel/Processes}/RemoteDesktopProcess.cs (96%) rename {Processes => RemSox.Kernel/Processes}/TerminalProcess.cs (97%) rename {Processes => RemSox.Kernel/Processes}/TestProcess.cs (85%) rename {Processes => RemSox.Kernel/Processes}/YesNtInterpreterProcess.cs (90%) rename {Processing => RemSox.Kernel/Processing}/IPC/InterProcessCommunicator.cs (93%) rename {Processing => RemSox.Kernel/Processing}/IPC/Message.cs (68%) rename {Processing => RemSox.Kernel/Processing}/Process.cs (90%) rename {Processing => RemSox.Kernel/Processing}/ProcessManager.cs (98%) rename {Processing => RemSox.Kernel/Processing}/ProcessManiest.cs (92%) rename {Processing => RemSox.Kernel/Processing}/ProcessMetrics.cs (77%) rename {Properties => RemSox.Kernel/Properties}/launchSettings.json (99%) rename RemSox.csproj => RemSox.Kernel/RemSox.Kernel.csproj (96%) rename {UI => RemSox.Kernel/UI}/CLI/CommandManager.cs (98%) rename {UI => RemSox.Kernel/UI}/CLI/Commands/ClearCommand.cs (87%) rename {UI => RemSox.Kernel/UI}/CLI/Commands/HaltCommand.cs (89%) rename {UI => RemSox.Kernel/UI}/CLI/Commands/HelpCommand.cs (91%) rename {UI => RemSox.Kernel/UI}/CLI/Commands/ProcessCommands.cs (95%) rename {UI => RemSox.Kernel/UI}/CLI/Commands/RebootCommand.cs (88%) rename {UI => RemSox.Kernel/UI}/CLI/Commands/StartGuiCommand.cs (85%) rename {UI => RemSox.Kernel/UI}/CLI/Commands/StartRemoteDesktopCommand.cs (89%) rename {UI => RemSox.Kernel/UI}/CLI/Commands/StopGuiCommand.cs (86%) rename {UI => RemSox.Kernel/UI}/CLI/Commands/StopRemoteDesktopCommand.cs (86%) rename {UI => RemSox.Kernel/UI}/CLI/Commands/ViewProcessLogs.cs (90%) rename {UI => RemSox.Kernel/UI}/CLI/Commands/YesNtCommand.cs (88%) rename {UI => RemSox.Kernel/UI}/CLI/ICommand.cs (96%) rename {UI => RemSox.Kernel/UI}/GUI/Layout/GridLayout.cs (93%) rename {UI => RemSox.Kernel/UI}/GUI/Layout/LayoutExtensions.cs (87%) rename {UI => RemSox.Kernel/UI}/GUI/Layout/StackLayout.cs (94%) rename {UI => RemSox.Kernel/UI}/GUI/Rendering/CanvasRenderSource.cs (98%) rename {UI => RemSox.Kernel/UI}/GUI/Rendering/NetworkRenderSource.cs (78%) rename {UI => RemSox.Kernel/UI}/GUI/UIEelements/Control.cs (88%) rename {UI => RemSox.Kernel/UI}/GUI/UIEelements/Controls/Button.cs (95%) rename {UI => RemSox.Kernel/UI}/GUI/UIEelements/Controls/CheckBox.cs (96%) rename {UI => RemSox.Kernel/UI}/GUI/UIEelements/Controls/Panel.cs (84%) rename {UI => RemSox.Kernel/UI}/GUI/UIEelements/Controls/ProgressBar.cs (95%) rename {UI => RemSox.Kernel/UI}/GUI/UIEelements/Controls/RadioButton.cs (96%) rename {UI => RemSox.Kernel/UI}/GUI/UIEelements/Controls/Slider.cs (97%) rename {UI => RemSox.Kernel/UI}/GUI/UIEelements/Shape.cs (81%) rename {UI => RemSox.Kernel/UI}/GUI/UIEelements/Shapes/Circle.cs (89%) rename {UI => RemSox.Kernel/UI}/GUI/UIEelements/Shapes/Line.cs (87%) rename {UI => RemSox.Kernel/UI}/GUI/UIEelements/Shapes/Pixel.cs (83%) rename {UI => RemSox.Kernel/UI}/GUI/UIEelements/Shapes/Rectangle.cs (90%) rename {UI => RemSox.Kernel/UI}/GUI/UIEelements/Shapes/Text.cs (92%) rename {UI => RemSox.Kernel/UI}/GUI/UIEelements/UIEelement.cs (86%) rename {UI => RemSox.Kernel/UI}/GUI/Windows/Window.cs (99%) rename {UI => RemSox.Kernel/UI}/GUI/Windows/WindowLayer.cs (63%) rename {UI => RemSox.Kernel/UI}/GUI/Windows/WindowManager.cs (99%) rename {Utils => RemSox.Kernel/Utils}/CanvasExtensions.cs (98%) rename {Utils => RemSox.Kernel/Utils}/ChangedPropertiesTracker.cs (97%) rename {Utils => RemSox.Kernel/Utils}/ConcurrentHashSet.cs (100%) rename {Utils => RemSox.Kernel/Utils}/YesNtWindowStatements.cs (99%) create mode 100644 RemSox.Kernel/build-and-run.ps1 rename {Cryptography => RemSox.Shared/Cryptography}/AesGcmCrypto.cs (98%) rename {Cryptography => RemSox.Shared/Cryptography}/PasswordKeyDeriver.cs (91%) rename {Networking => RemSox.Shared/Networking}/AesPacketCrypto.cs (61%) rename {Networking => RemSox.Shared/Networking}/IPacketCrypto.cs (72%) rename {Networking => RemSox.Shared/Networking}/TcpConnection.cs (91%) rename {Networking => RemSox.Shared/Networking}/TcpMessage.cs (82%) rename {Networking => RemSox.Shared/Networking}/TcpRpcBase.cs (99%) rename {Networking => RemSox.Shared/Networking}/TcpRpcClient.cs (93%) rename {Networking => RemSox.Shared/Networking}/TcpRpcServer.cs (96%) create mode 100644 RemSox.Shared/RemSox.Shared.csproj rename {UI => RemSox.Shared/UI}/GUI/Rendering/IRenderSource.cs (71%) rename {UI => RemSox.Shared/UI}/GUI/Rendering/RenderCommand.cs (99%) rename {UI => RemSox.Shared/UI}/GUI/Rendering/RenderCommandType.cs (95%) rename {UI => RemSox.Shared/UI}/MouseEvent.cs (96%) create mode 100644 RemSox.Viewer/Program.cs create mode 100644 RemSox.Viewer/RemSox.Viewer.csproj delete mode 100644 build-and-run.ps1 delete mode 100644 src/C/.gitkeep diff --git a/.gitignore b/.gitignore index 806abb2..d832d3d 100644 --- a/.gitignore +++ b/.gitignore @@ -31,7 +31,7 @@ bld/ [Oo]bj/ [Ll]og/ [Ll]ogs/ -/output-x64 +/RemSox.Kernel/output-x64 # Visual Studio 2015/2017 cache/options directory .vs/ diff --git a/Bootloader/limine.conf b/RemSox.Kernel/Bootloader/limine.conf similarity index 88% rename from Bootloader/limine.conf rename to RemSox.Kernel/Bootloader/limine.conf index 052ec3c..ddaf247 100644 --- a/Bootloader/limine.conf +++ b/RemSox.Kernel/Bootloader/limine.conf @@ -7,4 +7,4 @@ timeout: 0 protocol: limine # Path to the kernel to boot. boot():/ represents the partition on which limine.conf is located. - path: boot():/boot/RemSox.elf + path: boot():/boot/RemSox.Kernel.elf diff --git a/Cryptography/CryptoManager.cs b/RemSox.Kernel/Cryptography/CryptoManager.cs similarity index 92% rename from Cryptography/CryptoManager.cs rename to RemSox.Kernel/Cryptography/CryptoManager.cs index 3de0b76..aa5827a 100644 --- a/Cryptography/CryptoManager.cs +++ b/RemSox.Kernel/Cryptography/CryptoManager.cs @@ -1,11 +1,11 @@ using Cosmos.Kernel.System.Keyboard; using Cosmos.Kernel.System.Mouse; -using RemSox.Plugs; +using RemSox.Kernel.Plugs; using System.Drawing; -namespace RemSox.Cryptography; +namespace RemSox.Kernel.Cryptography; public static class CryptoManager { diff --git a/Kernel.cs b/RemSox.Kernel/Kernel.cs similarity index 93% rename from Kernel.cs rename to RemSox.Kernel/Kernel.cs index 81af475..a99cc69 100644 --- a/Kernel.cs +++ b/RemSox.Kernel/Kernel.cs @@ -1,18 +1,20 @@ global using Sys = Cosmos.Kernel.System; +using RemSox.Kernel.Cryptography; + using Cosmos.Kernel.HAL.Interfaces.Devices; using Cosmos.Kernel.System.Network; using Cosmos.Kernel.System.Network.Config; using Cosmos.Kernel.System.Network.IPv4.UDP.DHCP; using Cosmos.Kernel.System.Timer; -using RemSox.Cryptography; -using RemSox.Processes; -using RemSox.Processing; -using RemSox.UI.CLI; -using RemSox.UI.CLI.Commands; +using RemSox.Shared.Cryptography; +using RemSox.Kernel.Processes; +using RemSox.Kernel.Processing; +using RemSox.Kernel.UI.CLI; +using RemSox.Kernel.UI.CLI.Commands; -namespace RemSox; +namespace RemSox.Kernel; /// /// Main kernel class - inherits from Cosmos.Kernel.System.Kernel. diff --git a/Logging/ILogger.cs b/RemSox.Kernel/Logging/ILogger.cs similarity index 88% rename from Logging/ILogger.cs rename to RemSox.Kernel/Logging/ILogger.cs index 6c9378a..fb7ea81 100644 --- a/Logging/ILogger.cs +++ b/RemSox.Kernel/Logging/ILogger.cs @@ -1,4 +1,4 @@ -namespace RemSox.Logging; +namespace RemSox.Kernel.Logging; public interface ILogger { diff --git a/Logging/InMemoryLogger.cs b/RemSox.Kernel/Logging/InMemoryLogger.cs similarity index 96% rename from Logging/InMemoryLogger.cs rename to RemSox.Kernel/Logging/InMemoryLogger.cs index 9026511..f466189 100644 --- a/Logging/InMemoryLogger.cs +++ b/RemSox.Kernel/Logging/InMemoryLogger.cs @@ -1,6 +1,6 @@ using System.Collections.Concurrent; -namespace RemSox.Logging; +namespace RemSox.Kernel.Logging; public class InMemoryLogger : ILogger { diff --git a/Logging/LogEntry.cs b/RemSox.Kernel/Logging/LogEntry.cs similarity index 72% rename from Logging/LogEntry.cs rename to RemSox.Kernel/Logging/LogEntry.cs index 91d0a10..a4477bc 100644 --- a/Logging/LogEntry.cs +++ b/RemSox.Kernel/Logging/LogEntry.cs @@ -1,3 +1,3 @@ -namespace RemSox.Logging; +namespace RemSox.Kernel.Logging; public record LogEntry(string Message, LogSeverity Severity, DateTimeOffset Timestamp); \ No newline at end of file diff --git a/Logging/LogSeverity.cs b/RemSox.Kernel/Logging/LogSeverity.cs similarity index 64% rename from Logging/LogSeverity.cs rename to RemSox.Kernel/Logging/LogSeverity.cs index 7dbaaf1..2824d42 100644 --- a/Logging/LogSeverity.cs +++ b/RemSox.Kernel/Logging/LogSeverity.cs @@ -1,4 +1,4 @@ -namespace RemSox.Logging; +namespace RemSox.Kernel.Logging; public enum LogSeverity { diff --git a/Logging/ProxyLogger.cs b/RemSox.Kernel/Logging/ProxyLogger.cs similarity index 95% rename from Logging/ProxyLogger.cs rename to RemSox.Kernel/Logging/ProxyLogger.cs index ce4eb29..859a724 100644 --- a/Logging/ProxyLogger.cs +++ b/RemSox.Kernel/Logging/ProxyLogger.cs @@ -1,4 +1,4 @@ -namespace RemSox.Logging; +namespace RemSox.Kernel.Logging; public class ProxyLogger(IEnumerable loggers) : ILogger { diff --git a/Plugs/RandomNumberGeneratorImplementationPlug.cs b/RemSox.Kernel/Plugs/RandomNumberGeneratorImplementationPlug.cs similarity index 99% rename from Plugs/RandomNumberGeneratorImplementationPlug.cs rename to RemSox.Kernel/Plugs/RandomNumberGeneratorImplementationPlug.cs index 161c9ab..fd9fddc 100644 --- a/Plugs/RandomNumberGeneratorImplementationPlug.cs +++ b/RemSox.Kernel/Plugs/RandomNumberGeneratorImplementationPlug.cs @@ -1,6 +1,6 @@ using Cosmos.Build.API.Attributes; -namespace RemSox.Plugs; +namespace RemSox.Kernel.Plugs; [Plug("System.Security.Cryptography.RandomNumberGeneratorImplementation")] /// diff --git a/Plugs/RuntimeExports.cs b/RemSox.Kernel/Plugs/RuntimeExports.cs similarity index 85% rename from Plugs/RuntimeExports.cs rename to RemSox.Kernel/Plugs/RuntimeExports.cs index 674da23..2f75382 100644 --- a/Plugs/RuntimeExports.cs +++ b/RemSox.Kernel/Plugs/RuntimeExports.cs @@ -1,6 +1,6 @@ -using System.Runtime; +using System.Runtime; -namespace RemSox.Plugs; +namespace RemSox.Kernel.Plugs; public static partial class RuntimeExports { diff --git a/Processes/CliProcess.cs b/RemSox.Kernel/Processes/CliProcess.cs similarity index 97% rename from Processes/CliProcess.cs rename to RemSox.Kernel/Processes/CliProcess.cs index b1dacbd..6099f1c 100644 --- a/Processes/CliProcess.cs +++ b/RemSox.Kernel/Processes/CliProcess.cs @@ -1,7 +1,7 @@ -using RemSox.Processing; -using RemSox.UI.CLI; +using RemSox.Kernel.Processing; +using RemSox.Kernel.UI.CLI; -namespace RemSox.Processes; +namespace RemSox.Kernel.Processes; internal class CliProcess() : Process("Cli") { diff --git a/Processes/DesktopProcess.cs b/RemSox.Kernel/Processes/DesktopProcess.cs similarity index 96% rename from Processes/DesktopProcess.cs rename to RemSox.Kernel/Processes/DesktopProcess.cs index 791c692..b267a4b 100644 --- a/Processes/DesktopProcess.cs +++ b/RemSox.Kernel/Processes/DesktopProcess.cs @@ -1,17 +1,18 @@ +using RemSox.Kernel.UI.GUI.Rendering; using Cosmos.Kernel.System.Graphics; using Cosmos.Kernel.System.Keyboard; using Cosmos.Kernel.System.Mouse; -using RemSox.Processing; -using RemSox.UI; -using RemSox.UI.GUI.Layout; -using RemSox.UI.GUI.Rendering; -using RemSox.UI.GUI.UIEelements.Controls; -using RemSox.UI.GUI.Windows; +using RemSox.Kernel.Processing; +using RemSox.Shared.UI; +using RemSox.Kernel.UI.GUI.Layout; +using RemSox.Shared.UI.GUI.Rendering; +using RemSox.Kernel.UI.GUI.UIEelements.Controls; +using RemSox.Kernel.UI.GUI.Windows; using System.Drawing; -namespace RemSox.Processes; +namespace RemSox.Kernel.Processes; internal class DesktopProcess() : Process("Desktop Manager") { diff --git a/Processes/RemoteDesktopProcess.cs b/RemSox.Kernel/Processes/RemoteDesktopProcess.cs similarity index 96% rename from Processes/RemoteDesktopProcess.cs rename to RemSox.Kernel/Processes/RemoteDesktopProcess.cs index a64b6bd..4c75ff2 100644 --- a/Processes/RemoteDesktopProcess.cs +++ b/RemSox.Kernel/Processes/RemoteDesktopProcess.cs @@ -1,15 +1,16 @@ using Cosmos.Kernel.System.Graphics; using Cosmos.Kernel.System.Keyboard; -using RemSox.Networking; -using RemSox.Processing; -using RemSox.UI; -using RemSox.UI.GUI.Rendering; -using RemSox.UI.GUI.Windows; +using RemSox.Shared.Networking; +using RemSox.Kernel.Processing; +using RemSox.Shared.UI; +using RemSox.Shared.UI.GUI.Rendering; +using RemSox.Kernel.UI.GUI.Rendering; +using RemSox.Kernel.UI.GUI.Windows; using System.Text; -namespace RemSox.Processes; +namespace RemSox.Kernel.Processes; internal sealed class RemoteDesktopProcess() : Process("Remote Desktop Server") { diff --git a/Processes/TerminalProcess.cs b/RemSox.Kernel/Processes/TerminalProcess.cs similarity index 97% rename from Processes/TerminalProcess.cs rename to RemSox.Kernel/Processes/TerminalProcess.cs index 12234a1..71a6405 100644 --- a/Processes/TerminalProcess.cs +++ b/RemSox.Kernel/Processes/TerminalProcess.cs @@ -1,13 +1,13 @@ using Cosmos.Kernel.System.Keyboard; -using RemSox.Processing; -using RemSox.UI.CLI; -using RemSox.UI.GUI.UIEelements.Shapes; -using RemSox.UI.GUI.Windows; +using RemSox.Kernel.Processing; +using RemSox.Kernel.UI.CLI; +using RemSox.Kernel.UI.GUI.UIEelements.Shapes; +using RemSox.Kernel.UI.GUI.Windows; using System.Drawing; -namespace RemSox.Processes; +namespace RemSox.Kernel.Processes; public class TerminalProcess() : Process("Terminal") { diff --git a/Processes/TestProcess.cs b/RemSox.Kernel/Processes/TestProcess.cs similarity index 85% rename from Processes/TestProcess.cs rename to RemSox.Kernel/Processes/TestProcess.cs index 473230e..7352b31 100644 --- a/Processes/TestProcess.cs +++ b/RemSox.Kernel/Processes/TestProcess.cs @@ -1,11 +1,11 @@ -using RemSox.Processing; -using RemSox.Processing.IPC; -using RemSox.UI.GUI.UIEelements.Shapes; -using RemSox.UI.GUI.Windows; +using RemSox.Kernel.Processing; +using RemSox.Kernel.Processing.IPC; +using RemSox.Kernel.UI.GUI.UIEelements.Shapes; +using RemSox.Kernel.UI.GUI.Windows; using System.Drawing; -namespace RemSox.Processes; +namespace RemSox.Kernel.Processes; public class TestProcess() : Process("Test Process") { diff --git a/Processes/YesNtInterpreterProcess.cs b/RemSox.Kernel/Processes/YesNtInterpreterProcess.cs similarity index 90% rename from Processes/YesNtInterpreterProcess.cs rename to RemSox.Kernel/Processes/YesNtInterpreterProcess.cs index 7719d3e..c36902b 100644 --- a/Processes/YesNtInterpreterProcess.cs +++ b/RemSox.Kernel/Processes/YesNtInterpreterProcess.cs @@ -1,9 +1,9 @@ -using RemSox.Processing; -using RemSox.Utils; +using RemSox.Kernel.Processing; +using RemSox.Kernel.Utils; using YesNt.Interpreter.Runtime; -namespace RemSox.Processes; +namespace RemSox.Kernel.Processes; public class YesNtInterpreterProcess() : Process("YesNtInterpreter") { diff --git a/Processing/IPC/InterProcessCommunicator.cs b/RemSox.Kernel/Processing/IPC/InterProcessCommunicator.cs similarity index 93% rename from Processing/IPC/InterProcessCommunicator.cs rename to RemSox.Kernel/Processing/IPC/InterProcessCommunicator.cs index 68a906d..ac250d1 100644 --- a/Processing/IPC/InterProcessCommunicator.cs +++ b/RemSox.Kernel/Processing/IPC/InterProcessCommunicator.cs @@ -1,4 +1,4 @@ -namespace RemSox.Processing.IPC; +namespace RemSox.Kernel.Processing.IPC; internal static class InterProcessCommunicator { diff --git a/Processing/IPC/Message.cs b/RemSox.Kernel/Processing/IPC/Message.cs similarity index 68% rename from Processing/IPC/Message.cs rename to RemSox.Kernel/Processing/IPC/Message.cs index 675cc0e..a2c87bf 100644 --- a/Processing/IPC/Message.cs +++ b/RemSox.Kernel/Processing/IPC/Message.cs @@ -1,4 +1,4 @@ -namespace RemSox.Processing.IPC; +namespace RemSox.Kernel.Processing.IPC; public abstract class Message { diff --git a/Processing/Process.cs b/RemSox.Kernel/Processing/Process.cs similarity index 90% rename from Processing/Process.cs rename to RemSox.Kernel/Processing/Process.cs index b32be62..069fb49 100644 --- a/Processing/Process.cs +++ b/RemSox.Kernel/Processing/Process.cs @@ -1,10 +1,10 @@ -using RemSox.Logging; -using RemSox.Processing.IPC; -using RemSox.UI.GUI.Windows; +using RemSox.Kernel.Logging; +using RemSox.Kernel.Processing.IPC; +using RemSox.Kernel.UI.GUI.Windows; using System.Drawing; -namespace RemSox.Processing; +namespace RemSox.Kernel.Processing; public abstract class Process(string name) { diff --git a/Processing/ProcessManager.cs b/RemSox.Kernel/Processing/ProcessManager.cs similarity index 98% rename from Processing/ProcessManager.cs rename to RemSox.Kernel/Processing/ProcessManager.cs index 563be07..a76eb24 100644 --- a/Processing/ProcessManager.cs +++ b/RemSox.Kernel/Processing/ProcessManager.cs @@ -1,10 +1,10 @@ -using RemSox.Logging; -using RemSox.UI.GUI.Windows; +using RemSox.Kernel.Logging; +using RemSox.Kernel.UI.GUI.Windows; using System.Collections.Concurrent; using System.Diagnostics; -namespace RemSox.Processing; +namespace RemSox.Kernel.Processing; public static class ProcessManager { diff --git a/Processing/ProcessManiest.cs b/RemSox.Kernel/Processing/ProcessManiest.cs similarity index 92% rename from Processing/ProcessManiest.cs rename to RemSox.Kernel/Processing/ProcessManiest.cs index 2f72195..237ed9a 100644 --- a/Processing/ProcessManiest.cs +++ b/RemSox.Kernel/Processing/ProcessManiest.cs @@ -1,6 +1,6 @@ -using RemSox.Processes; +using RemSox.Kernel.Processes; -namespace RemSox.Processing; +namespace RemSox.Kernel.Processing; public static class ProcessManifest { diff --git a/Processing/ProcessMetrics.cs b/RemSox.Kernel/Processing/ProcessMetrics.cs similarity index 77% rename from Processing/ProcessMetrics.cs rename to RemSox.Kernel/Processing/ProcessMetrics.cs index 132c0ee..7b73b67 100644 --- a/Processing/ProcessMetrics.cs +++ b/RemSox.Kernel/Processing/ProcessMetrics.cs @@ -1,4 +1,4 @@ -namespace RemSox.Processing; +namespace RemSox.Kernel.Processing; public class ProcessMetrics { diff --git a/Properties/launchSettings.json b/RemSox.Kernel/Properties/launchSettings.json similarity index 99% rename from Properties/launchSettings.json rename to RemSox.Kernel/Properties/launchSettings.json index ec69571..8907d58 100644 --- a/Properties/launchSettings.json +++ b/RemSox.Kernel/Properties/launchSettings.json @@ -11,4 +11,4 @@ "workingDirectory": "./" } } -} \ No newline at end of file +} diff --git a/RemSox.csproj b/RemSox.Kernel/RemSox.Kernel.csproj similarity index 96% rename from RemSox.csproj rename to RemSox.Kernel/RemSox.Kernel.csproj index c76dffe..3e89480 100644 --- a/RemSox.csproj +++ b/RemSox.Kernel/RemSox.Kernel.csproj @@ -4,7 +4,6 @@ net10.0 - @@ -12,6 +11,10 @@ + + + + diff --git a/UI/CLI/CommandManager.cs b/RemSox.Kernel/UI/CLI/CommandManager.cs similarity index 98% rename from UI/CLI/CommandManager.cs rename to RemSox.Kernel/UI/CLI/CommandManager.cs index 393cd00..0334737 100644 --- a/UI/CLI/CommandManager.cs +++ b/RemSox.Kernel/UI/CLI/CommandManager.cs @@ -1,4 +1,4 @@ -namespace RemSox.UI.CLI; +namespace RemSox.Kernel.UI.CLI; public static class CommandManager { diff --git a/UI/CLI/Commands/ClearCommand.cs b/RemSox.Kernel/UI/CLI/Commands/ClearCommand.cs similarity index 87% rename from UI/CLI/Commands/ClearCommand.cs rename to RemSox.Kernel/UI/CLI/Commands/ClearCommand.cs index 7b2c448..263184d 100644 --- a/UI/CLI/Commands/ClearCommand.cs +++ b/RemSox.Kernel/UI/CLI/Commands/ClearCommand.cs @@ -1,4 +1,4 @@ -namespace RemSox.UI.CLI.Commands; +namespace RemSox.Kernel.UI.CLI.Commands; public sealed class ClearCommand : ICommand { diff --git a/UI/CLI/Commands/HaltCommand.cs b/RemSox.Kernel/UI/CLI/Commands/HaltCommand.cs similarity index 89% rename from UI/CLI/Commands/HaltCommand.cs rename to RemSox.Kernel/UI/CLI/Commands/HaltCommand.cs index 8548f67..76ccabe 100644 --- a/UI/CLI/Commands/HaltCommand.cs +++ b/RemSox.Kernel/UI/CLI/Commands/HaltCommand.cs @@ -1,4 +1,4 @@ -namespace RemSox.UI.CLI.Commands; +namespace RemSox.Kernel.UI.CLI.Commands; public sealed class ShutdownCommand : ICommand { diff --git a/UI/CLI/Commands/HelpCommand.cs b/RemSox.Kernel/UI/CLI/Commands/HelpCommand.cs similarity index 91% rename from UI/CLI/Commands/HelpCommand.cs rename to RemSox.Kernel/UI/CLI/Commands/HelpCommand.cs index b2b71fc..ae06949 100644 --- a/UI/CLI/Commands/HelpCommand.cs +++ b/RemSox.Kernel/UI/CLI/Commands/HelpCommand.cs @@ -1,4 +1,4 @@ -namespace RemSox.UI.CLI.Commands; +namespace RemSox.Kernel.UI.CLI.Commands; public sealed class HelpCommand : ICommand { diff --git a/UI/CLI/Commands/ProcessCommands.cs b/RemSox.Kernel/UI/CLI/Commands/ProcessCommands.cs similarity index 95% rename from UI/CLI/Commands/ProcessCommands.cs rename to RemSox.Kernel/UI/CLI/Commands/ProcessCommands.cs index bd039c7..24cae99 100644 --- a/UI/CLI/Commands/ProcessCommands.cs +++ b/RemSox.Kernel/UI/CLI/Commands/ProcessCommands.cs @@ -1,7 +1,7 @@ -using RemSox.Processes; -using RemSox.Processing; +using RemSox.Kernel.Processes; +using RemSox.Kernel.Processing; -namespace RemSox.UI.CLI.Commands; +namespace RemSox.Kernel.UI.CLI.Commands; public sealed class SpawnProcessCommand : ICommand { diff --git a/UI/CLI/Commands/RebootCommand.cs b/RemSox.Kernel/UI/CLI/Commands/RebootCommand.cs similarity index 88% rename from UI/CLI/Commands/RebootCommand.cs rename to RemSox.Kernel/UI/CLI/Commands/RebootCommand.cs index edcf373..9447f7e 100644 --- a/UI/CLI/Commands/RebootCommand.cs +++ b/RemSox.Kernel/UI/CLI/Commands/RebootCommand.cs @@ -1,4 +1,4 @@ -namespace RemSox.UI.CLI.Commands; +namespace RemSox.Kernel.UI.CLI.Commands; public class RebootCommand : ICommand { diff --git a/UI/CLI/Commands/StartGuiCommand.cs b/RemSox.Kernel/UI/CLI/Commands/StartGuiCommand.cs similarity index 85% rename from UI/CLI/Commands/StartGuiCommand.cs rename to RemSox.Kernel/UI/CLI/Commands/StartGuiCommand.cs index 937d23a..24a5e7b 100644 --- a/UI/CLI/Commands/StartGuiCommand.cs +++ b/RemSox.Kernel/UI/CLI/Commands/StartGuiCommand.cs @@ -1,7 +1,7 @@ -using RemSox.Processes; -using RemSox.Processing; +using RemSox.Kernel.Processes; +using RemSox.Kernel.Processing; -namespace RemSox.UI.CLI.Commands; +namespace RemSox.Kernel.UI.CLI.Commands; public class StartGuiCommand : ICommand { diff --git a/UI/CLI/Commands/StartRemoteDesktopCommand.cs b/RemSox.Kernel/UI/CLI/Commands/StartRemoteDesktopCommand.cs similarity index 89% rename from UI/CLI/Commands/StartRemoteDesktopCommand.cs rename to RemSox.Kernel/UI/CLI/Commands/StartRemoteDesktopCommand.cs index 297633b..135fa7f 100644 --- a/UI/CLI/Commands/StartRemoteDesktopCommand.cs +++ b/RemSox.Kernel/UI/CLI/Commands/StartRemoteDesktopCommand.cs @@ -1,7 +1,7 @@ -using RemSox.Processes; -using RemSox.Processing; +using RemSox.Kernel.Processes; +using RemSox.Kernel.Processing; -namespace RemSox.UI.CLI.Commands; +namespace RemSox.Kernel.UI.CLI.Commands; public class StartRemoteDesktopCommand : ICommand { diff --git a/UI/CLI/Commands/StopGuiCommand.cs b/RemSox.Kernel/UI/CLI/Commands/StopGuiCommand.cs similarity index 86% rename from UI/CLI/Commands/StopGuiCommand.cs rename to RemSox.Kernel/UI/CLI/Commands/StopGuiCommand.cs index 9254c48..2ed4d25 100644 --- a/UI/CLI/Commands/StopGuiCommand.cs +++ b/RemSox.Kernel/UI/CLI/Commands/StopGuiCommand.cs @@ -1,7 +1,7 @@ -using RemSox.Processes; -using RemSox.Processing; +using RemSox.Kernel.Processes; +using RemSox.Kernel.Processing; -namespace RemSox.UI.CLI.Commands; +namespace RemSox.Kernel.UI.CLI.Commands; public class StopGuiCommand : ICommand { diff --git a/UI/CLI/Commands/StopRemoteDesktopCommand.cs b/RemSox.Kernel/UI/CLI/Commands/StopRemoteDesktopCommand.cs similarity index 86% rename from UI/CLI/Commands/StopRemoteDesktopCommand.cs rename to RemSox.Kernel/UI/CLI/Commands/StopRemoteDesktopCommand.cs index f0afb40..c0f8216 100644 --- a/UI/CLI/Commands/StopRemoteDesktopCommand.cs +++ b/RemSox.Kernel/UI/CLI/Commands/StopRemoteDesktopCommand.cs @@ -1,7 +1,7 @@ -using RemSox.Processes; -using RemSox.Processing; +using RemSox.Kernel.Processes; +using RemSox.Kernel.Processing; -namespace RemSox.UI.CLI.Commands; +namespace RemSox.Kernel.UI.CLI.Commands; public class StopRemoteDesktopCommand : ICommand { diff --git a/UI/CLI/Commands/ViewProcessLogs.cs b/RemSox.Kernel/UI/CLI/Commands/ViewProcessLogs.cs similarity index 90% rename from UI/CLI/Commands/ViewProcessLogs.cs rename to RemSox.Kernel/UI/CLI/Commands/ViewProcessLogs.cs index a869d38..a0731eb 100644 --- a/UI/CLI/Commands/ViewProcessLogs.cs +++ b/RemSox.Kernel/UI/CLI/Commands/ViewProcessLogs.cs @@ -1,7 +1,7 @@ -using RemSox.Logging; -using RemSox.Processing; +using RemSox.Kernel.Logging; +using RemSox.Kernel.Processing; -namespace RemSox.UI.CLI.Commands; +namespace RemSox.Kernel.UI.CLI.Commands; public class ViewProcessLogs : ICommand { diff --git a/UI/CLI/Commands/YesNtCommand.cs b/RemSox.Kernel/UI/CLI/Commands/YesNtCommand.cs similarity index 88% rename from UI/CLI/Commands/YesNtCommand.cs rename to RemSox.Kernel/UI/CLI/Commands/YesNtCommand.cs index 5ad1636..7501b4c 100644 --- a/UI/CLI/Commands/YesNtCommand.cs +++ b/RemSox.Kernel/UI/CLI/Commands/YesNtCommand.cs @@ -1,6 +1,6 @@ -using RemSox.Processing; +using RemSox.Kernel.Processing; -namespace RemSox.UI.CLI.Commands; +namespace RemSox.Kernel.UI.CLI.Commands; public class YesNtCommand : ICommand { diff --git a/UI/CLI/ICommand.cs b/RemSox.Kernel/UI/CLI/ICommand.cs similarity index 96% rename from UI/CLI/ICommand.cs rename to RemSox.Kernel/UI/CLI/ICommand.cs index be1387f..9f99555 100644 --- a/UI/CLI/ICommand.cs +++ b/RemSox.Kernel/UI/CLI/ICommand.cs @@ -1,4 +1,4 @@ -namespace RemSox.UI.CLI; +namespace RemSox.Kernel.UI.CLI; /// /// Defines a command executable via the CLI or GUI terminal. /// diff --git a/UI/GUI/Layout/GridLayout.cs b/RemSox.Kernel/UI/GUI/Layout/GridLayout.cs similarity index 93% rename from UI/GUI/Layout/GridLayout.cs rename to RemSox.Kernel/UI/GUI/Layout/GridLayout.cs index 6c11b4c..026b517 100644 --- a/UI/GUI/Layout/GridLayout.cs +++ b/RemSox.Kernel/UI/GUI/Layout/GridLayout.cs @@ -1,9 +1,9 @@ -using RemSox.UI.GUI.UIEelements; -using RemSox.UI.GUI.Windows; +using RemSox.Kernel.UI.GUI.UIEelements; +using RemSox.Kernel.UI.GUI.Windows; using System.Drawing; -namespace RemSox.UI.GUI.Layout; +namespace RemSox.Kernel.UI.GUI.Layout; public sealed class GridLayout { diff --git a/UI/GUI/Layout/LayoutExtensions.cs b/RemSox.Kernel/UI/GUI/Layout/LayoutExtensions.cs similarity index 87% rename from UI/GUI/Layout/LayoutExtensions.cs rename to RemSox.Kernel/UI/GUI/Layout/LayoutExtensions.cs index 4681337..efde41a 100644 --- a/UI/GUI/Layout/LayoutExtensions.cs +++ b/RemSox.Kernel/UI/GUI/Layout/LayoutExtensions.cs @@ -1,6 +1,6 @@ -using RemSox.UI.GUI.Windows; +using RemSox.Kernel.UI.GUI.Windows; -namespace RemSox.UI.GUI.Layout; +namespace RemSox.Kernel.UI.GUI.Layout; public static class LayoutExtensions { diff --git a/UI/GUI/Layout/StackLayout.cs b/RemSox.Kernel/UI/GUI/Layout/StackLayout.cs similarity index 94% rename from UI/GUI/Layout/StackLayout.cs rename to RemSox.Kernel/UI/GUI/Layout/StackLayout.cs index 32c330c..16b214d 100644 --- a/UI/GUI/Layout/StackLayout.cs +++ b/RemSox.Kernel/UI/GUI/Layout/StackLayout.cs @@ -1,9 +1,9 @@ -using RemSox.UI.GUI.UIEelements; -using RemSox.UI.GUI.Windows; +using RemSox.Kernel.UI.GUI.UIEelements; +using RemSox.Kernel.UI.GUI.Windows; using System.Drawing; -namespace RemSox.UI.GUI.Layout; +namespace RemSox.Kernel.UI.GUI.Layout; public enum StackOrientation { diff --git a/UI/GUI/Rendering/CanvasRenderSource.cs b/RemSox.Kernel/UI/GUI/Rendering/CanvasRenderSource.cs similarity index 98% rename from UI/GUI/Rendering/CanvasRenderSource.cs rename to RemSox.Kernel/UI/GUI/Rendering/CanvasRenderSource.cs index 783a126..d9d00aa 100644 --- a/UI/GUI/Rendering/CanvasRenderSource.cs +++ b/RemSox.Kernel/UI/GUI/Rendering/CanvasRenderSource.cs @@ -1,12 +1,13 @@ +using RemSox.Shared.UI.GUI.Rendering; using Cosmos.Kernel.System.Graphics; using Cosmos.Kernel.System.Graphics.Fonts; -using RemSox.UI.GUI.UIEelements; -using RemSox.Utils; +using RemSox.Kernel.UI.GUI.UIEelements; +using RemSox.Kernel.Utils; using System.Drawing; -namespace RemSox.UI.GUI.Rendering; +namespace RemSox.Kernel.UI.GUI.Rendering; public sealed class CanvasRenderSource : IRenderSource { diff --git a/UI/GUI/Rendering/NetworkRenderSource.cs b/RemSox.Kernel/UI/GUI/Rendering/NetworkRenderSource.cs similarity index 78% rename from UI/GUI/Rendering/NetworkRenderSource.cs rename to RemSox.Kernel/UI/GUI/Rendering/NetworkRenderSource.cs index 3ebd4da..810a52f 100644 --- a/UI/GUI/Rendering/NetworkRenderSource.cs +++ b/RemSox.Kernel/UI/GUI/Rendering/NetworkRenderSource.cs @@ -1,6 +1,7 @@ -using RemSox.Networking; +using RemSox.Shared.UI.GUI.Rendering; +using RemSox.Shared.Networking; -namespace RemSox.UI.GUI.Rendering; +namespace RemSox.Kernel.UI.GUI.Rendering; public sealed class NetworkRenderSource(TcpRpcServer server) : IRenderSource { diff --git a/UI/GUI/UIEelements/Control.cs b/RemSox.Kernel/UI/GUI/UIEelements/Control.cs similarity index 88% rename from UI/GUI/UIEelements/Control.cs rename to RemSox.Kernel/UI/GUI/UIEelements/Control.cs index e4f7846..7fbdb62 100644 --- a/UI/GUI/UIEelements/Control.cs +++ b/RemSox.Kernel/UI/GUI/UIEelements/Control.cs @@ -1,8 +1,9 @@ +using RemSox.Shared.UI; using Cosmos.Kernel.System.Keyboard; using System.Drawing; -namespace RemSox.UI.GUI.UIEelements; +namespace RemSox.Kernel.UI.GUI.UIEelements; public abstract class Control(string type) : UIElement(type) { diff --git a/UI/GUI/UIEelements/Controls/Button.cs b/RemSox.Kernel/UI/GUI/UIEelements/Controls/Button.cs similarity index 95% rename from UI/GUI/UIEelements/Controls/Button.cs rename to RemSox.Kernel/UI/GUI/UIEelements/Controls/Button.cs index 3fedb7a..eddb937 100644 --- a/UI/GUI/UIEelements/Controls/Button.cs +++ b/RemSox.Kernel/UI/GUI/UIEelements/Controls/Button.cs @@ -1,8 +1,9 @@ -using RemSox.UI.GUI.Rendering; +using RemSox.Shared.UI; +using RemSox.Shared.UI.GUI.Rendering; using System.Drawing; -namespace RemSox.UI.GUI.UIEelements.Controls; +namespace RemSox.Kernel.UI.GUI.UIEelements.Controls; public class Button() : Control("Button") { diff --git a/UI/GUI/UIEelements/Controls/CheckBox.cs b/RemSox.Kernel/UI/GUI/UIEelements/Controls/CheckBox.cs similarity index 96% rename from UI/GUI/UIEelements/Controls/CheckBox.cs rename to RemSox.Kernel/UI/GUI/UIEelements/Controls/CheckBox.cs index 27145e5..e42901c 100644 --- a/UI/GUI/UIEelements/Controls/CheckBox.cs +++ b/RemSox.Kernel/UI/GUI/UIEelements/Controls/CheckBox.cs @@ -1,8 +1,9 @@ -using RemSox.UI.GUI.Rendering; +using RemSox.Shared.UI; +using RemSox.Shared.UI.GUI.Rendering; using System.Drawing; -namespace RemSox.UI.GUI.UIEelements.Controls; +namespace RemSox.Kernel.UI.GUI.UIEelements.Controls; public class CheckBox() : Control("CheckBox") { diff --git a/UI/GUI/UIEelements/Controls/Panel.cs b/RemSox.Kernel/UI/GUI/UIEelements/Controls/Panel.cs similarity index 84% rename from UI/GUI/UIEelements/Controls/Panel.cs rename to RemSox.Kernel/UI/GUI/UIEelements/Controls/Panel.cs index 9465822..20535e6 100644 --- a/UI/GUI/UIEelements/Controls/Panel.cs +++ b/RemSox.Kernel/UI/GUI/UIEelements/Controls/Panel.cs @@ -1,6 +1,6 @@ -using RemSox.UI.GUI.Rendering; +using RemSox.Shared.UI.GUI.Rendering; -namespace RemSox.UI.GUI.UIEelements.Controls; +namespace RemSox.Kernel.UI.GUI.UIEelements.Controls; public class Panel() : Control("Panel") { diff --git a/UI/GUI/UIEelements/Controls/ProgressBar.cs b/RemSox.Kernel/UI/GUI/UIEelements/Controls/ProgressBar.cs similarity index 95% rename from UI/GUI/UIEelements/Controls/ProgressBar.cs rename to RemSox.Kernel/UI/GUI/UIEelements/Controls/ProgressBar.cs index 24b0386..432d7ee 100644 --- a/UI/GUI/UIEelements/Controls/ProgressBar.cs +++ b/RemSox.Kernel/UI/GUI/UIEelements/Controls/ProgressBar.cs @@ -1,8 +1,8 @@ -using RemSox.UI.GUI.Rendering; +using RemSox.Shared.UI.GUI.Rendering; using System.Drawing; -namespace RemSox.UI.GUI.UIEelements.Controls; +namespace RemSox.Kernel.UI.GUI.UIEelements.Controls; public class ProgressBar() : Control("ProgressBar") { diff --git a/UI/GUI/UIEelements/Controls/RadioButton.cs b/RemSox.Kernel/UI/GUI/UIEelements/Controls/RadioButton.cs similarity index 96% rename from UI/GUI/UIEelements/Controls/RadioButton.cs rename to RemSox.Kernel/UI/GUI/UIEelements/Controls/RadioButton.cs index 74aa1c8..9b36384 100644 --- a/UI/GUI/UIEelements/Controls/RadioButton.cs +++ b/RemSox.Kernel/UI/GUI/UIEelements/Controls/RadioButton.cs @@ -1,8 +1,9 @@ -using RemSox.UI.GUI.Rendering; +using RemSox.Shared.UI; +using RemSox.Shared.UI.GUI.Rendering; using System.Drawing; -namespace RemSox.UI.GUI.UIEelements.Controls; +namespace RemSox.Kernel.UI.GUI.UIEelements.Controls; public class RadioButton() : Control("RadioButton") { diff --git a/UI/GUI/UIEelements/Controls/Slider.cs b/RemSox.Kernel/UI/GUI/UIEelements/Controls/Slider.cs similarity index 97% rename from UI/GUI/UIEelements/Controls/Slider.cs rename to RemSox.Kernel/UI/GUI/UIEelements/Controls/Slider.cs index 0085943..34ba052 100644 --- a/UI/GUI/UIEelements/Controls/Slider.cs +++ b/RemSox.Kernel/UI/GUI/UIEelements/Controls/Slider.cs @@ -1,8 +1,9 @@ -using RemSox.UI.GUI.Rendering; +using RemSox.Shared.UI; +using RemSox.Shared.UI.GUI.Rendering; using System.Drawing; -namespace RemSox.UI.GUI.UIEelements.Controls; +namespace RemSox.Kernel.UI.GUI.UIEelements.Controls; public class Slider() : Control("Slider") { diff --git a/UI/GUI/UIEelements/Shape.cs b/RemSox.Kernel/UI/GUI/UIEelements/Shape.cs similarity index 81% rename from UI/GUI/UIEelements/Shape.cs rename to RemSox.Kernel/UI/GUI/UIEelements/Shape.cs index a85e6f7..16d6653 100644 --- a/UI/GUI/UIEelements/Shape.cs +++ b/RemSox.Kernel/UI/GUI/UIEelements/Shape.cs @@ -1,6 +1,6 @@ using System.Drawing; -namespace RemSox.UI.GUI.UIEelements; +namespace RemSox.Kernel.UI.GUI.UIEelements; public abstract class Shape(string type) : UIElement(type) { diff --git a/UI/GUI/UIEelements/Shapes/Circle.cs b/RemSox.Kernel/UI/GUI/UIEelements/Shapes/Circle.cs similarity index 89% rename from UI/GUI/UIEelements/Shapes/Circle.cs rename to RemSox.Kernel/UI/GUI/UIEelements/Shapes/Circle.cs index a969361..f594580 100644 --- a/UI/GUI/UIEelements/Shapes/Circle.cs +++ b/RemSox.Kernel/UI/GUI/UIEelements/Shapes/Circle.cs @@ -1,6 +1,6 @@ -using RemSox.UI.GUI.Rendering; +using RemSox.Shared.UI.GUI.Rendering; -namespace RemSox.UI.GUI.UIEelements.Shapes; +namespace RemSox.Kernel.UI.GUI.UIEelements.Shapes; public class Circle() : Shape("Circle") { diff --git a/UI/GUI/UIEelements/Shapes/Line.cs b/RemSox.Kernel/UI/GUI/UIEelements/Shapes/Line.cs similarity index 87% rename from UI/GUI/UIEelements/Shapes/Line.cs rename to RemSox.Kernel/UI/GUI/UIEelements/Shapes/Line.cs index dbcf322..4ea00d5 100644 --- a/UI/GUI/UIEelements/Shapes/Line.cs +++ b/RemSox.Kernel/UI/GUI/UIEelements/Shapes/Line.cs @@ -1,8 +1,8 @@ -using RemSox.UI.GUI.Rendering; +using RemSox.Shared.UI.GUI.Rendering; using System.Drawing; -namespace RemSox.UI.GUI.UIEelements.Shapes; +namespace RemSox.Kernel.UI.GUI.UIEelements.Shapes; public class Line() : Shape("Line") { diff --git a/UI/GUI/UIEelements/Shapes/Pixel.cs b/RemSox.Kernel/UI/GUI/UIEelements/Shapes/Pixel.cs similarity index 83% rename from UI/GUI/UIEelements/Shapes/Pixel.cs rename to RemSox.Kernel/UI/GUI/UIEelements/Shapes/Pixel.cs index 9071bb7..b4d4d90 100644 --- a/UI/GUI/UIEelements/Shapes/Pixel.cs +++ b/RemSox.Kernel/UI/GUI/UIEelements/Shapes/Pixel.cs @@ -1,6 +1,6 @@ -using RemSox.UI.GUI.Rendering; +using RemSox.Shared.UI.GUI.Rendering; -namespace RemSox.UI.GUI.UIEelements.Shapes; +namespace RemSox.Kernel.UI.GUI.UIEelements.Shapes; public class Pixel() : Shape("Pixel") { diff --git a/UI/GUI/UIEelements/Shapes/Rectangle.cs b/RemSox.Kernel/UI/GUI/UIEelements/Shapes/Rectangle.cs similarity index 90% rename from UI/GUI/UIEelements/Shapes/Rectangle.cs rename to RemSox.Kernel/UI/GUI/UIEelements/Shapes/Rectangle.cs index deae391..6c7a1ef 100644 --- a/UI/GUI/UIEelements/Shapes/Rectangle.cs +++ b/RemSox.Kernel/UI/GUI/UIEelements/Shapes/Rectangle.cs @@ -1,8 +1,8 @@ -using RemSox.UI.GUI.Rendering; +using RemSox.Shared.UI.GUI.Rendering; using System.Drawing; -namespace RemSox.UI.GUI.UIEelements.Shapes; +namespace RemSox.Kernel.UI.GUI.UIEelements.Shapes; public class Rectangle() : Shape("Rectangle") { diff --git a/UI/GUI/UIEelements/Shapes/Text.cs b/RemSox.Kernel/UI/GUI/UIEelements/Shapes/Text.cs similarity index 92% rename from UI/GUI/UIEelements/Shapes/Text.cs rename to RemSox.Kernel/UI/GUI/UIEelements/Shapes/Text.cs index bdd80d6..9e76428 100644 --- a/UI/GUI/UIEelements/Shapes/Text.cs +++ b/RemSox.Kernel/UI/GUI/UIEelements/Shapes/Text.cs @@ -1,8 +1,8 @@ -using RemSox.UI.GUI.Rendering; +using RemSox.Shared.UI.GUI.Rendering; using System.Drawing; -namespace RemSox.UI.GUI.UIEelements.Shapes; +namespace RemSox.Kernel.UI.GUI.UIEelements.Shapes; public class Text() : UIElement("Text") { diff --git a/UI/GUI/UIEelements/UIEelement.cs b/RemSox.Kernel/UI/GUI/UIEelements/UIEelement.cs similarity index 86% rename from UI/GUI/UIEelements/UIEelement.cs rename to RemSox.Kernel/UI/GUI/UIEelements/UIEelement.cs index c7f9896..310d812 100644 --- a/UI/GUI/UIEelements/UIEelement.cs +++ b/RemSox.Kernel/UI/GUI/UIEelements/UIEelement.cs @@ -1,9 +1,9 @@ -using RemSox.UI.GUI.Rendering; -using RemSox.Utils; +using RemSox.Shared.UI.GUI.Rendering; +using RemSox.Kernel.Utils; using System.Drawing; -namespace RemSox.UI.GUI.UIEelements; +namespace RemSox.Kernel.UI.GUI.UIEelements; public abstract class UIElement(string type) : ChangedPropertiesTracker { diff --git a/UI/GUI/Windows/Window.cs b/RemSox.Kernel/UI/GUI/Windows/Window.cs similarity index 99% rename from UI/GUI/Windows/Window.cs rename to RemSox.Kernel/UI/GUI/Windows/Window.cs index de59568..215f5fd 100644 --- a/UI/GUI/Windows/Window.cs +++ b/RemSox.Kernel/UI/GUI/Windows/Window.cs @@ -1,9 +1,10 @@ -using RemSox.UI.GUI.Rendering; -using RemSox.UI.GUI.UIEelements; +using RemSox.Shared.UI; +using RemSox.Shared.UI.GUI.Rendering; +using RemSox.Kernel.UI.GUI.UIEelements; using System.Drawing; -namespace RemSox.UI.GUI.Windows; +namespace RemSox.Kernel.UI.GUI.Windows; /// /// Represents a window within the GUI system, managing its state, UI elements, and interactions. diff --git a/UI/GUI/Windows/WindowLayer.cs b/RemSox.Kernel/UI/GUI/Windows/WindowLayer.cs similarity index 63% rename from UI/GUI/Windows/WindowLayer.cs rename to RemSox.Kernel/UI/GUI/Windows/WindowLayer.cs index f6b7117..7ecb716 100644 --- a/UI/GUI/Windows/WindowLayer.cs +++ b/RemSox.Kernel/UI/GUI/Windows/WindowLayer.cs @@ -1,4 +1,4 @@ -namespace RemSox.UI.GUI.Windows; +namespace RemSox.Kernel.UI.GUI.Windows; public enum WindowLayer { diff --git a/UI/GUI/Windows/WindowManager.cs b/RemSox.Kernel/UI/GUI/Windows/WindowManager.cs similarity index 99% rename from UI/GUI/Windows/WindowManager.cs rename to RemSox.Kernel/UI/GUI/Windows/WindowManager.cs index 29fb25a..1645611 100644 --- a/UI/GUI/Windows/WindowManager.cs +++ b/RemSox.Kernel/UI/GUI/Windows/WindowManager.cs @@ -1,12 +1,13 @@ +using RemSox.Shared.UI; using Cosmos.Kernel.System.Graphics; using Cosmos.Kernel.System.Keyboard; -using RemSox.Processing; -using RemSox.UI.GUI.Rendering; +using RemSox.Kernel.Processing; +using RemSox.Shared.UI.GUI.Rendering; using System.Drawing; -namespace RemSox.UI.GUI.Windows; +namespace RemSox.Kernel.UI.GUI.Windows; /// /// Manages window creation, focus, interaction, and rendering orchestration for the GUI system. diff --git a/Utils/CanvasExtensions.cs b/RemSox.Kernel/Utils/CanvasExtensions.cs similarity index 98% rename from Utils/CanvasExtensions.cs rename to RemSox.Kernel/Utils/CanvasExtensions.cs index 0cebab6..445b6ef 100644 --- a/Utils/CanvasExtensions.cs +++ b/RemSox.Kernel/Utils/CanvasExtensions.cs @@ -1,9 +1,9 @@ -using Cosmos.Kernel.System.Graphics; +using Cosmos.Kernel.System.Graphics; using Cosmos.Kernel.System.Graphics.Fonts; using System.Drawing; -namespace RemSox.Utils; +namespace RemSox.Kernel.Utils; public static class CanvasExtensions { diff --git a/Utils/ChangedPropertiesTracker.cs b/RemSox.Kernel/Utils/ChangedPropertiesTracker.cs similarity index 97% rename from Utils/ChangedPropertiesTracker.cs rename to RemSox.Kernel/Utils/ChangedPropertiesTracker.cs index 4e87d66..84173d3 100644 --- a/Utils/ChangedPropertiesTracker.cs +++ b/RemSox.Kernel/Utils/ChangedPropertiesTracker.cs @@ -1,6 +1,6 @@ using System.ComponentModel; -namespace RemSox.Utils; +namespace RemSox.Kernel.Utils; public abstract class ChangedPropertiesTracker : INotifyPropertyChanged { diff --git a/Utils/ConcurrentHashSet.cs b/RemSox.Kernel/Utils/ConcurrentHashSet.cs similarity index 100% rename from Utils/ConcurrentHashSet.cs rename to RemSox.Kernel/Utils/ConcurrentHashSet.cs diff --git a/Utils/YesNtWindowStatements.cs b/RemSox.Kernel/Utils/YesNtWindowStatements.cs similarity index 99% rename from Utils/YesNtWindowStatements.cs rename to RemSox.Kernel/Utils/YesNtWindowStatements.cs index 6ded799..5e259b7 100644 --- a/Utils/YesNtWindowStatements.cs +++ b/RemSox.Kernel/Utils/YesNtWindowStatements.cs @@ -1,8 +1,8 @@ -using RemSox.Processing; -using RemSox.UI.GUI.UIEelements; -using RemSox.UI.GUI.UIEelements.Controls; -using RemSox.UI.GUI.UIEelements.Shapes; -using RemSox.UI.GUI.Windows; +using RemSox.Kernel.Processing; +using RemSox.Kernel.UI.GUI.UIEelements; +using RemSox.Kernel.UI.GUI.UIEelements.Controls; +using RemSox.Kernel.UI.GUI.UIEelements.Shapes; +using RemSox.Kernel.UI.GUI.Windows; using System.Diagnostics.CodeAnalysis; using System.Drawing; @@ -10,9 +10,9 @@ using System.Drawing; using YesNt.Interpreter.Runtime; using YesNt.Interpreter.Utilities; -using ShapesRectangle = RemSox.UI.GUI.UIEelements.Shapes.Rectangle; +using ShapesRectangle = RemSox.Kernel.UI.GUI.UIEelements.Shapes.Rectangle; -namespace RemSox.Utils; +namespace RemSox.Kernel.Utils; /// /// diff --git a/RemSox.Kernel/build-and-run.ps1 b/RemSox.Kernel/build-and-run.ps1 new file mode 100644 index 0000000..64efa81 --- /dev/null +++ b/RemSox.Kernel/build-and-run.ps1 @@ -0,0 +1,5 @@ +cosmos build +if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + +#cosmos run +& "$env:LOCALAPPDATA\Cosmos\Tools\qemu\bin\qemu-system-x86_64.exe" -L "$env:LOCALAPPDATA\Cosmos\Tools\qemu\share\qemu" -M q35 -cpu max -m 512M -serial stdio -cdrom .\output-x64\RemSox.Kernel.iso -vga std -nic user,hostfwd=tcp::9999-:9999 diff --git a/Cryptography/AesGcmCrypto.cs b/RemSox.Shared/Cryptography/AesGcmCrypto.cs similarity index 98% rename from Cryptography/AesGcmCrypto.cs rename to RemSox.Shared/Cryptography/AesGcmCrypto.cs index f1738e0..f06f3ae 100644 --- a/Cryptography/AesGcmCrypto.cs +++ b/RemSox.Shared/Cryptography/AesGcmCrypto.cs @@ -5,7 +5,7 @@ using Org.BouncyCastle.Crypto.Parameters; using System.Security.Cryptography; using System.Text; -namespace RemSox.Cryptography; +namespace RemSox.Shared.Cryptography; public static class AesGcmCrypto { @@ -66,4 +66,4 @@ public static class AesGcmCrypto byte[] plain = Decrypt(data, key); return Encoding.UTF8.GetString(plain); } -} \ No newline at end of file +} diff --git a/Cryptography/PasswordKeyDeriver.cs b/RemSox.Shared/Cryptography/PasswordKeyDeriver.cs similarity index 91% rename from Cryptography/PasswordKeyDeriver.cs rename to RemSox.Shared/Cryptography/PasswordKeyDeriver.cs index 7b7f525..8529954 100644 --- a/Cryptography/PasswordKeyDeriver.cs +++ b/RemSox.Shared/Cryptography/PasswordKeyDeriver.cs @@ -1,9 +1,9 @@ -using Org.BouncyCastle.Crypto; +using Org.BouncyCastle.Crypto; using Org.BouncyCastle.Crypto.Digests; using Org.BouncyCastle.Crypto.Generators; using Org.BouncyCastle.Crypto.Parameters; -namespace RemSox.Cryptography; +namespace RemSox.Shared.Cryptography; public static class Pkcs5S2PasswordKeyDeriver { @@ -23,4 +23,4 @@ public static class Pkcs5S2PasswordKeyDeriver return ((KeyParameter)generator.GenerateDerivedMacParameters(KeySize * 8)) .GetKey(); } -} \ No newline at end of file +} diff --git a/Networking/AesPacketCrypto.cs b/RemSox.Shared/Networking/AesPacketCrypto.cs similarity index 61% rename from Networking/AesPacketCrypto.cs rename to RemSox.Shared/Networking/AesPacketCrypto.cs index 7c1899a..b51cba1 100644 --- a/Networking/AesPacketCrypto.cs +++ b/RemSox.Shared/Networking/AesPacketCrypto.cs @@ -1,8 +1,8 @@ -using RemSox.Cryptography; +using RemSox.Shared.Cryptography; -namespace RemSox.Networking; +namespace RemSox.Shared.Networking; -internal class AesPacketCrypto(byte[] key) : IPacketCrypto +public class AesPacketCrypto(byte[] key) : IPacketCrypto { public byte[] Decrypt(byte[] data) { diff --git a/Networking/IPacketCrypto.cs b/RemSox.Shared/Networking/IPacketCrypto.cs similarity index 72% rename from Networking/IPacketCrypto.cs rename to RemSox.Shared/Networking/IPacketCrypto.cs index 5d6e0ee..c55d10c 100644 --- a/Networking/IPacketCrypto.cs +++ b/RemSox.Shared/Networking/IPacketCrypto.cs @@ -1,8 +1,8 @@ -namespace RemSox.Networking; +namespace RemSox.Shared.Networking; public interface IPacketCrypto { byte[] Encrypt(byte[] data); byte[] Decrypt(byte[] data); -} \ No newline at end of file +} diff --git a/Networking/TcpConnection.cs b/RemSox.Shared/Networking/TcpConnection.cs similarity index 91% rename from Networking/TcpConnection.cs rename to RemSox.Shared/Networking/TcpConnection.cs index 4287569..67777a3 100644 --- a/Networking/TcpConnection.cs +++ b/RemSox.Shared/Networking/TcpConnection.cs @@ -1,5 +1,7 @@ using System.Net.Sockets; +namespace RemSox.Shared.Networking; + /// /// Simple wrapper around TcpClient to hold connection-scoped resources safely. /// @@ -14,4 +16,4 @@ public class TcpConnection(TcpClient client) : IDisposable Stream.Dispose(); Client.Dispose(); } -} \ No newline at end of file +} diff --git a/Networking/TcpMessage.cs b/RemSox.Shared/Networking/TcpMessage.cs similarity index 82% rename from Networking/TcpMessage.cs rename to RemSox.Shared/Networking/TcpMessage.cs index 5a7a7d4..8a53922 100644 --- a/Networking/TcpMessage.cs +++ b/RemSox.Shared/Networking/TcpMessage.cs @@ -1,8 +1,8 @@ -namespace RemSox.Networking; +namespace RemSox.Shared.Networking; public class TcpMessage { public string Type { get; set; } = string.Empty; public string RequestId { get; set; } = string.Empty; public byte[] Payload { get; set; } = []; -} \ No newline at end of file +} diff --git a/Networking/TcpRpcBase.cs b/RemSox.Shared/Networking/TcpRpcBase.cs similarity index 99% rename from Networking/TcpRpcBase.cs rename to RemSox.Shared/Networking/TcpRpcBase.cs index cb41baf..27f3063 100644 --- a/Networking/TcpRpcBase.cs +++ b/RemSox.Shared/Networking/TcpRpcBase.cs @@ -1,10 +1,10 @@ -using RemSox.Networking; - using System.Buffers.Binary; using System.Collections.Concurrent; using System.Net.Sockets; using System.Text; +namespace RemSox.Shared.Networking; + public abstract class TcpRpcBase(IPacketCrypto? crypto = null) { protected readonly IPacketCrypto? crypto = crypto; @@ -234,4 +234,4 @@ public abstract class TcpRpcBase(IPacketCrypto? crypto = null) } protected abstract void OnConnectionClosed(TcpConnection conn); -} \ No newline at end of file +} diff --git a/Networking/TcpRpcClient.cs b/RemSox.Shared/Networking/TcpRpcClient.cs similarity index 93% rename from Networking/TcpRpcClient.cs rename to RemSox.Shared/Networking/TcpRpcClient.cs index 3126905..baaa235 100644 --- a/Networking/TcpRpcClient.cs +++ b/RemSox.Shared/Networking/TcpRpcClient.cs @@ -1,16 +1,16 @@ -using System.Net; +using System.Net; using System.Net.Sockets; -namespace RemSox.Networking; +namespace RemSox.Shared.Networking; public class TcpRpcClient(IPacketCrypto? crypto = null) : TcpRpcBase(crypto) { private TcpConnection? connection; - public void Connect(IPAddress ipAddress, int port) + public void Connect(string host, int port) { TcpClient client = new(); - client.Connect(ipAddress, port); + client.Connect(host, port); connection = new TcpConnection(client); @@ -82,4 +82,4 @@ public class TcpRpcClient(IPacketCrypto? crypto = null) : TcpRpcBase(crypto) } pendingRequests.Clear(); } -} \ No newline at end of file +} diff --git a/Networking/TcpRpcServer.cs b/RemSox.Shared/Networking/TcpRpcServer.cs similarity index 96% rename from Networking/TcpRpcServer.cs rename to RemSox.Shared/Networking/TcpRpcServer.cs index 2d9f41a..6a9899a 100644 --- a/Networking/TcpRpcServer.cs +++ b/RemSox.Shared/Networking/TcpRpcServer.cs @@ -1,8 +1,8 @@ -using System.Collections.Concurrent; +using System.Collections.Concurrent; using System.Net; using System.Net.Sockets; -namespace RemSox.Networking; +namespace RemSox.Shared.Networking; public class TcpRpcServer(IPacketCrypto? crypto = null) : TcpRpcBase(crypto) { @@ -79,4 +79,4 @@ public class TcpRpcServer(IPacketCrypto? crypto = null) : TcpRpcBase(crypto) Console.WriteLine($"Client disconnected: {ep}"); } -} \ No newline at end of file +} diff --git a/RemSox.Shared/RemSox.Shared.csproj b/RemSox.Shared/RemSox.Shared.csproj new file mode 100644 index 0000000..027a399 --- /dev/null +++ b/RemSox.Shared/RemSox.Shared.csproj @@ -0,0 +1,11 @@ + + + net10.0 + enable + enable + + + + + + diff --git a/UI/GUI/Rendering/IRenderSource.cs b/RemSox.Shared/UI/GUI/Rendering/IRenderSource.cs similarity index 71% rename from UI/GUI/Rendering/IRenderSource.cs rename to RemSox.Shared/UI/GUI/Rendering/IRenderSource.cs index 68eb6e3..0d2544a 100644 --- a/UI/GUI/Rendering/IRenderSource.cs +++ b/RemSox.Shared/UI/GUI/Rendering/IRenderSource.cs @@ -1,7 +1,7 @@ -namespace RemSox.UI.GUI.Rendering; +namespace RemSox.Shared.UI.GUI.Rendering; public interface IRenderSource { void Render(IEnumerable commands); void Composite(); -} \ No newline at end of file +} diff --git a/UI/GUI/Rendering/RenderCommand.cs b/RemSox.Shared/UI/GUI/Rendering/RenderCommand.cs similarity index 99% rename from UI/GUI/Rendering/RenderCommand.cs rename to RemSox.Shared/UI/GUI/Rendering/RenderCommand.cs index a4daffb..9078907 100644 --- a/UI/GUI/Rendering/RenderCommand.cs +++ b/RemSox.Shared/UI/GUI/Rendering/RenderCommand.cs @@ -1,7 +1,7 @@ using System.Drawing; using System.Text; -namespace RemSox.UI.GUI.Rendering; +namespace RemSox.Shared.UI.GUI.Rendering; public class RenderCommand { @@ -260,4 +260,4 @@ public class RenderCommand byte b = data[offset++]; return Color.FromArgb(r, g, b); } -} \ No newline at end of file +} diff --git a/UI/GUI/Rendering/RenderCommandType.cs b/RemSox.Shared/UI/GUI/Rendering/RenderCommandType.cs similarity index 95% rename from UI/GUI/Rendering/RenderCommandType.cs rename to RemSox.Shared/UI/GUI/Rendering/RenderCommandType.cs index dc6c4e0..e094b79 100644 --- a/UI/GUI/Rendering/RenderCommandType.cs +++ b/RemSox.Shared/UI/GUI/Rendering/RenderCommandType.cs @@ -1,4 +1,4 @@ -namespace RemSox.UI.GUI.Rendering; +namespace RemSox.Shared.UI.GUI.Rendering; /// /// Render command opcodes, grouped by category: diff --git a/UI/MouseEvent.cs b/RemSox.Shared/UI/MouseEvent.cs similarity index 96% rename from UI/MouseEvent.cs rename to RemSox.Shared/UI/MouseEvent.cs index 3983be1..c36383e 100644 --- a/UI/MouseEvent.cs +++ b/RemSox.Shared/UI/MouseEvent.cs @@ -1,4 +1,4 @@ -namespace RemSox.UI; +namespace RemSox.Shared.UI; public record MouseEvent(MouseEventType Type, int X = 0, int Y = 0, MouseButton Button = MouseButton.None, int Delta = 0) { @@ -36,4 +36,4 @@ public enum MouseButton Right, Middle, None -} \ No newline at end of file +} diff --git a/RemSox.Viewer/Program.cs b/RemSox.Viewer/Program.cs new file mode 100644 index 0000000..478821c --- /dev/null +++ b/RemSox.Viewer/Program.cs @@ -0,0 +1,43 @@ +using RemSox.Shared.Networking; + +namespace RemSox.Viewer; + +public class Program +{ + public static async Task Main(string[] args) + { + Console.WriteLine("RemSox RDP Viewer"); + Console.WriteLine("================="); + + if (args.Length < 2) + { + Console.WriteLine("Usage: RemSox.Viewer "); + return; + } + + string host = args[0]; + int port = int.Parse(args[1]); + + TcpRpcClient client = new(); + client.ListenTo("RenderCmd", async (payload) => + { + Console.WriteLine($"Received render command: {payload.Length} bytes"); + }); + + try + { + client.Connect(host, port); + Console.WriteLine($"Connected to {host}:{port}"); + + await client.RequestAsync("SyncRequest", []); + Console.WriteLine("Sync request sent."); + } + catch (Exception ex) + { + Console.WriteLine($"Error: {ex.Message}"); + } + + Console.WriteLine("Press Ctrl+C to exit."); + await Task.Delay(Timeout.Infinite); + } +} diff --git a/RemSox.Viewer/RemSox.Viewer.csproj b/RemSox.Viewer/RemSox.Viewer.csproj new file mode 100644 index 0000000..0892c13 --- /dev/null +++ b/RemSox.Viewer/RemSox.Viewer.csproj @@ -0,0 +1,12 @@ + + + Exe + net10.0 + enable + enable + + + + + + diff --git a/RemSox.slnx b/RemSox.slnx index 35d3dc3..5478c7d 100644 --- a/RemSox.slnx +++ b/RemSox.slnx @@ -1,5 +1,7 @@ - + + + diff --git a/build-and-run.ps1 b/build-and-run.ps1 deleted file mode 100644 index 04bb896..0000000 --- a/build-and-run.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -Set-Location $PSScriptRoot - -cosmos build -if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } - -#cosmos run -bash -c "qemu-system-x86_64 -M q35 -cpu max -m 512M -serial stdio -cdrom ./output-x64/RemSox.iso -vga std -nic user,hostfwd=tcp::9999-:9999" \ No newline at end of file diff --git a/src/C/.gitkeep b/src/C/.gitkeep deleted file mode 100644 index 20a1aae..0000000 --- a/src/C/.gitkeep +++ /dev/null @@ -1,3 +0,0 @@ -# This directory is for native C files that will be compiled with GCC. -# Place your .c and .h files here. -# They will be automatically compiled and linked into your kernel.