public void Patch(Lifetime lifetime, [NotNull] IActionBar actionBar) { if (actionBar.ActionGroup.ActionId == TodoExplorerActionBarActionGroup.ID) { _separator = actionBar.InjectSeparator(int.MaxValue); _label = actionBar.InjectLabel(int.MaxValue, "Updating...", lifetime); _label.NotNull().MouseDoubleClick += Label_MouseDoubleClick; lifetime.OnTermination(() => { _label.NotNull().MouseDoubleClick -= Label_MouseDoubleClick; _label = null; _separator = null; }); _separator = actionBar.InjectSeparator(int.MaxValue); _shellLocks.Tasks.Queue(lifetime, () => UpdateRequestSignal.Fire(), TaskPriority.BelowNormal); } }
public static void RegisterActionBar(IActionBar bar, string name = "Default") { ActionBars[name] = bar; }
public static void RegisterActionBar(IActionBar bar, string name = "Default") { ActionBars[name] = bar; }