Module Archeticture

This commit is contained in:
2026-03-19 14:24:32 +02:00
parent 0dd13c5a8b
commit f123690cb4
2 changed files with 8 additions and 5 deletions

View File

@@ -6,13 +6,13 @@ public class WeatherModule : IModule
{
public string Name => "Прогноз Погоды";
public string[] GetCommands() => new[] { "ShowWeather", "Ping" };
public string[] GetCommands() => new[] { "Погода", "Пинг" };
public object Execute(string command, object[] args)
{
switch (command)
{
case "ShowWeather":
case "Погода":
// args[0] — это родительское окно из Ядра
var parentWindow = args != null && args.Length > 0 ? args[0] as Window : null;
@@ -30,7 +30,7 @@ public class WeatherModule : IModule
return "Окно открыто успешно";
case "Ping":
case "Пинг":
return "Pong! Модуль погоды активен.";
default: