diff --git a/TuneLab/GUI/UpdateDialog.axaml b/TuneLab/GUI/UpdateDialog.axaml new file mode 100644 index 0000000..d922d65 --- /dev/null +++ b/TuneLab/GUI/UpdateDialog.axaml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TuneLab/GUI/UpdateDialog.axaml.cs b/TuneLab/GUI/UpdateDialog.axaml.cs new file mode 100644 index 0000000..d2f46ff --- /dev/null +++ b/TuneLab/GUI/UpdateDialog.axaml.cs @@ -0,0 +1,78 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Media; +using System; +using TuneLab.Utils; +using Button = TuneLab.GUI.Components.Button; +using Markdown.Avalonia; +using TuneLab.I18N; + +namespace TuneLab.GUI; + +internal partial class UpdateDialog : Window +{ + public enum ButtonType + { + Primary, + Normal + } + + private Grid titleBar; + private Label titleLabel; + private SelectableTextBlock messageTextBlock; + private MarkdownScrollViewer markDownScrollViewer; + + public UpdateDialog() + { + InitializeComponent(); + Focusable = true; + CanResize = false; + WindowState = WindowState.Normal; + WindowStartupLocation = WindowStartupLocation.CenterScreen; + Topmost = true; + + this.DataContext = this; + this.Background = Style.BACK.ToBrush(); + Content.Background = Style.INTERFACE.ToBrush(); + + titleBar = this.FindControl("TitleBar") ?? throw new InvalidOperationException("TitleBar not found"); + titleLabel = this.FindControl