Well Done
This commit is contained in:
@@ -8,26 +8,31 @@ public class WeatherModule : IModule
|
||||
|
||||
public string[] GetCommands() => new[] { "Погода", "Пинг" };
|
||||
|
||||
public object Execute(string command, object[] args)
|
||||
public void Settings(object[] args)
|
||||
{
|
||||
// args[0] — это родительское окно из Ядра
|
||||
var parentWindow = args != null && args.Length > 0 ? args[0] as Window : null;
|
||||
|
||||
var win = new Window
|
||||
{
|
||||
Title = "Окно Погоды",
|
||||
Content = new WeatherView(), // Вставляем наш контрол
|
||||
Width = 350,
|
||||
Height = 250,
|
||||
WindowStartupLocation = WindowStartupLocation.CenterOwner
|
||||
};
|
||||
|
||||
if (parentWindow != null) win.Show(parentWindow);
|
||||
else win.Show();
|
||||
|
||||
}
|
||||
|
||||
public object Execute(string command)
|
||||
{
|
||||
switch (command)
|
||||
{
|
||||
case "Погода":
|
||||
// args[0] — это родительское окно из Ядра
|
||||
var parentWindow = args != null && args.Length > 0 ? args[0] as Window : null;
|
||||
|
||||
var win = new Window
|
||||
{
|
||||
Title = "Окно Погоды",
|
||||
Content = new WeatherView(), // Вставляем наш контрол
|
||||
Width = 350,
|
||||
Height = 250,
|
||||
WindowStartupLocation = WindowStartupLocation.CenterOwner
|
||||
};
|
||||
|
||||
if (parentWindow != null) win.Show(parentWindow);
|
||||
else win.Show();
|
||||
|
||||
|
||||
return "Окно открыто успешно";
|
||||
|
||||
case "Пинг":
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<Message Text="Копирую Module.dll в папку ядра..." Importance="high" />
|
||||
|
||||
<Copy SourceFiles="@(ModuleFiles)"
|
||||
DestinationFolder="E:\Project\Visual\VisionAsist\VisionAsist\bin\Debug\net10.0\Modules\ModuleWeather"
|
||||
DestinationFolder="/home/egor/RiderProjects/Vision/VisionAsist/bin/Debug/net10.0/Modules/ModuleWeather/"
|
||||
OverwriteReadOnlyFiles="true" />
|
||||
</Target>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user