aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Ava/UI/Controls/UpdateWaitWindow.axaml.cs
blob: 7ad1ee332cdadfd6548988eef4b375a3debeec13 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using Avalonia.Controls;
using Ryujinx.Ava.UI.Windows;
using System.Threading;

namespace Ryujinx.Ava.UI.Controls
{
    public partial class UpdateWaitWindow : StyleableWindow
    {
        public UpdateWaitWindow(string primaryText, string secondaryText, CancellationTokenSource cancellationToken) : this(primaryText, secondaryText)
        {
            SystemDecorations = SystemDecorations.Full;
            ShowInTaskbar = true;

            Closing += (_, _) => cancellationToken.Cancel();
        }

        public UpdateWaitWindow(string primaryText, string secondaryText) : this()
        {
            PrimaryText.Text = primaryText;
            SecondaryText.Text = secondaryText;
            WindowStartupLocation = WindowStartupLocation.CenterOwner;
            SystemDecorations = SystemDecorations.BorderOnly;
            ShowInTaskbar = false;
        }

        public UpdateWaitWindow()
        {
            InitializeComponent();
        }
    }
}