This commit is contained in:
Thomas Peterson 2024-11-05 19:24:41 +01:00
parent 9986b60b48
commit 1ec07564e8
15 changed files with 135 additions and 128 deletions

View File

@ -0,0 +1 @@
PSCHelpdesk

View File

@ -16,7 +16,7 @@
<entry key="PSCHelpdesk/PSCHelpdesk/Views/Settings.axaml" value="PSCHelpdesk/PSCHelpdesk.Desktop/PSCHelpdesk.Desktop.csproj" />
<entry key="PSCHelpdesk/PSCHelpdesk/Views/SettingsView.axaml" value="PSCHelpdesk/PSCHelpdesk.Desktop/PSCHelpdesk.Desktop.csproj" />
<entry key="PSCHelpdesk/PSCHelpdesk/Views/SettingsWindow.axaml" value="PSCHelpdesk/PSCHelpdesk.Browser/PSCHelpdesk.Browser.csproj" />
<entry key="PSCHelpdesk/PSCHelpdesk/Views/TestView.axaml" value="PSCHelpdesk/PSCHelpdesk.Browser/PSCHelpdesk.Browser.csproj" />
<entry key="PSCHelpdesk/PSCHelpdesk/Views/TestView.axaml" value="PSCHelpdesk/PSCHelpdesk.Desktop/PSCHelpdesk.Desktop.csproj" />
<entry key="Shared/Views/MenuItem.axaml" value="PSCHelpdesk/PSCHelpdesk.Desktop/PSCHelpdesk.Desktop.csproj" />
</map>
</option>

View File

@ -11,21 +11,17 @@
</component>
<component name="ChangeListManager">
<list default="true" id="95257dc5-08bd-4c50-8726-85956b3c2c92" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/.idea/.idea.PSCHelpdesk/.idea/.name" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/.idea.PSCHelpdesk/.idea/avalonia.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.PSCHelpdesk/.idea/avalonia.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/.idea.PSCHelpdesk/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.PSCHelpdesk/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/HetznerServer/HetznerServer.cs" beforeDir="false" afterPath="$PROJECT_DIR$/HetznerServer/HetznerServer.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/HetznerServer/HetznerServer.csproj" beforeDir="false" afterPath="$PROJECT_DIR$/HetznerServer/HetznerServer.csproj" afterDir="false" />
<change beforePath="$PROJECT_DIR$/HetznerServer/HetznerServerBootstrap.cs" beforeDir="false" afterPath="$PROJECT_DIR$/HetznerServer/HetznerServerBootstrap.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/HetznerServer/Views/ServerView.axaml" beforeDir="false" afterPath="$PROJECT_DIR$/HetznerServer/Views/ServerView.axaml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/PSCHelpdesk.sln.DotSettings.user" beforeDir="false" afterPath="$PROJECT_DIR$/PSCHelpdesk.sln.DotSettings.user" afterDir="false" />
<change beforePath="$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/Services/MenuService.cs" beforeDir="false" afterPath="$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/Services/MenuService.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/Services/PluginService.cs" beforeDir="false" afterPath="$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/Services/PluginService.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/Startup.cs" beforeDir="false" afterPath="$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/Startup.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/ViewModels/MainWindowViewModel.cs" beforeDir="false" afterPath="$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/ViewModels/MainWindowViewModel.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/Views/ContentDisplay.axaml.cs" beforeDir="false" afterPath="$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/Views/ContentDisplay.axaml.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/Views/MainWindow.axaml" beforeDir="false" afterPath="$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/Views/MainWindow.axaml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Shared/Menu/Item.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Shared/Menu/Item.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Shared/Plugin/Contract.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Shared/Plugin/Contract.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Vendor/Prise.ReverseProxy/Prise.ReverseProxy.csproj" beforeDir="false" afterPath="$PROJECT_DIR$/Vendor/Prise.ReverseProxy/Prise.ReverseProxy.csproj" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Vendor/Prise/Infrastructure/JsonSerializerParameterConverter.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Vendor/Prise/Infrastructure/JsonSerializerParameterConverter.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Vendor/Prise/Infrastructure/JsonSerializerResultConverter.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Vendor/Prise/Infrastructure/JsonSerializerResultConverter.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Vendor/Prise/Prise.csproj" beforeDir="false" afterPath="$PROJECT_DIR$/Vendor/Prise/Prise.csproj" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -39,16 +35,16 @@
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="HighlightingSettingsPerFile">
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/SourcesCache/1b81cb3be224213a6a73519b6e340a628d9a1fb8629c351a186a26f6376669/List.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/SourcesCache/1c9517d527f614396dfa453346e69acfefb958c4c59d7fbef256bbab3538d/ArgumentNullException.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/SourcesCache/1eb3d84af5e656ecdf75c8c4df55d5f931ced552db5e04c6fc85b4ecf45288/ConcurrentDictionary.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/SourcesCache/2e6883f773fb7c69a15db509adac9a0c068e4ca54fa119e835fd2324311c3b/Ioc.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/SourcesCache/473d97221b573ab97e6e745d8adae8b9e95a666539d6ed3cc8566b245d93a/ArgumentNullException.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/SourcesCache/733ec677d6c51f97541ef76ab82bf19a08e02c42b0f78d439f4b3b24dfdbb/Attribute.CoreCLR.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/SourcesCache/7e333a9f3297ba553cccfd3b7c3f1f96125b23d09f883e4d6e66d531559a4c/Type.CoreCLR.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/SourcesCache/8874fa6fbc50b05ba8332188d36141eb4bba81fb1f92189ba9d7a25f545/ThrowHelper.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/SourcesCache/5cde391207de75962d7bacb899ca2bd3985c86911b152d185b58999a422bf0/Type.CoreCLR.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/SourcesCache/87c584767b46b5fd42769be76547105558e6690f785614efddca134b2d682/Type.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/SourcesCache/9d4f4ac7db6d2c5d183ab2d92602280ed4349fd6e6a1b6313546b3d01fdab5/ServiceProvider.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/SourcesCache/baf2eef7c7bbea3742b74ee71fe7168c3a8c2269a1ce22d51333175656840/RuntimeType.CoreCLR.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/SourcesCache/bf9021a960b74107a7e141aa06bc9d8a0a53c929178c2fb95b1597be8af8dc/ExceptionDispatchInfo.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/SourcesCache/e2e3d26278e439d44964729238a685ad58d3189abf8fb84cdfe34b893a290a2/JsonSerializerInternalWriter.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/SourcesCache/f3981d658666ec9cc1e6958fe22f8614bfe02ccb6625b056c3ece3729c9262/JsonConvert.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/SourcesCache/ad1d58b8dd22123dfae3f2cf5d8b199992465c9c344d032f93a826d8e5539ff/RuntimeType.CoreCLR.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/SourcesCache/bc57ab3db8ad1c2d647f4171d82a80762571212ac42bb1eac4ed63162acdc4ed/RuntimeType.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/SourcesCache/bd1d5c50194fea68ff3559c160230b0ab50f5acf4ce3061bffd6d62958e2182/ExceptionDispatchInfo.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/HetznerServer/ViewModels/ServerViewModel.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/HetznerServer/Views/ServerView.axaml" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/HetznerServer/Views/ServerView.axaml.cs" root0="FORCE_HIGHLIGHTING" />
@ -60,6 +56,7 @@
<facet id="PSCHelpdesk.Android/invalid/Android Facet - PSCHelpdesk.Android" />
</ignored-facets>
</component>
<component name="MetaFilesCheckinStateConfiguration" checkMetaFiles="false" />
<component name="ProblemsViewState">
<option name="selectedTabId" value="Toolset" />
</component>
@ -178,7 +175,19 @@
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="3" />
</component>
<component name="UnityCheckinConfiguration" checkUnsavedScenes="false" />
<component name="UnityProjectConfiguration" hasMinimizedUI="false" />
<component name="Vcs.Log.Tabs.Properties">
<option name="TAB_STATES">
<map>
<entry key="MAIN">
<value>
<State />
</value>
</entry>
</map>
</option>
</component>
<component name="VcsManagerConfiguration">
<option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="true" />
</component>
@ -187,13 +196,13 @@
<breakpoints>
<line-breakpoint enabled="true" type="DotNet Breakpoints">
<url>file://$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/Views/ContentDisplay.axaml.cs</url>
<line>37</line>
<line>39</line>
<properties documentPath="$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/Views/ContentDisplay.axaml.cs" containingFunctionPresentation="Property 'SelectedItem'">
<startOffsets>
<option value="1257" />
<option value="1331" />
</startOffsets>
<endOffsets>
<option value="1300" />
<option value="1374" />
</endOffsets>
</properties>
<option name="timeStamp" value="82" />
@ -211,97 +220,6 @@
</properties>
<option name="timeStamp" value="92" />
</line-breakpoint>
<line-breakpoint enabled="true" type="DotNet Breakpoints">
<url>file://$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/ViewModels/MainWindowViewModel.cs</url>
<line>75</line>
<properties documentPath="$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/ViewModels/MainWindowViewModel.cs" containingFunctionPresentation="Method 'SelectMenu'">
<startOffsets>
<option value="2177" />
</startOffsets>
<endOffsets>
<option value="2295" />
</endOffsets>
</properties>
<option name="timeStamp" value="113" />
</line-breakpoint>
<line-breakpoint enabled="true" type="DotNet Breakpoints">
<url>file://$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/Services/PluginService.cs</url>
<line>85</line>
<properties documentPath="$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/Services/PluginService.cs" containingFunctionPresentation="Method 'LoadPlugin'">
<startOffsets>
<option value="3225" />
</startOffsets>
<endOffsets>
<option value="3242" />
</endOffsets>
</properties>
<option name="timeStamp" value="117" />
</line-breakpoint>
<line-breakpoint enabled="true" type="DotNet Breakpoints">
<url>file://$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/Services/PluginService.cs</url>
<line>87</line>
<properties documentPath="$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/Services/PluginService.cs" containingFunctionPresentation="Method 'LoadPlugin'">
<startOffsets>
<option value="3298" />
</startOffsets>
<endOffsets>
<option value="3324" />
</endOffsets>
</properties>
<option name="timeStamp" value="118" />
</line-breakpoint>
<line-breakpoint enabled="true" type="DotNet Breakpoints">
<url>file://$PROJECT_DIR$/Vendor/Prise/Infrastructure/JsonSerializerResultConverter.cs</url>
<line>21</line>
<properties documentPath="$PROJECT_DIR$/Vendor/Prise/Infrastructure/JsonSerializerResultConverter.cs" containingFunctionPresentation="Method 'Deserialize'">
<startOffsets>
<option value="676" />
</startOffsets>
<endOffsets>
<option value="729" />
</endOffsets>
</properties>
<option name="timeStamp" value="121" />
</line-breakpoint>
<line-breakpoint enabled="true" type="DotNet Breakpoints">
<url>file://$PROJECT_DIR$/Vendor/Prise/Infrastructure/JsonSerializerResultConverter.cs</url>
<line>20</line>
<properties documentPath="$PROJECT_DIR$/Vendor/Prise/Infrastructure/JsonSerializerResultConverter.cs" containingFunctionPresentation="Method 'Deserialize'">
<startOffsets>
<option value="618" />
</startOffsets>
<endOffsets>
<option value="663" />
</endOffsets>
</properties>
<option name="timeStamp" value="122" />
</line-breakpoint>
<line-breakpoint enabled="true" type="DotNet Breakpoints">
<url>file://$PROJECT_DIR$/Vendor/Prise/Infrastructure/JsonSerializerResultConverter.cs</url>
<line>19</line>
<properties documentPath="$PROJECT_DIR$/Vendor/Prise/Infrastructure/JsonSerializerResultConverter.cs" containingFunctionPresentation="Method 'Deserialize'">
<startOffsets>
<option value="592" />
</startOffsets>
<endOffsets>
<option value="605" />
</endOffsets>
</properties>
<option name="timeStamp" value="123" />
</line-breakpoint>
<line-breakpoint enabled="true" type="DotNet Breakpoints">
<url>file://$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/ViewModels/MainWindowViewModel.cs</url>
<line>53</line>
<properties documentPath="$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/ViewModels/MainWindowViewModel.cs" containingFunctionPresentation="Constructor 'MainWindowViewModel'">
<startOffsets>
<option value="1667" />
</startOffsets>
<endOffsets>
<option value="1717" />
</endOffsets>
</properties>
<option name="timeStamp" value="125" />
</line-breakpoint>
</breakpoints>
</breakpoint-manager>
</component>

View File

@ -24,8 +24,7 @@ public class HetznerServer : Contract
var serverTab = new Item()
{
Header = "Server",
CommandParameter = new ServerViewModel(),
GetView = new ServerView()
ViewModel = typeof(ServerViewModel)
};
menuService.AddMenuItem(serverTab);
//return serverTab;

View File

@ -1,4 +1,5 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AArgumentNullException_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FSourcesCache_003F1c9517d527f614396dfa453346e69acfefb958c4c59d7fbef256bbab3538d_003FArgumentNullException_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AArgumentNullException_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FSourcesCache_003F473d97221b573ab97e6e745d8adae8b9e95a666539d6ed3cc8566b245d93a_003FArgumentNullException_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AArray_002EEnumerators_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FSourcesCache_003F37bd8e7b5e226f349e547a5599819e82461d93768c749730253eeec329288a2b_003FArray_002EEnumerators_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AAsyncVoidMethodBuilder_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FSourcesCache_003Fe91a2750b979a5265711aaa020b980ebe7c5168bdf221ad2e32d16e3f74b8382_003FAsyncVoidMethodBuilder_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
@ -33,6 +34,7 @@
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AReplaySubject_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FSourcesCache_003F27be5d106a789638721745a2a46f9cb0f7a39905117d644638b6e0d56261be_003FReplaySubject_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ARuntimeType_002ECoreCLR_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FSourcesCache_003Fad1d58b8dd22123dfae3f2cf5d8b199992465c9c344d032f93a826d8e5539ff_003FRuntimeType_002ECoreCLR_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ARuntimeType_002ECoreCLR_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FSourcesCache_003Fbaf2eef7c7bbea3742b74ee71fe7168c3a8c2269a1ce22d51333175656840_003FRuntimeType_002ECoreCLR_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ARuntimeType_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FSourcesCache_003Fbc57ab3db8ad1c2d647f4171d82a80762571212ac42bb1eac4ed63162acdc4ed_003FRuntimeType_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASelectMany_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FSourcesCache_003Ff93d3944f37777fd1f922d0d91e96fb77c2f83024101cb4b92f8d9b68080da_003FSelectMany_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AServiceCollection_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FSourcesCache_003F33fa97197c7d5dc2e649bd1e13ca25ad6fd7928c626fa7796267b9434bd4ba_003FServiceCollection_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AServiceDescriptor_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FSourcesCache_003Ff53745e7f6e85d65317047eeae9af151fe9aca1cb284d27e5c83962a50be46_003FServiceDescriptor_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>

View File

@ -44,6 +44,11 @@ public class MenuService: ReactiveObject, IMenuService
Header = "Plugins B",
CommandParameter = Ioc.Default.GetService<PluginListViewModel>(),
};
var testTab = new Item()
{
Header = "Plugins T",
ViewModel = typeof(TestViewModel),
};
/*var settingsTab = new MenuItem()
{
Name = "Settings",
@ -51,6 +56,7 @@ public class MenuService: ReactiveObject, IMenuService
};*/
this.MenuItems.Add(pluginTab);
this.MenuItems.Add(testTab);
//this.MenuOptionItems.Add(settingsTab);
OnMenuChanged(EventArgs.Empty);
}

View File

@ -84,7 +84,6 @@ public class PluginService
{
loadedPlugins.Add(plugin.GetName(), plugin);
plugin.addMenu();
var t = plugin.load();
appService.AppIsStarted();
}
}

View File

@ -2,8 +2,11 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Reactive;
using System.Windows.Input;
using Avalonia.Controls;
using CommunityToolkit.Mvvm.DependencyInjection;
using CommunityToolkit.Mvvm.Input;
using Nucs.JsonSettings;
using PSCHelpdesk.Services;
using PSCHelpdesk.Shared.Menu;
using PSCHelpdesk.Shared.Service;
@ -15,13 +18,14 @@ namespace PSCHelpdesk.ViewModels;
public class MainWindowViewModel : ViewModelBase
{
private MenuService _menuService;
public ReactiveCommand<MenuItem, Unit> ClickMenu { get; }
public ReactiveCommand<string, Unit> ClickMenu { get; }
public MenuService MenuService
{
get => this._menuService;
private set => SetAndRaisePropertyChanged(ref this._menuService, value);
}
private object _contentDisplay;
private Item _selectedItem;
public Item SelectedItem
@ -29,8 +33,16 @@ public class MainWindowViewModel : ViewModelBase
get => _selectedItem;
set => SetAndRaisePropertyChanged(ref _selectedItem, value);
}
public object ContentDisplay
{
get => _contentDisplay;
set => SetAndRaisePropertyChanged(ref _contentDisplay, value);
}
public MainWindowViewModel()
{
ClickMenu = ReactiveCommand.Create<string>(SelectMenu);
this.MenuItems = new List<Item>();
Startup.RegisterServices();
this.MenuService = (MenuService)Ioc.Default.GetService(typeof(IMenuService));
@ -51,9 +63,7 @@ public class MainWindowViewModel : ViewModelBase
this.InitializeClient();
this.SelectedItem = MenuService.MenuItems.First();
ClickMenu = ReactiveCommand.Create<MenuItem>(SelectMenu);
this.SelectedItem = MenuService.MenuItems.Last();
}
@ -70,13 +80,34 @@ public class MainWindowViewModel : ViewModelBase
this.MenuService.CreateMenu();
}
public void SelectMenu(MenuItem parameter)
public object SelectedContent
{
get
{
if (SelectedItem.ViewModel != null)
{
var vm = SelectedItem.ViewModel.CreateInstance();
return vm;
}
return this.SelectedItem?.CommandParameter;
}
}
public void SelectMenu(string parameter)
{
//this.SelectedItem = parameter;
var obj = this.MenuService.MenuItems.FirstOrDefault(menuItem => menuItem.Header == parameter.Header.ToString(), null);
var obj = this.MenuService.MenuItems.FirstOrDefault(menuItem => menuItem.Header == parameter.ToString(), null);
if (obj != null)
{
this.SelectedItem = obj;
if (obj.ViewModel != null)
{
this.ContentDisplay = obj.ViewModel.CreateInstance();
}
else
{
this.ContentDisplay = obj.CommandParameter;
}
}
}
}

View File

@ -0,0 +1,11 @@
using PSCHelpdesk.Shared.ViewModels;
namespace PSCHelpdesk.ViewModels;
public partial class TestViewModel: ViewModelBase
{
public TestViewModel()
{
}
}

View File

@ -1,6 +1,8 @@
using Avalonia;
using Avalonia.Controls.Primitives;
using Avalonia.Data;
using CommunityToolkit.Mvvm.DependencyInjection;
using Nucs.JsonSettings;
using PSCHelpdesk.Shared.Menu;
namespace PSCHelpdesk.Views;
@ -69,9 +71,17 @@ public class ContentDisplay : TemplatedControl
public object SelectedContent
{
get => this.SelectedItem?.CommandParameter ?? this.SelectedOption?.CommandParameter;
get
{
if (SelectedItem.ViewModel != null)
{
var vm = SelectedItem.ViewModel.CreateInstance();
return vm;
}
return this.SelectedItem?.CommandParameter ?? this.SelectedOption?.CommandParameter;
}
}
public static void SelectionChanged(AvaloniaObject avaloniaObject, bool done, bool isOption)
{
if (avaloniaObject is ContentDisplay contentDisplay && done)

View File

@ -26,13 +26,18 @@
<Style Selector="MenuItem.SubItems MenuItem" x:DataType="vs:Item">
<Setter Property="Header" Value="{Binding Header }"/>
<Setter Property="ItemsSource" Value="{Binding Items}"/>
<Setter Property="Command" Value="{Binding Command}"/>
<Setter Property="CommandParameter" Value="{Binding $self}"/>
<Setter Property="Command" Value="{Binding Command }"></Setter>
<Setter Property="CommandParameter" Value="{Binding Header}"></Setter>
</Style>
</MenuItem.Styles>
<!--<MenuItem.ItemTemplate>
<DataTemplate>
<MenuItem Header="{Binding Header}" Command="{Binding Command }" CommandParameter="{Binding Header}"/>
</DataTemplate>
</MenuItem.ItemTemplate>-->
</MenuItem>
</Menu>
<!--<ContentControl Content="{Binding SelectedContent}"></ContentControl>-->
<views:ContentDisplay SelectedItem="{Binding SelectedItem}"/>
<ContentControl Content="{Binding ContentDisplay}"></ContentControl>
<!--<views:ContentDisplay SelectedItem="{Binding SelectedItem}"/>-->
</DockPanel>
</Window>

View File

@ -0,0 +1,8 @@
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="PSCHelpdesk.Views.TestView">
Welcome to Avalonia!
</UserControl>

View File

@ -0,0 +1,13 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace PSCHelpdesk.Views;
public partial class TestView : UserControl
{
public TestView()
{
InitializeComponent();
}
}

View File

@ -10,7 +10,10 @@ public class Item
public string Header { get; set; }
public ICommand Command { get; set; }
public object CommandParameter { get; set; }
public Type ViewModel { get; set; }
public UserControl GetView { get; set; }
public IList<Item> Items { get; set; }

View File

@ -8,6 +8,7 @@ namespace Prise.Infrastructure
{
public object ConvertToRemoteType(Type localType, object value)
{
//return value;
var json = JsonConvert.SerializeObject(value);
return JsonConvert.DeserializeObject(json, localType);
}