Skip to content

Instantly share code, notes, and snippets.

@alanmcgovern
Created March 14, 2013 09:10
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 alanmcgovern/c8c6ec56e92bece3426f to your computer and use it in GitHub Desktop.
Save alanmcgovern/c8c6ec56e92bece3426f to your computer and use it in GitHub Desktop.
void ICommandBar.Update (object activeTarget)
{
if (!toolbarEnabled)
return;
RoundButton.OperationIcon operation;
try {
var ci = GetStartButtonCommandInfo (out operation);
if (ci.Enabled != button.Sensitive)
button.Sensitive = ci.Enabled;
} catch (Exception ex) {
LoggingService.LogError ("Could not load toolbar properly");
}
button.Icon = operation;
var stopped = operation != RoundButton.OperationIcon.Stop;
if (configurationCombosBox.Sensitive != stopped)
configurationCombosBox.Sensitive = stopped;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment