mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-18 00:21:33 -07:00
* improve the flag editor warning viewmodel - no longer creates a new viewmodel every page reload - fixes an oversight * stop countdown on unload * move the viewmodel to a variable makes everything look cleaner * remove initialload check
32 lines
801 B
C#
32 lines
801 B
C#
using Bloxstrap.UI.ViewModels.Settings;
|
|
using System.Windows;
|
|
|
|
namespace Bloxstrap.UI.Elements.Settings.Pages
|
|
{
|
|
/// <summary>
|
|
/// Interaction logic for FastFlagEditorWarningPage.xaml
|
|
/// </summary>
|
|
public partial class FastFlagEditorWarningPage
|
|
{
|
|
private FastFlagEditorWarningViewModel _viewModel;
|
|
|
|
public FastFlagEditorWarningPage()
|
|
{
|
|
_viewModel = new FastFlagEditorWarningViewModel(this);
|
|
DataContext = _viewModel;
|
|
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void Page_Loaded(object sender, RoutedEventArgs e)
|
|
{
|
|
_viewModel.StartCountdown();
|
|
}
|
|
|
|
private void Page_Unloaded(object sender, RoutedEventArgs e)
|
|
{
|
|
_viewModel.StopCountdown();
|
|
}
|
|
}
|
|
}
|