// Returns: BOOL int IOleComponent.FDoIdle(uint grfidlef) { AnkhIdleArgs args = new AnkhIdleArgs(this, unchecked((int)grfidlef)); bool done = true; foreach (IAnkhIdleProcessor 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(AnkhIdleArgs e) { if (_delayed) TryReleaseDelayed(); else if (e.Periodic) { for (int i = 0; i < _tickCount; i++) { if (_ticks[i] != 0) { Debug.WriteLine(string.Format("AnkhSVN: Tocking {0}", AnkhCommand.TickFirst + i)); PostExecCommand(AnkhCommand.TickFirst + i); } } } if (e.NonPeriodic) { AnkhAction action; while (null != (action = GetIdleAction())) { try { if (action != null) action(); } catch (Exception ex) { IAnkhErrorHandler handler = GetService<IAnkhErrorHandler>(); if (handler != null && handler.IsEnabled(ex)) handler.OnError(ex); else throw; } if (!e.ContinueIdle()) break; } } }