public virtual void UpdateStatus() { if (codon != null) { ConditionFailedAction failedAction = codon.GetFailedAction(caller); this.Visible = failedAction != ConditionFailedAction.Exclude; bool isEnabled = failedAction != ConditionFailedAction.Disable; if (isEnabled && menuCommand != null && menuCommand is IMenuCommand) { isEnabled = ((IMenuCommand)menuCommand).IsEnabled; } this.Enabled = isEnabled; if (this.Visible && codon.Properties.Contains("icon")) { Image = WinFormsResourceService.GetBitmap(StringParser.Parse(codon.Properties["icon"])); } } }
public virtual void UpdateStatus() { if (codon != null) { ConditionFailedAction failedAction = codon.GetFailedAction(caller); this.Visible = failedAction != ConditionFailedAction.Exclude; if (menuCommand == null && !string.IsNullOrEmpty(codon.Properties["checked"])) { Checked = string.Equals(StringParser.Parse(codon.Properties["checked"]), bool.TrueString, StringComparison.OrdinalIgnoreCase); } else { CreateMenuCommand(); if (menuCommand != null) { Checked = menuCommand.IsChecked; } } } }
public bool UseRegistryForProject(IProject project) { return(codon.GetFailedAction(project) == ConditionFailedAction.Nothing); }