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>
|
/// </summary>
|
||||||
public partial class FastFlagEditorWarningPage
|
public partial class FastFlagEditorWarningPage
|
||||||
{
|
{
|
||||||
|
private FastFlagEditorWarningViewModel _viewModel;
|
||||||
private bool _initialLoad = false;
|
private bool _initialLoad = false;
|
||||||
|
|
||||||
public FastFlagEditorWarningPage()
|
public FastFlagEditorWarningPage()
|
||||||
{
|
{
|
||||||
var vm = new FastFlagEditorWarningViewModel(this);
|
_viewModel = new FastFlagEditorWarningViewModel(this);
|
||||||
DataContext = vm;
|
DataContext = _viewModel;
|
||||||
vm.StartCountdown();
|
_viewModel.StartCountdown();
|
||||||
|
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
@ -29,12 +30,12 @@ namespace Bloxstrap.UI.Elements.Settings.Pages
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
((FastFlagEditorWarningViewModel)DataContext).StartCountdown();
|
_viewModel.StartCountdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Page_Unloaded(object sender, RoutedEventArgs e)
|
private void Page_Unloaded(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
((FastFlagEditorWarningViewModel)DataContext).StopCountdown();
|
_viewModel.StopCountdown();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user