I don't know some changes....

This commit is contained in:
Burak Kaan Köse
2024-07-19 20:31:13 +02:00
parent 026151e7e4
commit 5b68f237f0
384 changed files with 176 additions and 29755 deletions

View File

@@ -1,58 +0,0 @@
using Wino.Core.Domain.Enums;
using Wino.Core.Domain.Interfaces;
#if NET8_0
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
#else
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
#endif
namespace Wino.Dialogs
{
public abstract class BaseAccountCreationDialog : ContentDialog, IAccountCreationDialog
{
public AccountCreationDialogState State
{
get { return (AccountCreationDialogState)GetValue(StateProperty); }
set { SetValue(StateProperty, value); }
}
public static readonly DependencyProperty StateProperty = DependencyProperty.Register(nameof(State), typeof(AccountCreationDialogState), typeof(BaseAccountCreationDialog), new PropertyMetadata(AccountCreationDialogState.Idle, OnStateChanged));
// Prevent users from dismissing it by ESC key.
private void DialogClosing(ContentDialog sender, ContentDialogClosingEventArgs args)
{
if (args.Result == ContentDialogResult.None)
{
args.Cancel = true;
}
}
public void ShowDialog()
{
_ = ShowAsync();
}
public void Complete()
{
State = AccountCreationDialogState.Completed;
// Unregister from closing event.
Closing -= DialogClosing;
Hide();
}
private static void OnStateChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args)
{
if (obj is BaseAccountCreationDialog dialog)
{
dialog.UpdateState();
}
}
public abstract void UpdateState();
}
}