Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 41 additions & 2 deletions src/PlanViewer.App/AboutWindow.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,49 @@ private async void CheckUpdate_Click(object? sender, RoutedEventArgs e)

private async void UpdateLink_Click(object? sender, PointerPressedEventArgs e)
{
// Step 3: User clicks "Restart now" after download
// Step 3: User clicks "Restart now" after download — confirm first
if (_updateDownloaded && _velopackMgr != null && _velopackUpdate != null)
{
_velopackMgr.ApplyUpdatesAndRestart(_velopackUpdate.TargetFullRelease);
var dialog = new Avalonia.Controls.Window
{
Title = "Update Ready",
Width = 350, Height = 150,
WindowStartupLocation = Avalonia.Controls.WindowStartupLocation.CenterOwner,
CanResize = false
};

var result = false;
var panel = new Avalonia.Controls.StackPanel
{
Margin = new Avalonia.Thickness(20),
Spacing = 15
};
panel.Children.Add(new Avalonia.Controls.TextBlock
{
Text = "The application will close and restart with the new version. Continue?",
TextWrapping = Avalonia.Media.TextWrapping.Wrap
});
var buttonPanel = new Avalonia.Controls.StackPanel
{
Orientation = Avalonia.Layout.Orientation.Horizontal,
HorizontalAlignment = Avalonia.Layout.HorizontalAlignment.Right,
Spacing = 8
};
var okButton = new Avalonia.Controls.Button { Content = "Restart Now" };
var cancelButton = new Avalonia.Controls.Button { Content = "Later" };
okButton.Click += (_, _) => { result = true; dialog.Close(); };
cancelButton.Click += (_, _) => { dialog.Close(); };
buttonPanel.Children.Add(okButton);
buttonPanel.Children.Add(cancelButton);
panel.Children.Add(buttonPanel);
dialog.Content = panel;

await dialog.ShowDialog(this);

if (result)
{
_velopackMgr.ApplyUpdatesAndRestart(_velopackUpdate.TargetFullRelease);
}
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/PlanViewer.App/PlanViewer.App.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<ApplicationManifest>app.manifest</ApplicationManifest>
<ApplicationIcon>EDD.ico</ApplicationIcon>
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
<Version>1.2.4</Version>
<Version>1.2.5</Version>
<Authors>Erik Darling</Authors>
<Company>Darling Data LLC</Company>
<Product>Performance Studio</Product>
Expand Down
2 changes: 1 addition & 1 deletion src/PlanViewer.Cli/PlanViewer.Cli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<Nullable>enable</Nullable>
<RootNamespace>PlanViewer.Cli</RootNamespace>
<AssemblyName>planview</AssemblyName>
<Version>1.2.4</Version>
<Version>1.2.5</Version>
<Authors>Erik Darling</Authors>
<Company>Darling Data LLC</Company>
<Product>Performance Studio</Product>
Expand Down
2 changes: 1 addition & 1 deletion src/PlanViewer.Core/PlanViewer.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>PlanViewer.Core</RootNamespace>
<Version>1.2.4</Version>
<Version>1.2.5</Version>
<Authors>Erik Darling</Authors>
<Company>Darling Data LLC</Company>
<Product>SQL Performance Studio</Product>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<AssemblyName>InstallSsmsExtension</AssemblyName>
<RootNamespace>PlanViewer.Ssms.Installer</RootNamespace>
<ApplicationManifest>app.manifest</ApplicationManifest>
<Version>1.2.4</Version>
<Version>1.2.5</Version>
<Authors>Erik Darling</Authors>
<Company>Darling Data LLC</Company>
<Product>SQL Performance Studio</Product>
Expand Down
Loading