Backup
This commit is contained in:
parent
9b5b71d46f
commit
28e5b078e4
@ -14,8 +14,9 @@
|
||||
<entry key="PSCHelpdesk/PSCHelpdesk/Views/MenuItem.axaml" value="PSCHelpdesk/PSCHelpdesk.Desktop/PSCHelpdesk.Desktop.csproj" />
|
||||
<entry key="PSCHelpdesk/PSCHelpdesk/Views/PluginListView.axaml" value="PSCHelpdesk/PSCHelpdesk.Desktop/PSCHelpdesk.Desktop.csproj" />
|
||||
<entry key="PSCHelpdesk/PSCHelpdesk/Views/Settings.axaml" value="PSCHelpdesk/PSCHelpdesk.Desktop/PSCHelpdesk.Desktop.csproj" />
|
||||
<entry key="PSCHelpdesk/PSCHelpdesk/Views/SettingsGlobalView.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/SettingsWindow.axaml" value="PSCHelpdesk/PSCHelpdesk.Desktop/PSCHelpdesk.Desktop.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>
|
||||
|
||||
@ -11,21 +11,26 @@
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="95257dc5-08bd-4c50-8726-85956b3c2c92" name="Changes" comment="">
|
||||
<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/ViewModels/ServerViewModel.cs" beforeDir="false" afterPath="$PROJECT_DIR$/HetznerServer/ViewModels/ServerViewModel.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/HetznerServer/HetznerServerBootstrap.cs" beforeDir="false" afterPath="$PROJECT_DIR$/HetznerServer/HetznerServerBootstrap.cs" 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/PSCHelpdesk.csproj" beforeDir="false" afterPath="$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/PSCHelpdesk.csproj" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/Models/GlobalSetting.cs" beforeDir="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/ViewLocator.cs" beforeDir="false" afterPath="$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/ViewLocator.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/ViewModels/TestViewModel.cs" beforeDir="false" afterPath="$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/ViewModels/TestViewModel.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/ViewModels/PluginListViewModel.cs" beforeDir="false" afterPath="$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/ViewModels/PluginListViewModel.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/ViewModels/SettingsViewModel.cs" beforeDir="false" afterPath="$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/ViewModels/SettingsViewModel.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$/PSCHelpdesk/PSCHelpdesk/Views/SettingsView.axaml" beforeDir="false" afterPath="$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/Views/SettingsView.axaml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/Views/SettingsView.axaml.cs" beforeDir="false" afterPath="$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/Views/SettingsView.axaml.cs" 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$/Shared/ViewModels/ViewModelBase.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Shared/ViewModels/ViewModelBase.cs" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
@ -39,24 +44,19 @@
|
||||
<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/2e6883f773fb7c69a15db509adac9a0c068e4ca54fa119e835fd2324311c3b/Ioc.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/SourcesCache/3136d46cb2145ae4698247cf0e3184f3890aa4e35a1642b3de4ed83203721fd/Type.Helpers.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/5094e71058416d72278f32a6913f67a9c664bd46c296c5cce3ee63993dde3f/Type.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/SourcesCache/5ef9e37e2f99ef2688a1586afed1cff6eef912a11aa9b20a56943a255a6e6b/RuntimeHelpers.CoreCLR.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/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/c05785bcebd2c944852db620e6681c606cd57f85b59fc5ddfcfbe9a68d634f/MemoryMarshal.CoreCLR.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/f91e6f22e2c4f30c4c01c74733e2bd93a2a62d298dd2793a59d01ea2134d/TypeNameResolver.CoreCLR.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/SourcesCache/c7102cd0ffb8973777e61b1942c3fffac7e14016a511d055c3adf73ff91748/ThrowHelper.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" />
|
||||
<setting file="mock://C:/Users/info/RiderProjects/pschelpdesk/PSCHelpdesk/PSCHelpdesk/ViewModels/SettingsViewModel.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="mock://C:/Users/info/RiderProjects/pschelpdesk/PSCHelpdesk/PSCHelpdesk/ViewModels/SettingsViewModel.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="mock://C:/Users/info/RiderProjects/pschelpdesk/PSCHelpdesk/PSCHelpdesk/ViewModels/SettingsViewModel.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="mock://C:/Users/info/RiderProjects/pschelpdesk/PSCHelpdesk/PSCHelpdesk/ViewModels/SettingsViewModel.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="mock://C:/Users/info/RiderProjects/pschelpdesk/PSCHelpdesk/PSCHelpdesk/ViewModels/SettingsViewModel.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Vendor/Prise/AssemblyScanning/DefaultAssemblyResolver.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Vendor/Prise/DefaultPluginLoader.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Vendor/Prise/DependencyInjection/ServiceCollectionExtensions.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
@ -85,7 +85,7 @@
|
||||
<component name="PropertiesComponent"><![CDATA[{
|
||||
"keyToString": {
|
||||
".NET Project.PSCHelpdesk.Desktop ohne plugin.executor": "Run",
|
||||
".NET Project.PSCHelpdesk.Desktop.executor": "Debug",
|
||||
".NET Project.PSCHelpdesk.Desktop.executor": "Run",
|
||||
"Publish to folder.Build HetznerServer Plugin Debug.executor": "Run",
|
||||
"Publish to folder.Publish HetznerServer to folder.executor": "Run",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
@ -199,6 +199,7 @@
|
||||
<workItem from="1730626276818" duration="15656000" />
|
||||
<workItem from="1730716176795" duration="11704000" />
|
||||
<workItem from="1730749692901" duration="5980000" />
|
||||
<workItem from="1730887536949" duration="12370000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
@ -227,99 +228,41 @@
|
||||
<line-breakpoint enabled="true" type="DotNet Breakpoints">
|
||||
<url>file://$PROJECT_DIR$/HetznerServer/Menu/MainMenu.cs</url>
|
||||
<line>13</line>
|
||||
<properties documentPath="C:\Users\info\RiderProjects\pschelpdesk\HetznerServer\Menu\MainMenu.cs" containingFunctionPresentation="Method 'addMenu'" />
|
||||
<properties documentPath="C:\Users\info\RiderProjects\pschelpdesk\HetznerServer\Menu\MainMenu.cs" containingFunctionPresentation="Method 'addMenu'">
|
||||
<startOffsets>
|
||||
<option value="335" />
|
||||
</startOffsets>
|
||||
<endOffsets>
|
||||
<option value="428" />
|
||||
</endOffsets>
|
||||
</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>93</line>
|
||||
<properties documentPath="$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/ViewModels/MainWindowViewModel.cs" containingFunctionPresentation="Property 'SelectedContent'">
|
||||
<url>file://$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/ViewModels/SettingsViewModel.cs</url>
|
||||
<line>38</line>
|
||||
<properties documentPath="C:\Users\info\RiderProjects\pschelpdesk\PSCHelpdesk\PSCHelpdesk\ViewModels\SettingsViewModel.cs" containingFunctionPresentation="Constructor 'SettingsViewModel'">
|
||||
<startOffsets>
|
||||
<option value="2635" />
|
||||
<option value="1051" />
|
||||
</startOffsets>
|
||||
<endOffsets>
|
||||
<option value="2667" />
|
||||
<option value="1136" />
|
||||
</endOffsets>
|
||||
</properties>
|
||||
<option name="timeStamp" value="128" />
|
||||
<option name="timeStamp" value="146" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="DotNet Breakpoints">
|
||||
<url>file://$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/ViewModels/MainWindowViewModel.cs</url>
|
||||
<line>94</line>
|
||||
<properties documentPath="$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/ViewModels/MainWindowViewModel.cs" containingFunctionPresentation="Property 'SelectedContent'">
|
||||
<url>file://$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/ViewModels/SettingsViewModel.cs</url>
|
||||
<line>36</line>
|
||||
<properties documentPath="C:\Users\info\RiderProjects\pschelpdesk\PSCHelpdesk\PSCHelpdesk\ViewModels\SettingsViewModel.cs" containingFunctionPresentation="Constructor 'SettingsViewModel'">
|
||||
<startOffsets>
|
||||
<option value="2684" />
|
||||
<option value="979" />
|
||||
</startOffsets>
|
||||
<endOffsets>
|
||||
<option value="2694" />
|
||||
<option value="1028" />
|
||||
</endOffsets>
|
||||
</properties>
|
||||
<option name="timeStamp" value="129" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="DotNet Breakpoints">
|
||||
<url>file://$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/ViewLocator.cs</url>
|
||||
<line>25</line>
|
||||
<properties documentPath="$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/ViewLocator.cs" containingFunctionPresentation="Method 'Build'">
|
||||
<startOffsets>
|
||||
<option value="661" />
|
||||
</startOffsets>
|
||||
<endOffsets>
|
||||
<option value="691" />
|
||||
</endOffsets>
|
||||
</properties>
|
||||
<option name="timeStamp" value="131" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="DotNet Breakpoints">
|
||||
<url>file://$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/ViewLocator.cs</url>
|
||||
<line>27</line>
|
||||
<properties documentPath="$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/ViewLocator.cs" containingFunctionPresentation="Method 'Build'">
|
||||
<startOffsets>
|
||||
<option value="709" />
|
||||
</startOffsets>
|
||||
<endOffsets>
|
||||
<option value="726" />
|
||||
</endOffsets>
|
||||
</properties>
|
||||
<option name="timeStamp" value="132" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="DotNet Breakpoints">
|
||||
<url>file://$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/ViewModels/MainWindowViewModel.cs</url>
|
||||
<line>113</line>
|
||||
<properties documentPath="$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/ViewModels/MainWindowViewModel.cs" containingFunctionPresentation="Method 'SelectMenu'">
|
||||
<startOffsets>
|
||||
<option value="3273" />
|
||||
</startOffsets>
|
||||
<endOffsets>
|
||||
<option value="3309" />
|
||||
</endOffsets>
|
||||
</properties>
|
||||
<option name="timeStamp" value="136" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="DotNet Breakpoints">
|
||||
<url>file://$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/ViewModels/MainWindowViewModel.cs</url>
|
||||
<line>86</line>
|
||||
<properties documentPath="$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/ViewModels/MainWindowViewModel.cs" containingFunctionPresentation="Property 'SelectedContent'">
|
||||
<startOffsets>
|
||||
<option value="2421" />
|
||||
</startOffsets>
|
||||
<endOffsets>
|
||||
<option value="2454" />
|
||||
</endOffsets>
|
||||
</properties>
|
||||
<option name="timeStamp" value="137" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="DotNet Breakpoints">
|
||||
<url>file://$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/ViewModels/MainWindowViewModel.cs</url>
|
||||
<line>107</line>
|
||||
<properties documentPath="$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/ViewModels/MainWindowViewModel.cs" containingFunctionPresentation="Method 'SelectMenu'">
|
||||
<startOffsets>
|
||||
<option value="3082" />
|
||||
</startOffsets>
|
||||
<endOffsets>
|
||||
<option value="3115" />
|
||||
</endOffsets>
|
||||
</properties>
|
||||
<option name="timeStamp" value="138" />
|
||||
<option name="timeStamp" value="147" />
|
||||
</line-breakpoint>
|
||||
</breakpoints>
|
||||
</breakpoint-manager>
|
||||
|
||||
@ -18,24 +18,28 @@ public class HetznerServer : Contract
|
||||
return "HetznerServerPlugin";
|
||||
}
|
||||
|
||||
public Item addMenu()
|
||||
public void Configure()
|
||||
{
|
||||
//var menuService = Ioc.Default.GetService<IMenuService>();
|
||||
var menuService = Ioc.Default.GetRequiredService<IMenuService>();
|
||||
var serverTab = new Item()
|
||||
{
|
||||
Header = "Server",
|
||||
CommandParameter = new ServerViewModel()
|
||||
};
|
||||
//menuService.AddMenuItem(serverTab);
|
||||
return serverTab;
|
||||
menuService.AddMenuItem(serverTab);
|
||||
|
||||
var settingsService = Ioc.Default.GetRequiredService<ISettingsService>();
|
||||
var hetznerSettings = new Shared.Setting.Item()
|
||||
{
|
||||
Header = "HetznerSettings",
|
||||
CommandParameter = new HetznerSettingsViewModel()
|
||||
};
|
||||
settingsService.AddSetting(hetznerSettings);
|
||||
}
|
||||
|
||||
public UserControl LoadView()
|
||||
public List<UserControl> LoadViews()
|
||||
{
|
||||
return new ServerView();
|
||||
return [new ServerView(), new HetznerSettingsView()];
|
||||
}
|
||||
|
||||
public object LoadViewModel()
|
||||
{
|
||||
return new ServerViewModel();
|
||||
}
|
||||
}
|
||||
@ -23,26 +23,26 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="Avalonia.Controls">
|
||||
<Reference Include="Avalonia.Controls" Private="false">
|
||||
<HintPath>..\..\..\.nuget\packages\avalonia\11.2.0\ref\net8.0\Avalonia.Controls.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Avalonia.Controls.DataGrid">
|
||||
<Reference Include="Avalonia.Controls.DataGrid" Private="false">
|
||||
<HintPath>..\..\..\.nuget\packages\avalonia.controls.datagrid\11.2.0\lib\net8.0\Avalonia.Controls.DataGrid.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="CommunityToolkit.Mvvm">
|
||||
<Reference Include="CommunityToolkit.Mvvm" Private="false">
|
||||
<HintPath>..\..\..\.nuget\packages\communitytoolkit.mvvm\8.2.1\lib\net6.0\CommunityToolkit.Mvvm.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia" Version="11.2.0" />
|
||||
<PackageReference Include="Avalonia.ReactiveUI" Version="11.2.0" />
|
||||
<PackageReference Include="Avalonia.Xaml.Behaviors" Version="11.2.0" />
|
||||
<PackageReference Include="Avalonia.Xaml.Interactions" Version="11.2.0" />
|
||||
<PackageReference Include="HetznerCloud.API" Version="1.1.9" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
|
||||
<PackageReference Include="Prise.Plugin" Version="6.0.0" />
|
||||
<PackageReference Include="Prise.ReverseProxy" Version="6.1.0" />
|
||||
<PackageReference Include="Avalonia" Version="11.2.0" Private="false" />
|
||||
<PackageReference Include="Avalonia.ReactiveUI" Version="11.2.0" Private="false" />
|
||||
<PackageReference Include="Avalonia.Xaml.Behaviors" Version="11.2.0" Private="false" />
|
||||
<PackageReference Include="Avalonia.Xaml.Interactions" Version="11.2.0" Private="false" />
|
||||
<PackageReference Include="HetznerCloud.API" Version="1.1.9" Private="false" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Private="false" Version="8.0.1" />
|
||||
<PackageReference Include="Prise.Plugin" Version="6.0.0" Private="false" />
|
||||
<PackageReference Include="Prise.ReverseProxy" Version="6.1.0" Private="false" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@ -6,17 +6,15 @@ using Prise.Plugin;
|
||||
|
||||
namespace PSCHelpdesk.Plugins.HetznerServer;
|
||||
|
||||
[PluginBootstrapper(PluginType = typeof(HetznerServer))]
|
||||
|
||||
public class HetznerServerBootstrap : IPluginBootstrapper
|
||||
{
|
||||
[BootstrapperService(ServiceType = typeof(IMenuService), ProxyType = typeof(MenuService))]
|
||||
private readonly IMenuService menuService;
|
||||
|
||||
public IServiceCollection Bootstrap(IServiceCollection services)
|
||||
{
|
||||
services.AddSingleton<IMenuService>(this.menuService);
|
||||
services.AddTransient<ServerViewModel>();
|
||||
Ioc.Default.ConfigureServices(services.BuildServiceProvider());
|
||||
return services;
|
||||
}
|
||||
}
|
||||
|
||||
6
HetznerServer/Models/Settings.cs
Normal file
6
HetznerServer/Models/Settings.cs
Normal file
@ -0,0 +1,6 @@
|
||||
namespace PSCHelpdesk.Plugins.HetznerServer.Models;
|
||||
|
||||
public class Settings
|
||||
{
|
||||
|
||||
}
|
||||
26
HetznerServer/ViewModels/HetznerSettingsViewModel.cs
Normal file
26
HetznerServer/ViewModels/HetznerSettingsViewModel.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using Avalonia.Controls;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using HetznerCloudApi;
|
||||
using PSCHelpdesk.Plugins.HetznerServer.Models;
|
||||
using PSCHelpdesk.Plugins.HetznerServer.Views;
|
||||
using PSCHelpdesk.Shared.ViewModels;
|
||||
|
||||
namespace PSCHelpdesk.Plugins.HetznerServer.ViewModels;
|
||||
|
||||
public partial class HetznerSettingsViewModel : ViewModelBase, IViewModelBase
|
||||
{
|
||||
private string _apiKey;
|
||||
public HetznerSettingsViewModel()
|
||||
{
|
||||
LocalSetting settings = new LocalSetting();
|
||||
settings.Load();
|
||||
|
||||
}
|
||||
|
||||
public string ApiKey
|
||||
{
|
||||
get => _apiKey;
|
||||
set => SetAndRaisePropertyChanged(ref _apiKey, value);
|
||||
}
|
||||
}
|
||||
8
HetznerServer/Views/HetznerSettingsView.axaml
Normal file
8
HetznerServer/Views/HetznerSettingsView.axaml
Normal 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.Plugins.HetznerServer.Views.HetznerSettingsView">
|
||||
Welcome to settings hetzner!
|
||||
</UserControl>
|
||||
13
HetznerServer/Views/HetznerSettingsView.axaml.cs
Normal file
13
HetznerServer/Views/HetznerSettingsView.axaml.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace PSCHelpdesk.Plugins.HetznerServer.Views;
|
||||
|
||||
public partial class HetznerSettingsView : UserControl
|
||||
{
|
||||
public HetznerSettingsView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
@ -45,6 +45,7 @@
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AString_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FSourcesCache_003Fdad3f0ebff0dd1f8e1d244c3c44c649be8228d5e25fb37ef1de7f3c0e261c_003FString_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AStyledElement_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FSourcesCache_003Fb06c2ce0981bf6e5989cda2e3e737e53c2d54ee6ae7e7ce318d378f52e5f66_003FStyledElement_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASystemDialog_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FSourcesCache_003F8f5178316d8f8271b8f333bd87cd9e9f7da6764081a31277e776c6cdcb3a25a8_003FSystemDialog_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AThrowHelper_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FSourcesCache_003Fc7102cd0ffb8973777e61b1942c3fffac7e14016a511d055c3adf73ff91748_003FThrowHelper_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AThrowHelper_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FSourcesCache_003F4743f513c7ddc8411223a46f0ca426ed929391acebcff993721dff2f0c6b34_003FThrowHelper_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AThrowHelper_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FSourcesCache_003F8874fa6fbc50b05ba8332188d36141eb4bba81fb1f92189ba9d7a25f545_003FThrowHelper_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AThrowHelper_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FSourcesCache_003F8874fa6fbc50b05ba8332188d36141eb4bba81fb1f92189ba9d7a25f545_003FThrowHelper_002Ecs_002Fz_003A2_002D1/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
|
||||
@ -1,10 +0,0 @@
|
||||
using Nucs.JsonSettings;
|
||||
|
||||
namespace PSCHelpdesk.Models;
|
||||
|
||||
public class GlobalSetting: JsonSettings
|
||||
{
|
||||
public string HetznerApiKey { get; set; }
|
||||
|
||||
public override string FileName { get; set; }
|
||||
}
|
||||
@ -47,7 +47,7 @@ public class MenuService: ReactiveObject, IMenuService
|
||||
var testTab = new Item()
|
||||
{
|
||||
Header = "Plugins T",
|
||||
ViewModel = typeof(TestViewModel),
|
||||
CommandParameter = new TestViewModel(),
|
||||
};
|
||||
/*var settingsTab = new MenuItem()
|
||||
{
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using System.Linq;
|
||||
using Avalonia.Controls;
|
||||
using CommunityToolkit.Mvvm.DependencyInjection;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using PSCHelpdesk.Shared.Menu;
|
||||
@ -18,6 +19,7 @@ public class PluginService
|
||||
private List<string> toLoadPlugins = new List<string>();
|
||||
private Dictionary<string, Contract> loadedPlugins = new Dictionary<string, Contract>();
|
||||
private Dictionary<string, string> foundPlugins = new Dictionary<string, string>();
|
||||
private Dictionary<string, UserControl> controls = new Dictionary<string, UserControl>();
|
||||
|
||||
public PluginService()
|
||||
{
|
||||
@ -60,9 +62,9 @@ public class PluginService
|
||||
|
||||
var pluginLoader = Ioc.Default.GetService(typeof(IPluginLoader)) as IPluginLoader;
|
||||
var menuService = Ioc.Default.GetRequiredService<IMenuService>();
|
||||
var settingsService = Ioc.Default.GetRequiredService<ISettingsService>();
|
||||
var testService = Ioc.Default.GetRequiredService<ITestService>();
|
||||
var appService = Ioc.Default.GetService(typeof(AppService)) as AppService;
|
||||
//var settingsService = Ioc.Default.GetService<SettingsManager>();
|
||||
|
||||
var pluginAssemblies = await pluginLoader.FindPlugins<Contract>(getPluginPath());
|
||||
var pluginToEnable = pluginAssemblies.FirstOrDefault(p => Path.GetFileNameWithoutExtension(p.AssemblyName) == pluginName);
|
||||
@ -75,6 +77,7 @@ public class PluginService
|
||||
.AddHostTypes(new[] {typeof(Application), typeof(Item)})
|
||||
.AddRemoteTypes(new []{typeof(Item)})
|
||||
.AddHostService<IMenuService>(menuService)
|
||||
.AddHostService<ISettingsService>(settingsService)
|
||||
.AddHostService<ITestService>(testService)
|
||||
//.AddHostService<SettingsManager>(settingsService)
|
||||
|
||||
@ -85,13 +88,26 @@ public class PluginService
|
||||
if (!this.loadedPlugins.ContainsKey(pluginName))
|
||||
{
|
||||
loadedPlugins.Add(plugin.GetName(), plugin);
|
||||
var item = plugin.addMenu();
|
||||
item.GetView = plugin.LoadView();
|
||||
item.ViewModel = plugin.LoadViewModel();
|
||||
menuService.AddMenuItem(item);
|
||||
plugin.Configure();
|
||||
var items = plugin.LoadViews();
|
||||
foreach (var item in items)
|
||||
{
|
||||
this.controls.Add(item.GetType().FullName, item);
|
||||
}
|
||||
|
||||
appService.AppIsStarted();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public UserControl GetView(string viewName)
|
||||
{
|
||||
return this.controls[viewName];
|
||||
}
|
||||
|
||||
public bool ViewExists(string viewName)
|
||||
{
|
||||
return this.controls.ContainsKey(viewName);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
60
PSCHelpdesk/PSCHelpdesk/Services/SettingsService.cs
Normal file
60
PSCHelpdesk/PSCHelpdesk/Services/SettingsService.cs
Normal file
@ -0,0 +1,60 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using CommunityToolkit.Mvvm.DependencyInjection;
|
||||
using PSCHelpdesk.Shared.Setting;
|
||||
using PSCHelpdesk.Shared.Service;
|
||||
using PSCHelpdesk.ViewModels;
|
||||
using ReactiveUI;
|
||||
|
||||
namespace PSCHelpdesk.Services;
|
||||
|
||||
public class SettingsService: ReactiveObject, ISettingsService
|
||||
{
|
||||
private List<Item> _settings = new List<Item>();
|
||||
|
||||
public event EventHandler MenuChanged;
|
||||
|
||||
public List<Item> Settings
|
||||
{
|
||||
get => this._settings;
|
||||
private set => this.RaiseAndSetIfChanged(ref this._settings, value);
|
||||
}
|
||||
|
||||
public SettingsService()
|
||||
{
|
||||
this.Settings.Clear();
|
||||
this.Settings.Clear();
|
||||
|
||||
var globalSettings = new Item()
|
||||
{
|
||||
Header = "Global",
|
||||
CommandParameter = new SettingsGlobalViewModel(),
|
||||
};
|
||||
|
||||
this.Settings.Add(globalSettings);
|
||||
}
|
||||
|
||||
public void AddSetting(Item item)
|
||||
{
|
||||
this.Settings.Add(item);
|
||||
OnMenuChanged(EventArgs.Empty);
|
||||
}
|
||||
|
||||
protected virtual void OnMenuChanged(EventArgs e)
|
||||
{
|
||||
MenuChanged?.Invoke(this, e);
|
||||
}
|
||||
|
||||
public Item GetMenuOptionByLabel(string coreSettingsActiveMenuItem)
|
||||
{
|
||||
foreach (var setting in this._settings)
|
||||
{
|
||||
if (setting.Header == coreSettingsActiveMenuItem)
|
||||
{
|
||||
return setting;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -14,12 +14,14 @@ class Startup
|
||||
public static void RegisterServices()
|
||||
{
|
||||
var menuService = new MenuService();
|
||||
var settingsService = new SettingsService();
|
||||
|
||||
var te = new ServiceCollection()
|
||||
.AddPrise()
|
||||
.AddFactory<IResultConverter>(()=> new AvaloniaPluginResultConverter())
|
||||
.AddSingleton<AppService>()
|
||||
.AddSingleton<IMenuService>(menuService)
|
||||
.AddSingleton<ISettingsService>(settingsService)
|
||||
.AddSingleton<ITestService>(new TestService())
|
||||
.AddSingleton<PluginService>()
|
||||
.AddTransient<PluginListViewModel>();
|
||||
|
||||
@ -25,6 +25,11 @@ public class ViewLocator : IDataTemplate
|
||||
var name = data.GetType().FullName!.Replace("ViewModel", "View", StringComparison.Ordinal);
|
||||
var type = Type.GetType(name);
|
||||
|
||||
if (_pluginService.ViewExists(name))
|
||||
{
|
||||
return _pluginService.GetView(name);
|
||||
}
|
||||
|
||||
if (type != null)
|
||||
{
|
||||
return (Control)Activator.CreateInstance(type)!;
|
||||
@ -36,7 +41,6 @@ public class ViewLocator : IDataTemplate
|
||||
public bool Match(object data)
|
||||
{
|
||||
var l = data is IViewModelBase;
|
||||
Console.WriteLine($"[{l}:{data}]");
|
||||
return l;
|
||||
}
|
||||
}
|
||||
@ -49,21 +49,29 @@ public class MainWindowViewModel : ViewModelBase
|
||||
this.MenuService.MenuChanged += delegate(object? sender, EventArgs args)
|
||||
{
|
||||
foreach (var menuServiceMenuItem in MenuService.MenuItems)
|
||||
{
|
||||
if (!this.MenuItems.Contains(menuServiceMenuItem))
|
||||
{
|
||||
menuServiceMenuItem.Command = this.ClickMenu;
|
||||
this.MenuItems.Add(menuServiceMenuItem);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
foreach (var menuServiceMenuItem in MenuService.MenuOptionItems)
|
||||
{
|
||||
if (!this.MenuItems.Contains(menuServiceMenuItem))
|
||||
{
|
||||
menuServiceMenuItem.Command = this.ClickMenu;
|
||||
this.MenuItems.Add(menuServiceMenuItem);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
this.InitializeClient();
|
||||
|
||||
this.SelectedItem = MenuService.MenuItems.Last();
|
||||
this.ContentDisplay = this.SelectedItem.CommandParameter;
|
||||
|
||||
}
|
||||
|
||||
@ -84,16 +92,6 @@ public class MainWindowViewModel : ViewModelBase
|
||||
{
|
||||
get
|
||||
{
|
||||
if (SelectedItem.GetView != null)
|
||||
{
|
||||
var vm = SelectedItem.GetView;
|
||||
return vm;
|
||||
}
|
||||
if (SelectedItem.ViewModel != null)
|
||||
{
|
||||
var vm = SelectedItem.ViewModel;
|
||||
return vm;
|
||||
}
|
||||
return this.SelectedItem?.CommandParameter;
|
||||
}
|
||||
}
|
||||
@ -105,18 +103,7 @@ public class MainWindowViewModel : ViewModelBase
|
||||
if (obj != null)
|
||||
{
|
||||
this.SelectedItem = obj;
|
||||
if (SelectedItem.GetView != null)
|
||||
{
|
||||
this.ContentDisplay = SelectedItem.GetView;
|
||||
}
|
||||
if (obj.ViewModel != null)
|
||||
{
|
||||
this.ContentDisplay = obj.ViewModel;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ContentDisplay = obj.CommandParameter;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -6,7 +6,7 @@ using PSCHelpdesk.Shared.ViewModels;
|
||||
|
||||
namespace PSCHelpdesk.ViewModels;
|
||||
|
||||
class PluginListViewModel : ViewModelBase
|
||||
class PluginListViewModel : ViewModelBase, IViewModelBase
|
||||
{
|
||||
public RelayCommand<object> LoadAllPluginsCommand { get; set; }
|
||||
public RelayCommand<object> UnLoadAllPluginsCommand { get; set; }
|
||||
|
||||
@ -0,0 +1,69 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using Nucs.JsonSettings;
|
||||
using PSCHelpdesk.Models;
|
||||
using PSCHelpdesk.Shared.ViewModels;
|
||||
|
||||
namespace PSCHelpdesk.ViewModels;
|
||||
|
||||
public partial class SettingsGlobalViewModel : ViewModelBase, IViewModelBase
|
||||
{
|
||||
private string _globalConfigFilePath;
|
||||
private string _sshClientPath;
|
||||
private string _sshClientPathArgs;
|
||||
private string _scpClientPath;
|
||||
private string _scpClientPathArgs;
|
||||
private string _privateSSHKeyPath;
|
||||
|
||||
public string GlobalConfigFilePath
|
||||
{
|
||||
get => _globalConfigFilePath;
|
||||
set => SetAndRaisePropertyChanged(ref _globalConfigFilePath, value);
|
||||
}
|
||||
|
||||
public string SshClientPath
|
||||
{
|
||||
get => _sshClientPath;
|
||||
set => SetAndRaisePropertyChanged(ref _sshClientPath, value);
|
||||
}
|
||||
|
||||
public string ScpClientPath
|
||||
{
|
||||
get => _scpClientPath;
|
||||
set => SetAndRaisePropertyChanged(ref _scpClientPath, value);
|
||||
}
|
||||
public string SshClientPathArgs
|
||||
{
|
||||
get => _sshClientPathArgs;
|
||||
set => SetAndRaisePropertyChanged(ref _sshClientPathArgs, value);
|
||||
}
|
||||
|
||||
public string ScpClientPathArgs
|
||||
{
|
||||
get => _scpClientPathArgs;
|
||||
set => SetAndRaisePropertyChanged(ref _scpClientPathArgs, value);
|
||||
}
|
||||
|
||||
public string PrivateSSHKeyPath
|
||||
{
|
||||
get => _privateSSHKeyPath;
|
||||
set => SetAndRaisePropertyChanged(ref _privateSSHKeyPath, value);
|
||||
}
|
||||
|
||||
public SettingsGlobalViewModel()
|
||||
{
|
||||
LocalSetting settings = new LocalSetting();
|
||||
settings.Load();
|
||||
this.GlobalConfigFilePath = settings.GlobalConfigFilePath;
|
||||
this.PrivateSSHKeyPath = settings.PrivateSSHKeyPath;
|
||||
this.ScpClientPath = settings.SCPClientExecutable;
|
||||
this.SshClientPath = settings.SSHClientExecutable;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace PSCHelpdesk.ViewModels;
|
||||
|
||||
public class SettingsTabItemViewModel
|
||||
{
|
||||
public string Header { get; }
|
||||
public object Content { get; }
|
||||
public SettingsTabItemViewModel(string header, object content)
|
||||
{
|
||||
Header = header;
|
||||
Content = content;
|
||||
}
|
||||
}
|
||||
@ -3,67 +3,42 @@ using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.DependencyInjection;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using DynamicData;
|
||||
using Nucs.JsonSettings;
|
||||
using PSCHelpdesk.Models;
|
||||
using PSCHelpdesk.Services;
|
||||
using PSCHelpdesk.Shared.Service;
|
||||
using PSCHelpdesk.Shared.ViewModels;
|
||||
|
||||
namespace PSCHelpdesk.ViewModels;
|
||||
|
||||
public partial class SettingsViewModel : ViewModelBase
|
||||
{
|
||||
private string _globalConfigFilePath;
|
||||
private string _sshClientPath;
|
||||
private string _sshClientPathArgs;
|
||||
private string _scpClientPath;
|
||||
private string _scpClientPathArgs;
|
||||
private string _privateSSHKeyPath;
|
||||
private List<SettingsTabItemViewModel> _tabItems;
|
||||
|
||||
public string GlobalConfigFilePath
|
||||
public List<SettingsTabItemViewModel> TabItems
|
||||
{
|
||||
get => _globalConfigFilePath;
|
||||
set => SetAndRaisePropertyChanged(ref _globalConfigFilePath, value);
|
||||
get => _tabItems;
|
||||
set => SetAndRaisePropertyChanged(ref _tabItems, value);
|
||||
}
|
||||
|
||||
public string SshClientPath
|
||||
{
|
||||
get => _sshClientPath;
|
||||
set => SetAndRaisePropertyChanged(ref _sshClientPath, value);
|
||||
}
|
||||
|
||||
public string ScpClientPath
|
||||
{
|
||||
get => _scpClientPath;
|
||||
set => SetAndRaisePropertyChanged(ref _scpClientPath, value);
|
||||
}
|
||||
public string SshClientPathArgs
|
||||
{
|
||||
get => _sshClientPathArgs;
|
||||
set => SetAndRaisePropertyChanged(ref _sshClientPathArgs, value);
|
||||
}
|
||||
|
||||
public string ScpClientPathArgs
|
||||
{
|
||||
get => _scpClientPathArgs;
|
||||
set => SetAndRaisePropertyChanged(ref _scpClientPathArgs, value);
|
||||
}
|
||||
|
||||
public string PrivateSSHKeyPath
|
||||
{
|
||||
get => _privateSSHKeyPath;
|
||||
set => SetAndRaisePropertyChanged(ref _privateSSHKeyPath, value);
|
||||
}
|
||||
|
||||
public SettingsViewModel()
|
||||
{
|
||||
LocalSetting settings = new LocalSetting();
|
||||
settings.Load();
|
||||
this.GlobalConfigFilePath = settings.GlobalConfigFilePath;
|
||||
this.PrivateSSHKeyPath = settings.PrivateSSHKeyPath;
|
||||
this.ScpClientPath = settings.SCPClientExecutable;
|
||||
this.SshClientPath = settings.SSHClientExecutable;
|
||||
var settingsService = (SettingsService)Ioc.Default.GetService<ISettingsService>();
|
||||
|
||||
this.TabItems = new List<SettingsTabItemViewModel>();
|
||||
|
||||
foreach (var setting in settingsService.Settings)
|
||||
{
|
||||
TabItems.Add(new SettingsTabItemViewModel(setting.Header, setting.CommandParameter));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -73,11 +73,6 @@ public class ContentDisplay : TemplatedControl
|
||||
{
|
||||
get
|
||||
{
|
||||
if (SelectedItem.ViewModel != null)
|
||||
{
|
||||
var vm = SelectedItem.ViewModel;
|
||||
return vm;
|
||||
}
|
||||
return this.SelectedItem?.CommandParameter ?? this.SelectedOption?.CommandParameter;
|
||||
}
|
||||
}
|
||||
|
||||
@ -30,14 +30,8 @@
|
||||
<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 ContentDisplay}"></ContentControl>
|
||||
<!--<views:ContentDisplay SelectedItem="{Binding SelectedItem}"/>-->
|
||||
</DockPanel>
|
||||
</Window>
|
||||
|
||||
34
PSCHelpdesk/PSCHelpdesk/Views/SettingsGlobalView.axaml
Normal file
34
PSCHelpdesk/PSCHelpdesk/Views/SettingsGlobalView.axaml
Normal file
@ -0,0 +1,34 @@
|
||||
<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"
|
||||
xmlns:vm="clr-namespace:PSCHelpdesk.ViewModels"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="PSCHelpdesk.Views.SettingsGlobalView"
|
||||
x:DataType="vm:SettingsGlobalViewModel">
|
||||
<StackPanel Margin="20">
|
||||
<TextBlock Margin="0 5" >FilePath Global</TextBlock>
|
||||
<StackPanel Orientation="Horizontal" Spacing="1">
|
||||
<TextBox Text="{Binding GlobalConfigFilePath }" Width="200"></TextBox>
|
||||
<Button Content="Choose" Margin="2 0" Click="ChooseGlobalSettingsFile_OnClick"></Button>
|
||||
</StackPanel>
|
||||
<TextBlock Margin="0 5" >SSH Client (Executable/Args)</TextBlock>
|
||||
<StackPanel Orientation="Horizontal" Spacing="1">
|
||||
<TextBox Text="{Binding SshClientPath }" Width="150"></TextBox>
|
||||
<Button Margin="2 0" Content="Choose" Click="ChooseSshClientFile_OnClick"></Button>
|
||||
<TextBox Text="{Binding SshClientPathArgs }" Width="150"></TextBox>
|
||||
</StackPanel>
|
||||
<TextBlock Margin="0 5" >SCP Client (Executable/Args)</TextBlock>
|
||||
<StackPanel Orientation="Horizontal" Spacing="1">
|
||||
<TextBox Text="{Binding ScpClientPath }" Width="150"></TextBox>
|
||||
<Button Margin="2 0" Content="Choose" Click="ChooseScpClientFile_OnClick"></Button>
|
||||
<TextBox Text="{Binding ScpClientPathArgs }" Width="150"></TextBox>
|
||||
</StackPanel>
|
||||
<TextBlock Margin="0 5" >SSH PrivateKey Path</TextBlock>
|
||||
<StackPanel Orientation="Horizontal" Spacing="1">
|
||||
<TextBox Text="{Binding PrivateSSHKeyPath }" Width="100"></TextBox>
|
||||
<Button Margin="2 0" Content="Choose" Click="ChoosePrivateSshFile_OnClick"></Button>
|
||||
</StackPanel>
|
||||
<Button Margin="0 5" Content="Save Settings" Click="SaveSettings_OnClick"></Button>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
104
PSCHelpdesk/PSCHelpdesk/Views/SettingsGlobalView.axaml.cs
Normal file
104
PSCHelpdesk/PSCHelpdesk/Views/SettingsGlobalView.axaml.cs
Normal file
@ -0,0 +1,104 @@
|
||||
using System.IO;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Avalonia.Platform.Storage;
|
||||
using PSCHelpdesk.Models;
|
||||
using PSCHelpdesk.ViewModels;
|
||||
|
||||
namespace PSCHelpdesk.Views;
|
||||
|
||||
public partial class SettingsGlobalView : UserControl
|
||||
{
|
||||
public SettingsGlobalView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private async void ChooseGlobalSettingsFile_OnClick(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
var topLevel = TopLevel.GetTopLevel(this);
|
||||
|
||||
// Start async operation to open the dialog.
|
||||
var file = await topLevel.StorageProvider.OpenFolderPickerAsync(new FolderPickerOpenOptions
|
||||
{
|
||||
Title = "Choose Folder",
|
||||
AllowMultiple = false
|
||||
});
|
||||
|
||||
if (file is not null && file.Count > 0)
|
||||
{
|
||||
SettingsGlobalViewModel model = (SettingsGlobalViewModel)this.DataContext;
|
||||
model.GlobalConfigFilePath = file[0].Path.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
private void SaveSettings_OnClick(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
LocalSetting settings = new LocalSetting();
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(settings.FileName));
|
||||
SettingsGlobalViewModel model = (SettingsGlobalViewModel)this.DataContext;
|
||||
settings.GlobalConfigFilePath = model.GlobalConfigFilePath;
|
||||
settings.SCPClientExecutable = model.ScpClientPath;
|
||||
settings.SSHClientExecutable = model.SshClientPath;
|
||||
settings.SCPClientExecutableArgs = model.ScpClientPathArgs;
|
||||
settings.SSHClientExecutableArgs = model.SshClientPathArgs;
|
||||
settings.PrivateSSHKeyPath = model.PrivateSSHKeyPath;
|
||||
settings.Save();
|
||||
}
|
||||
|
||||
private async void ChooseSshClientFile_OnClick(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
var topLevel = TopLevel.GetTopLevel(this);
|
||||
|
||||
// Start async operation to open the dialog.
|
||||
var file = await topLevel.StorageProvider.OpenFilePickerAsync(new FilePickerOpenOptions
|
||||
{
|
||||
Title = "Choose File",
|
||||
AllowMultiple = false
|
||||
});
|
||||
|
||||
if (file is not null && file.Count > 0)
|
||||
{
|
||||
SettingsGlobalViewModel model = (SettingsGlobalViewModel)this.DataContext;
|
||||
model.SshClientPath = file[0].Path.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
private async void ChooseScpClientFile_OnClick(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
var topLevel = TopLevel.GetTopLevel(this);
|
||||
|
||||
// Start async operation to open the dialog.
|
||||
var file = await topLevel.StorageProvider.OpenFilePickerAsync(new FilePickerOpenOptions
|
||||
{
|
||||
Title = "Choose File",
|
||||
AllowMultiple = false
|
||||
});
|
||||
|
||||
if (file is not null && file.Count > 0)
|
||||
{
|
||||
SettingsGlobalViewModel model = (SettingsGlobalViewModel)this.DataContext;
|
||||
model.ScpClientPath = file[0].Path.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
private async void ChoosePrivateSshFile_OnClick(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
var topLevel = TopLevel.GetTopLevel(this);
|
||||
|
||||
// Start async operation to open the dialog.
|
||||
var file = await topLevel.StorageProvider.OpenFilePickerAsync(new FilePickerOpenOptions
|
||||
{
|
||||
Title = "Choose Folder",
|
||||
AllowMultiple = false
|
||||
});
|
||||
|
||||
if (file is not null && file.Count > 0)
|
||||
{
|
||||
SettingsGlobalViewModel model = (SettingsGlobalViewModel)this.DataContext;
|
||||
model.PrivateSSHKeyPath = file[0].Path.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -10,30 +10,19 @@
|
||||
<vm:SettingsViewModel />
|
||||
</Design.DataContext>
|
||||
<Panel Margin="10">
|
||||
<StackPanel Margin="20">
|
||||
<TextBlock Margin="0 5" >FilePath Global</TextBlock>
|
||||
<StackPanel Orientation="Horizontal" Spacing="1">
|
||||
<TextBox Text="{Binding GlobalConfigFilePath }" Width="200"></TextBox>
|
||||
<Button Content="Choose" Margin="2 0" Click="ChooseGlobalSettingsFile_OnClick"></Button>
|
||||
</StackPanel>
|
||||
<TextBlock Margin="0 5" >SSH Client (Executable/Args)</TextBlock>
|
||||
<StackPanel Orientation="Horizontal" Spacing="1">
|
||||
<TextBox Text="{Binding SshClientPath }" Width="150"></TextBox>
|
||||
<Button Margin="2 0" Content="Choose" Click="ChooseSshClientFile_OnClick"></Button>
|
||||
<TextBox Text="{Binding SshClientPathArgs }" Width="150"></TextBox>
|
||||
</StackPanel>
|
||||
<TextBlock Margin="0 5" >SCP Client (Executable/Args)</TextBlock>
|
||||
<StackPanel Orientation="Horizontal" Spacing="1">
|
||||
<TextBox Text="{Binding ScpClientPath }" Width="150"></TextBox>
|
||||
<Button Margin="2 0" Content="Choose" Click="ChooseScpClientFile_OnClick"></Button>
|
||||
<TextBox Text="{Binding ScpClientPathArgs }" Width="150"></TextBox>
|
||||
</StackPanel>
|
||||
<TextBlock Margin="0 5" >SSH PrivateKey Path</TextBlock>
|
||||
<StackPanel Orientation="Horizontal" Spacing="1">
|
||||
<TextBox Text="{Binding PrivateSSHKeyPath }" Width="100"></TextBox>
|
||||
<Button Margin="2 0" Content="Choose" Click="ChoosePrivateSshFile_OnClick"></Button>
|
||||
</StackPanel>
|
||||
<Button Margin="0 5" Content="Save Settings" Click="SaveSettings_OnClick"></Button>
|
||||
</StackPanel>
|
||||
<TabControl ItemsSource="{Binding TabItems}">
|
||||
<TabControl.ItemTemplate>
|
||||
<DataTemplate DataType="vm:SettingsTabItemViewModel">
|
||||
<TextBlock Text="{Binding Header}" />
|
||||
</DataTemplate>
|
||||
</TabControl.ItemTemplate>
|
||||
<TabControl.ContentTemplate>
|
||||
<DataTemplate DataType="vm:SettingsTabItemViewModel">
|
||||
<DockPanel LastChildFill="True">
|
||||
<ContentControl Content="{Binding Content}" />
|
||||
</DockPanel>
|
||||
</DataTemplate>
|
||||
</TabControl.ContentTemplate>
|
||||
</TabControl>
|
||||
</Panel>
|
||||
</UserControl>
|
||||
|
||||
@ -17,90 +17,4 @@ public partial class SettingsView : UserControl
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private async void ChooseGlobalSettingsFile_OnClick(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
var topLevel = TopLevel.GetTopLevel(this);
|
||||
|
||||
// Start async operation to open the dialog.
|
||||
var file = await topLevel.StorageProvider.OpenFilePickerAsync(new FilePickerOpenOptions
|
||||
{
|
||||
Title = "Choose File",
|
||||
AllowMultiple = false
|
||||
});
|
||||
|
||||
if (file is not null && file.Count > 0)
|
||||
{
|
||||
SettingsViewModel model = (SettingsViewModel)this.DataContext;
|
||||
model.GlobalConfigFilePath = file[0].Path.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
private void SaveSettings_OnClick(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
LocalSetting settings = new LocalSetting();
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(settings.FileName));
|
||||
SettingsViewModel model = (SettingsViewModel)this.DataContext;
|
||||
settings.GlobalConfigFilePath = model.GlobalConfigFilePath;
|
||||
settings.SCPClientExecutable = model.ScpClientPath;
|
||||
settings.SSHClientExecutable = model.SshClientPath;
|
||||
settings.SCPClientExecutableArgs = model.ScpClientPathArgs;
|
||||
settings.SSHClientExecutableArgs = model.SshClientPathArgs;
|
||||
settings.PrivateSSHKeyPath = model.PrivateSSHKeyPath;
|
||||
settings.Save();
|
||||
}
|
||||
|
||||
private async void ChooseSshClientFile_OnClick(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
var topLevel = TopLevel.GetTopLevel(this);
|
||||
|
||||
// Start async operation to open the dialog.
|
||||
var file = await topLevel.StorageProvider.OpenFilePickerAsync(new FilePickerOpenOptions
|
||||
{
|
||||
Title = "Choose File",
|
||||
AllowMultiple = false
|
||||
});
|
||||
|
||||
if (file is not null && file.Count > 0)
|
||||
{
|
||||
SettingsViewModel model = (SettingsViewModel)this.DataContext;
|
||||
model.SshClientPath = file[0].Path.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
private async void ChooseScpClientFile_OnClick(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
var topLevel = TopLevel.GetTopLevel(this);
|
||||
|
||||
// Start async operation to open the dialog.
|
||||
var file = await topLevel.StorageProvider.OpenFilePickerAsync(new FilePickerOpenOptions
|
||||
{
|
||||
Title = "Choose File",
|
||||
AllowMultiple = false
|
||||
});
|
||||
|
||||
if (file is not null && file.Count > 0)
|
||||
{
|
||||
SettingsViewModel model = (SettingsViewModel)this.DataContext;
|
||||
model.ScpClientPath = file[0].Path.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
private async void ChoosePrivateSshFile_OnClick(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
var topLevel = TopLevel.GetTopLevel(this);
|
||||
|
||||
// Start async operation to open the dialog.
|
||||
var file = await topLevel.StorageProvider.OpenFilePickerAsync(new FilePickerOpenOptions
|
||||
{
|
||||
Title = "Choose File",
|
||||
AllowMultiple = false
|
||||
});
|
||||
|
||||
if (file is not null && file.Count > 0)
|
||||
{
|
||||
SettingsViewModel model = (SettingsViewModel)this.DataContext;
|
||||
model.PrivateSSHKeyPath = file[0].Path.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -7,14 +7,9 @@ namespace PSCHelpdesk.Shared.Menu;
|
||||
public class Item
|
||||
{
|
||||
public string Icon { get; set; }
|
||||
|
||||
public string Header { get; set; }
|
||||
public ICommand Command { get; set; }
|
||||
|
||||
public object CommandParameter { get; set; }
|
||||
|
||||
public object ViewModel { get; set; }
|
||||
|
||||
public UserControl GetView { get; set; }
|
||||
public IList<Item> Items { get; set; }
|
||||
}
|
||||
@ -8,9 +8,8 @@ public interface Contract
|
||||
{
|
||||
string GetName();
|
||||
|
||||
Item addMenu();
|
||||
void Configure();
|
||||
|
||||
UserControl LoadView();
|
||||
object LoadViewModel();
|
||||
List<UserControl> LoadViews();
|
||||
|
||||
}
|
||||
8
Shared/Service/ISettingsService.cs
Normal file
8
Shared/Service/ISettingsService.cs
Normal file
@ -0,0 +1,8 @@
|
||||
using PSCHelpdesk.Shared.Setting;
|
||||
|
||||
namespace PSCHelpdesk.Shared.Service;
|
||||
|
||||
public interface ISettingsService
|
||||
{
|
||||
public void AddSetting(Item item);
|
||||
}
|
||||
7
Shared/Setting/Item.cs
Normal file
7
Shared/Setting/Item.cs
Normal file
@ -0,0 +1,7 @@
|
||||
namespace PSCHelpdesk.Shared.Setting;
|
||||
|
||||
public class Item
|
||||
{
|
||||
public string Header { get; set; }
|
||||
public object CommandParameter { get; set; }
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user