diff --git a/PCUT/PCUT/App.xaml.cs b/PCUT/PCUT/App.xaml.cs
index 4b74c99..eb8dbca 100644
--- a/PCUT/PCUT/App.xaml.cs
+++ b/PCUT/PCUT/App.xaml.cs
@@ -135,16 +135,18 @@ namespace PCUT
if (e.Exception is AppOutdatedException outdatedException)
{
e.Handled = true;
- var dialog = new MessageDialog(outdatedException.Message);
- dialog.Commands.Add(new UICommand("Download", async (command) =>
- {
- var _ = await Windows.System.Launcher.LaunchUriAsync(
- new Uri("https://pcut.vn/download"),
- new Windows.System.LauncherOptions { TreatAsUntrusted = false });
- }));
- dialog.Commands.Add(new UICommand("Close"));
- dialog.DefaultCommandIndex = 0;
- dialog.CancelCommandIndex = 1;
+ //var dialog = new MessageDialog(outdatedException.Message);
+ //dialog.Commands.Add(new UICommand("Download", async (command) =>
+ //{
+ // var _ = await Windows.System.Launcher.LaunchUriAsync(
+ // new Uri("https://pcut.vn/download"),
+ // new Windows.System.LauncherOptions { TreatAsUntrusted = false });
+ //}));
+ //dialog.Commands.Add(new UICommand("Close"));
+ //dialog.DefaultCommandIndex = 0;
+ //dialog.CancelCommandIndex = 1;
+ //await dialog.ShowAsync();
+ var dialog = new AppOutdatedDialog();
await dialog.ShowAsync();
}
}
diff --git a/PCUT/PCUT/PCUT.csproj b/PCUT/PCUT/PCUT.csproj
index fb351af..ca0e2db 100644
--- a/PCUT/PCUT/PCUT.csproj
+++ b/PCUT/PCUT/PCUT.csproj
@@ -183,6 +183,9 @@
+
+ AppOutdatedDialog.xaml
+
CategoryUpsertDialog.xaml
@@ -351,6 +354,10 @@
MSBuild:Compile
Designer
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
diff --git a/PCUT/PCUT/Pages/AppOutdatedDialog.xaml b/PCUT/PCUT/Pages/AppOutdatedDialog.xaml
new file mode 100644
index 0000000..bcac727
--- /dev/null
+++ b/PCUT/PCUT/Pages/AppOutdatedDialog.xaml
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/PCUT/PCUT/Pages/AppOutdatedDialog.xaml.cs b/PCUT/PCUT/Pages/AppOutdatedDialog.xaml.cs
new file mode 100644
index 0000000..372be1c
--- /dev/null
+++ b/PCUT/PCUT/Pages/AppOutdatedDialog.xaml.cs
@@ -0,0 +1,39 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices.WindowsRuntime;
+using Windows.Foundation;
+using Windows.Foundation.Collections;
+using Windows.UI.Xaml;
+using Windows.UI.Xaml.Controls;
+using Windows.UI.Xaml.Controls.Primitives;
+using Windows.UI.Xaml.Data;
+using Windows.UI.Xaml.Input;
+using Windows.UI.Xaml.Media;
+using Windows.UI.Xaml.Navigation;
+
+// The Content Dialog item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
+
+namespace PCUT.Pages
+{
+ public sealed partial class AppOutdatedDialog : ContentDialog
+ {
+ public AppOutdatedDialog()
+ {
+ this.InitializeComponent();
+ }
+
+ private async void DownloadBtn_Click(object sender, RoutedEventArgs e)
+ {
+ var _ = await Windows.System.Launcher.LaunchUriAsync(
+ new Uri("https://pcut.vn/download"),
+ new Windows.System.LauncherOptions { TreatAsUntrusted = false });
+ }
+
+ private void CloseBtn_Click(object sender, RoutedEventArgs e)
+ {
+ Hide();
+ }
+ }
+}