public HistoryItem(string operationName, EnumerateTarget target, IWidgetEnumerator enumerator) { OperationName = operationName; Target = target; Enumerator = enumerator; window = HitaHint.UIAssistantAPI.WindowAPI.ActiveWindow; }
public void Dispose() { Enumerator?.Dispose(); InputText?.Clear(); Session.Dispose(); Enumerator = null; EnumeratedResults = null; }
internal void Restore() { if (!History.CanUndo) { return; } var item = History.PopState(); if (_api.WindowAPI.ActiveWindow != item.window) { item.window.Activate(); } OperationManager.Change(item.OperationName); Target = item.Target; Enumerator = item.Enumerator; }
internal void ChangeTarget(EnumerateTarget target) { Target = target; Enumerator = Enumerators.Enumerator.Factory(target); }
internal void PushState(string operationName, EnumerateTarget target, IWidgetEnumerator enumerator) { _history.Push(new HistoryItem(operationName, target, enumerator)); }