Created
October 8, 2010 20:13
-
-
Save AnsonSmith/617448 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class RandomScreenViewModel:Screen | |
{ | |
public RandomScreenViewModel() | |
{ | |
Guid id = Guid.NewGuid(); | |
DisplayName = id.ToString(); | |
} | |
private int onInitializeCalls = 0; | |
private int onActivateCalls = 0; | |
private int onDeactivateCalls = 0; | |
public int OnInitializeCalls | |
{ | |
get | |
{ | |
return onInitializeCalls; | |
} | |
set | |
{ | |
onInitializeCalls = value; | |
NotifyOfPropertyChange(() => OnInitializeCalls); | |
} | |
} | |
public int OnActivateCalls | |
{ | |
get | |
{ | |
return onActivateCalls; | |
} | |
set | |
{ | |
onActivateCalls = value; | |
NotifyOfPropertyChange(() => OnActivateCalls); | |
} | |
} | |
public int OnDeactivateCalls | |
{ | |
get | |
{ | |
return onDeactivateCalls; | |
} | |
set | |
{ | |
onDeactivateCalls = value; | |
NotifyOfPropertyChange(() => OnDeactivateCalls); | |
} | |
} | |
protected override void OnInitialize() | |
{ | |
OnInitializeCalls++; | |
base.OnInitialize(); | |
} | |
protected override void OnActivate() | |
{ | |
OnActivateCalls++; | |
base.OnActivate(); | |
} | |
protected override void OnDeactivate(bool close) | |
{ | |
OnDeactivateCalls++; | |
base.OnDeactivate(close); | |
} | |
public void CloseScreen() | |
{ | |
base.TryClose(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment