diff --git a/Launcher.Client.Avalonia/GUI/LauncherWindow.axaml.cs b/Launcher.Client.Avalonia/GUI/LauncherWindow.axaml.cs
index aa4bfbd..e7ecf07 100644
--- a/Launcher.Client.Avalonia/GUI/LauncherWindow.axaml.cs
+++ b/Launcher.Client.Avalonia/GUI/LauncherWindow.axaml.cs
@@ -27,6 +27,14 @@ public partial class LauncherWindow : Window
SelectTab(LibraryButton, null);
FillProgramsPanel();
Logger.Log("launcher started");
+ try
+ {
+ throw new Exception("aaa");
+ }
+ catch (Exception ex)
+ {
+ LogError("main window", ex);
+ }
}
void LogHandler(string m) => Dispatcher.UIThread.InvokeAsync(()=>LogBox.Text += m);
diff --git a/Launcher.Client.Avalonia/GUI/MessageBox.axaml b/Launcher.Client.Avalonia/GUI/MessageBox.axaml
index 5971b49..86bc2d3 100644
--- a/Launcher.Client.Avalonia/GUI/MessageBox.axaml
+++ b/Launcher.Client.Avalonia/GUI/MessageBox.axaml
@@ -3,7 +3,23 @@
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"
- Title="MessageBox"
- d:DesignHeight="450"
- d:DesignWidth="800"
- mc:Ignorable="d" />
+ mc:Ignorable="d"
+ Height="100"
+ Width="200"
+ Background="{DynamicResource MyBackgroundColor}">
+
+ * 30
+
+
+
+
diff --git a/Launcher.Client.Avalonia/GUI/MessageBox.axaml.cs b/Launcher.Client.Avalonia/GUI/MessageBox.axaml.cs
index 612d752..7bd0634 100644
--- a/Launcher.Client.Avalonia/GUI/MessageBox.axaml.cs
+++ b/Launcher.Client.Avalonia/GUI/MessageBox.axaml.cs
@@ -1,4 +1,6 @@
-namespace Launcher.Client.Avalonia.GUI;
+using Avalonia.Interactivity;
+
+namespace Launcher.Client.Avalonia.GUI;
public partial class MessageBox : Window
{
@@ -9,6 +11,15 @@ public partial class MessageBox : Window
public static void Show(string title, string text)
{
- throw new NotImplementedException();
+ var mb = new MessageBox();
+ mb.Title = title;
+ mb.TextBlock.Text = text;
+ mb.Topmost = true;
+ mb.Show();
+ }
+
+ private void Button_OnClick(object sender, RoutedEventArgs e)
+ {
+ this.Close();
}
}
\ No newline at end of file
diff --git a/Launcher.Client.Avalonia/LauncherMain.cs b/Launcher.Client.Avalonia/LauncherMain.cs
index 156340e..6ac9f3b 100644
--- a/Launcher.Client.Avalonia/LauncherMain.cs
+++ b/Launcher.Client.Avalonia/LauncherMain.cs
@@ -34,7 +34,6 @@ public static class LauncherMain
Trace.AutoFlush = true;
Trace.Listeners.Add(traceHandler);
BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
- throw new Exception("aaa");
}
catch (Exception ex)
{
@@ -45,7 +44,7 @@ public static class LauncherMain
public static void LogError(string context, Exception ex)
{
string errmsg = $"{ex.Message}\n{ex.StackTrace}";
- //MessageBox.Show($"{context} ERROR", errmsg);
+ MessageBox.Show($"{context} ERROR", errmsg);
Logger.Log(errmsg);
}
}
\ No newline at end of file
diff --git a/Launcher.Client/Launcher.Client.csproj b/Launcher.Client/Launcher.Client.csproj
index 3f41749..29ddf27 100644
--- a/Launcher.Client/Launcher.Client.csproj
+++ b/Launcher.Client/Launcher.Client.csproj
@@ -18,9 +18,8 @@
+
-
-
diff --git a/Launcher.Client/ProgramDescriptor.cs b/Launcher.Client/ProgramDescriptor.cs
new file mode 100644
index 0000000..4238d44
--- /dev/null
+++ b/Launcher.Client/ProgramDescriptor.cs
@@ -0,0 +1,6 @@
+namespace Launcher.Client;
+
+public class ProgramDescriptor
+{
+
+}
\ No newline at end of file