// Returns: BOOL int IOleComponent.FDoIdle(uint grfidlef) { VisualGitIdleArgs args = new VisualGitIdleArgs(this, unchecked((int)grfidlef)); bool done = true; foreach (IVisualGitIdleProcessor pp in _idleProcessors) { args.Done = true; pp.OnIdle(args); done = done && args.Done; } return done ? 0 : 1; // TRUE to be called again }
public void OnIdle(VisualGitIdleArgs e) { if (_delayed) TryReleaseDelayed(); else if (e.Periodic) { for (int i = 0; i < _tickCount; i++) { if (_ticks[i] != 0) { Debug.WriteLine(string.Format("VisualGit: Tocking {0}", VisualGitCommand.TickFirst + i)); PostExecCommand(VisualGitCommand.TickFirst + i); } } } if (e.NonPeriodic) { VisualGitAction action; while (null != (action = GetIdleAction())) { try { if (action != null) action(); } catch (Exception ex) { IVisualGitErrorHandler handler = GetService<IVisualGitErrorHandler>(); if (handler != null && handler.IsEnabled(ex)) handler.OnError(ex); else throw; } if (!e.ContinueIdle()) break; } } }