Skip to content

Instantly share code, notes, and snippets.

@dsibinski
Last active March 11, 2017 18:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dsibinski/3c2715968ecf87822ee6f79a46a553ac to your computer and use it in GitHub Desktop.
Save dsibinski/3c2715968ecf87822ee6f79a46a553ac to your computer and use it in GitHub Desktop.
protected override void OnPause()
{
base.OnPause();
DetatchUserControlsEvents();
// TODO: saving variables (amount, number of people) to persistent storage (file, database)
}
// ...
private void DetatchUserControlsEvents()
{
_btnCalculate.Click -= _btnCalculate_Click;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment