mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
move the viewmodel to a variable
makes everything look cleaner
This commit is contained in:
parent
e9712d1730
commit
5b32de8b9b
@ -8,13 +8,14 @@ namespace Bloxstrap.UI.Elements.Settings.Pages
|
||||
/// </summary>
|
||||
public partial class FastFlagEditorWarningPage
|
||||
{
|
||||
private FastFlagEditorWarningViewModel _viewModel;
|
||||
private bool _initialLoad = false;
|
||||
|
||||
public FastFlagEditorWarningPage()
|
||||
{
|
||||
var vm = new FastFlagEditorWarningViewModel(this);
|
||||
DataContext = vm;
|
||||
vm.StartCountdown();
|
||||
_viewModel = new FastFlagEditorWarningViewModel(this);
|
||||
DataContext = _viewModel;
|
||||
_viewModel.StartCountdown();
|
||||
|
||||
InitializeComponent();
|
||||
}
|
||||
@ -29,12 +30,12 @@ namespace Bloxstrap.UI.Elements.Settings.Pages
|
||||
return;
|
||||
}
|
||||
|
||||
((FastFlagEditorWarningViewModel)DataContext).StartCountdown();
|
||||
_viewModel.StartCountdown();
|
||||
}
|
||||
|
||||
private void Page_Unloaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
((FastFlagEditorWarningViewModel)DataContext).StopCountdown();
|
||||
_viewModel.StopCountdown();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user