Skip to content

Commit 801cf59

Browse files
Merge pull request #16 from atc-net/feature/maintenance
Feature/maintenance
2 parents 1a6010b + 0fb9510 commit 801cf59

File tree

19 files changed

+347
-52
lines changed

19 files changed

+347
-52
lines changed

Atc.snk

596 Bytes
Binary file not shown.

src/Atc.Installer.Integration.InternetInformationServer/IInternetInformationServerInstallerService.cs

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ public interface IInternetInformationServerInstallerService : IInstallerService
2020

2121
bool IsComponentInstalledMicrosoftNetHost7();
2222

23+
bool IsComponentInstalledMicrosoftNetHost8();
24+
2325
bool IsComponentInstalledMicrosoftAspNetCoreModule2();
2426

2527
bool IsComponentInstalledUrlRewriteModule2();

src/Atc.Installer.Integration.InternetInformationServer/InternetInformationServerInstallerService.cs

+3
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ public bool IsComponentInstalledWebSockets()
108108
public bool IsComponentInstalledMicrosoftNetHost7()
109109
=> iaInstallerService.IsAppInstalledByDisplayName("Microsoft .NET Host - 7.");
110110

111+
public bool IsComponentInstalledMicrosoftNetHost8()
112+
=> iaInstallerService.IsAppInstalledByDisplayName("Microsoft .NET Host - 8.");
113+
111114
public bool IsComponentInstalledMicrosoftAspNetCoreModule2()
112115
{
113116
if (!iaInstallerService.IsAppInstalledByDisplayName("Microsoft ASP.NET Core Module V2"))

src/Atc.Installer.Integration/Enums/ComponentType.cs

+10
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,19 @@ namespace Atc.Installer.Integration;
44
public enum ComponentType
55
{
66
None,
7+
8+
[Description("Application")]
79
Application,
10+
11+
[Description("ElasticSearch")]
812
ElasticSearchServer,
13+
14+
[Description("IIS")]
915
InternetInformationService,
16+
17+
[Description("PostgreSql")]
1018
PostgreSqlServer,
19+
20+
[Description("NT-Service")]
1121
WindowsService,
1222
}

src/Atc.Installer.Integration/Enums/HostingFrameworkType.cs

+12
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,22 @@ namespace Atc.Installer.Integration;
44
public enum HostingFrameworkType
55
{
66
None,
7+
8+
[Description("Native")]
79
Native,
10+
11+
[Description("Native")]
812
NativeNoSettings,
13+
14+
[Description(".NET Framework 4.8")]
915
DonNetFramework48,
16+
17+
[Description(".NET 7")]
1018
DotNet7,
19+
20+
[Description(".NET 8")]
1121
DotNet8,
22+
23+
[Description("NodeJS")]
1224
NodeJs,
1325
}

src/Atc.Installer.Wpf.App/AssemblyInfo.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
[assembly: AssemblyCompany("atc-net")]
66
[assembly: AssemblyProduct("Atc.Installer")]
77
[assembly: AssemblyTitle("Atc.Installer")]
8-
[assembly: AssemblyVersion("1.0.15.0")]
9-
[assembly: AssemblyInformationalVersion("1.0.15.0")]
10-
[assembly: AssemblyFileVersion("1.0.15.0")]
8+
[assembly: AssemblyVersion("1.0.16.0")]
9+
[assembly: AssemblyInformationalVersion("1.0.16.0")]
10+
[assembly: AssemblyFileVersion("1.0.16.0")]
1111
[assembly: System.Resources.NeutralResourcesLanguage("en")]
1212
[assembly: System.Runtime.Versioning.TargetPlatform("Windows7.0")]
1313
[assembly: System.Runtime.Versioning.SupportedOSPlatform("Windows7.0")]

src/Atc.Installer.Wpf.App/MainWindowProjectContent.xaml

+34-20
Original file line numberDiff line numberDiff line change
@@ -81,21 +81,21 @@
8181
<TextBlock
8282
Grid.Row="0"
8383
Grid.ColumnSpan="5"
84-
Text="All components:" />
84+
Text="Selected components:" />
8585
<Button
8686
Grid.Row="2"
8787
Grid.Column="0"
88-
Command="{Binding Path=ServiceStopAllCommand}"
88+
Command="{Binding Path=ServiceStopSelectedCommand}"
8989
Content="Stop" />
9090
<Button
9191
Grid.Row="2"
9292
Grid.Column="2"
93-
Command="{Binding Path=ServiceDeployAllCommand}"
93+
Command="{Binding Path=ServiceDeploySelectedCommand}"
9494
Content="Deploy" />
9595
<Button
9696
Grid.Row="2"
9797
Grid.Column="4"
98-
Command="{Binding Path=ServiceStartAllCommand}"
98+
Command="{Binding Path=ServiceStartSelectedCommand}"
9999
Content="Start" />
100100
</atc:GridEx>
101101
</Border>
@@ -149,27 +149,41 @@
149149
Margin="0,20,0,10"
150150
FontSize="26"
151151
Text="{Binding Path=SelectedComponentProvider.Name}" />
152-
<StackPanel Orientation="Horizontal" Visibility="{Binding Path=ComponentProviders, Converter={StaticResource CollectionNullOrEmptyToVisibilityCollapsedValueConverter}}">
153-
<StackPanel Orientation="Horizontal" Visibility="{Binding Path=SelectedComponentProvider.InstalledVersion, Converter={StaticResource StringNullOrEmptyToVisibilityCollapsedValueConverter}}">
154-
<TextBlock FontSize="18" Text="Version" />
155-
<TextBlock
156-
Margin="10,0,0,0"
157-
FontSize="18"
158-
Text="{Binding Path=SelectedComponentProvider.InstalledVersion}" />
152+
<atc:GridEx Columns="Auto,*,Auto,10" Visibility="{Binding Path=ComponentProviders, Converter={StaticResource CollectionNullOrEmptyToVisibilityCollapsedValueConverter}}">
153+
<StackPanel
154+
Grid.Row="0"
155+
Grid.Column="0"
156+
Orientation="Horizontal">
157+
<StackPanel Orientation="Horizontal" Visibility="{Binding Path=SelectedComponentProvider.InstalledVersion, Converter={StaticResource StringNullOrEmptyToVisibilityCollapsedValueConverter}}">
158+
<TextBlock FontSize="18" Text="Version" />
159+
<TextBlock
160+
Margin="10,0,0,0"
161+
FontSize="18"
162+
Text="{Binding Path=SelectedComponentProvider.InstalledVersion}" />
163+
</StackPanel>
164+
<StackPanel Orientation="Horizontal" Visibility="{Binding Path=SelectedComponentProvider, Converter={StaticResource ComponentProviderVersionCompareVisibilityVisibleValueConverter}}">
165+
<TextBlock
166+
Margin="20,0,0,0"
167+
FontSize="18"
168+
Foreground="DarkOrange"
169+
Text="New version available" />
170+
<TextBlock
171+
Margin="10,0,0,0"
172+
FontSize="18"
173+
Foreground="DarkOrange"
174+
Text="{Binding Path=SelectedComponentProvider.InstallationVersion}" />
175+
</StackPanel>
159176
</StackPanel>
160-
<StackPanel Orientation="Horizontal" Visibility="{Binding Path=SelectedComponentProvider, Converter={StaticResource ComponentProviderVersionCompareVisibilityVisibleValueConverter}}">
161-
<TextBlock
162-
Margin="20,0,0,0"
163-
FontSize="18"
164-
Foreground="DarkOrange"
165-
Text="New version available" />
177+
<StackPanel
178+
Grid.Row="0"
179+
Grid.Column="2"
180+
Orientation="Horizontal">
166181
<TextBlock
167182
Margin="10,0,0,0"
168183
FontSize="18"
169-
Foreground="DarkOrange"
170-
Text="{Binding Path=SelectedComponentProvider.InstallationVersion}" />
184+
Text="{Binding Path=SelectedComponentProvider.Description}" />
171185
</StackPanel>
172-
</StackPanel>
186+
</atc:GridEx>
173187
</StackPanel>
174188

175189
<!-- Right-Content-ContentControls -->

src/Atc.Installer.Wpf.App/MainWindowViewModel_Commands.cs

+20-20
Original file line numberDiff line numberDiff line change
@@ -42,25 +42,25 @@ public IRelayCommand OpenApplicationAboutCommand
4242
=> new RelayCommand(
4343
OpenApplicationAboutCommandHandler);
4444

45-
public IRelayCommandAsync ServiceStopAllCommand
45+
public IRelayCommandAsync ServiceStopSelectedCommand
4646
=> new RelayCommandAsync(
47-
ServiceStopAllCommandHandler,
48-
CanServiceStopAllCommandHandler);
47+
ServiceStopSelectedCommandHandler,
48+
CanServiceStopSelectedCommandHandler);
4949

50-
public IRelayCommandAsync ServiceDeployAllCommand
50+
public IRelayCommandAsync ServiceDeploySelectedCommand
5151
=> new RelayCommandAsync(
52-
ServiceDeployAllCommandHandler,
53-
CanServiceDeployAllCommandHandler);
52+
ServiceDeploySelectedCommandHandler,
53+
CanServiceDeploySelectedCommandHandler);
5454

55-
public IRelayCommandAsync ServiceRemoveAllCommand
55+
public IRelayCommandAsync ServiceRemoveSelectedCommand
5656
=> new RelayCommandAsync(
57-
ServiceRemoveAllCommandHandler,
58-
CanServiceRemoveAllCommandHandler);
57+
ServiceRemoveSelectedCommandHandler,
58+
CanServiceRemoveSelectedCommandHandler);
5959

60-
public IRelayCommandAsync ServiceStartAllCommand
60+
public IRelayCommandAsync ServiceStartSelectedCommand
6161
=> new RelayCommandAsync(
62-
ServiceStartAllCommandHandler,
63-
CanServiceStartAllCommandHandler);
62+
ServiceStartSelectedCommandHandler,
63+
CanServiceStartSelectedCommandHandler);
6464

6565
public new ICommand ApplicationExitCommand
6666
=> new RelayCommand(ApplicationExitCommandHandler);
@@ -336,10 +336,10 @@ private void OpenApplicationAboutCommandHandler()
336336
aboutBoxDialog.ShowDialog();
337337
}
338338

339-
private bool CanServiceStopAllCommandHandler()
339+
private bool CanServiceStopSelectedCommandHandler()
340340
=> ComponentProviders.Any(x => x.CanServiceStopCommandHandler());
341341

342-
private Task ServiceStopAllCommandHandler()
342+
private Task ServiceStopSelectedCommandHandler()
343343
{
344344
var tasks = new List<Task>();
345345
foreach (var vm in ComponentProviders)
@@ -353,10 +353,10 @@ private Task ServiceStopAllCommandHandler()
353353
return TaskHelper.WhenAll(tasks);
354354
}
355355

356-
private bool CanServiceDeployAllCommandHandler()
356+
private bool CanServiceDeploySelectedCommandHandler()
357357
=> ComponentProviders.Any(x => x.CanServiceDeployCommandHandler());
358358

359-
private Task ServiceDeployAllCommandHandler()
359+
private Task ServiceDeploySelectedCommandHandler()
360360
{
361361
var tasks = new List<Task>();
362362
foreach (var vm in ComponentProviders)
@@ -370,10 +370,10 @@ private Task ServiceDeployAllCommandHandler()
370370
return TaskHelper.WhenAll(tasks);
371371
}
372372

373-
private bool CanServiceRemoveAllCommandHandler()
373+
private bool CanServiceRemoveSelectedCommandHandler()
374374
=> ComponentProviders.Any(x => x.CanServiceRemoveCommandHandler());
375375

376-
private Task ServiceRemoveAllCommandHandler()
376+
private Task ServiceRemoveSelectedCommandHandler()
377377
{
378378
var tasks = new List<Task>();
379379
foreach (var vm in ComponentProviders)
@@ -387,10 +387,10 @@ private Task ServiceRemoveAllCommandHandler()
387387
return TaskHelper.WhenAll(tasks);
388388
}
389389

390-
private bool CanServiceStartAllCommandHandler()
390+
private bool CanServiceStartSelectedCommandHandler()
391391
=> ComponentProviders.Any(x => x.CanServiceStartCommandHandler());
392392

393-
private Task ServiceStartAllCommandHandler()
393+
private Task ServiceStartSelectedCommandHandler()
394394
{
395395
var tasks = new List<Task>();
396396
foreach (var vm in ComponentProviders)

src/Atc.Installer.Wpf.ComponentProvider.ElasticSearch/ElasticSearchServerComponentProviderViewModel.cs

+4
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ public string? TestConnectionResult
5252
}
5353
}
5454

55+
public override string Description => ComponentType.GetDescription();
56+
5557
public override void CheckPrerequisites()
5658
{
5759
base.CheckPrerequisites();
@@ -95,6 +97,7 @@ public override void CheckServiceState()
9597

9698
public override bool CanServiceStopCommandHandler()
9799
=> !DisableInstallationActions &&
100+
!HideMenuItem &&
98101
RunningState == ComponentRunningState.Running;
99102

100103
public override async Task ServiceStopCommandHandler()
@@ -133,6 +136,7 @@ public override async Task ServiceStopCommandHandler()
133136

134137
public override bool CanServiceStartCommandHandler()
135138
=> DisableInstallationActions &&
139+
!HideMenuItem &&
136140
RunningState == ComponentRunningState.Stopped;
137141

138142
public override async Task ServiceStartCommandHandler()

src/Atc.Installer.Wpf.ComponentProvider.InternetInformationServer/GlobalUsings.cs

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
global using Atc.Installer.Wpf.ComponentProvider.InternetInformationServer.Factories;
1616
global using Atc.Installer.Wpf.ComponentProvider.InternetInformationServer.Helpers;
1717
global using Atc.Installer.Wpf.ComponentProvider.Messages;
18+
global using Atc.Installer.Wpf.ComponentProvider.Models;
1819
global using Atc.Installer.Wpf.ComponentProvider.ViewModels;
1920
global using Atc.Serialization;
2021
global using Atc.Wpf.Collections;

0 commit comments

Comments
 (0)