Skip to content

Commit d0415d9

Browse files
Merge pull request #128 from erikdarlingdata/dev
Release v1.2.5
2 parents 2c911d0 + 3061163 commit d0415d9

5 files changed

Lines changed: 45 additions & 6 deletions

File tree

src/PlanViewer.App/AboutWindow.axaml.cs

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,49 @@ private async void CheckUpdate_Click(object? sender, RoutedEventArgs e)
136136

137137
private async void UpdateLink_Click(object? sender, PointerPressedEventArgs e)
138138
{
139-
// Step 3: User clicks "Restart now" after download
139+
// Step 3: User clicks "Restart now" after download — confirm first
140140
if (_updateDownloaded && _velopackMgr != null && _velopackUpdate != null)
141141
{
142-
_velopackMgr.ApplyUpdatesAndRestart(_velopackUpdate.TargetFullRelease);
142+
var dialog = new Avalonia.Controls.Window
143+
{
144+
Title = "Update Ready",
145+
Width = 350, Height = 150,
146+
WindowStartupLocation = Avalonia.Controls.WindowStartupLocation.CenterOwner,
147+
CanResize = false
148+
};
149+
150+
var result = false;
151+
var panel = new Avalonia.Controls.StackPanel
152+
{
153+
Margin = new Avalonia.Thickness(20),
154+
Spacing = 15
155+
};
156+
panel.Children.Add(new Avalonia.Controls.TextBlock
157+
{
158+
Text = "The application will close and restart with the new version. Continue?",
159+
TextWrapping = Avalonia.Media.TextWrapping.Wrap
160+
});
161+
var buttonPanel = new Avalonia.Controls.StackPanel
162+
{
163+
Orientation = Avalonia.Layout.Orientation.Horizontal,
164+
HorizontalAlignment = Avalonia.Layout.HorizontalAlignment.Right,
165+
Spacing = 8
166+
};
167+
var okButton = new Avalonia.Controls.Button { Content = "Restart Now" };
168+
var cancelButton = new Avalonia.Controls.Button { Content = "Later" };
169+
okButton.Click += (_, _) => { result = true; dialog.Close(); };
170+
cancelButton.Click += (_, _) => { dialog.Close(); };
171+
buttonPanel.Children.Add(okButton);
172+
buttonPanel.Children.Add(cancelButton);
173+
panel.Children.Add(buttonPanel);
174+
dialog.Content = panel;
175+
176+
await dialog.ShowDialog(this);
177+
178+
if (result)
179+
{
180+
_velopackMgr.ApplyUpdatesAndRestart(_velopackUpdate.TargetFullRelease);
181+
}
143182
return;
144183
}
145184

src/PlanViewer.App/PlanViewer.App.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<ApplicationManifest>app.manifest</ApplicationManifest>
77
<ApplicationIcon>EDD.ico</ApplicationIcon>
88
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
9-
<Version>1.2.4</Version>
9+
<Version>1.2.5</Version>
1010
<Authors>Erik Darling</Authors>
1111
<Company>Darling Data LLC</Company>
1212
<Product>Performance Studio</Product>

src/PlanViewer.Cli/PlanViewer.Cli.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<Nullable>enable</Nullable>
1212
<RootNamespace>PlanViewer.Cli</RootNamespace>
1313
<AssemblyName>planview</AssemblyName>
14-
<Version>1.2.4</Version>
14+
<Version>1.2.5</Version>
1515
<Authors>Erik Darling</Authors>
1616
<Company>Darling Data LLC</Company>
1717
<Product>Performance Studio</Product>

src/PlanViewer.Core/PlanViewer.Core.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<RootNamespace>PlanViewer.Core</RootNamespace>
8-
<Version>1.2.4</Version>
8+
<Version>1.2.5</Version>
99
<Authors>Erik Darling</Authors>
1010
<Company>Darling Data LLC</Company>
1111
<Product>SQL Performance Studio</Product>

src/PlanViewer.Ssms.Installer/PlanViewer.Ssms.Installer.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<AssemblyName>InstallSsmsExtension</AssemblyName>
77
<RootNamespace>PlanViewer.Ssms.Installer</RootNamespace>
88
<ApplicationManifest>app.manifest</ApplicationManifest>
9-
<Version>1.2.4</Version>
9+
<Version>1.2.5</Version>
1010
<Authors>Erik Darling</Authors>
1111
<Company>Darling Data LLC</Company>
1212
<Product>SQL Performance Studio</Product>

0 commit comments

Comments
 (0)