public override void Activate() { _status = State.Active; _changeStartTime = DateTime.Now; _currentAction.Action(); var page = _form.CurrentPageName; if (page != Globals.UnknownPage && page != _startingPage && _startingPage != Globals.EveryPage) { _repairByForce = true; } }
private State Repair() { Console.WriteLine("Repair " + _type + ".."); RemoveAllSubJobs(); var pageName = _form.CurrentPageName; ActionSequenceTree actionTree = null; if (pageName == Globals.UnknownPage) { } else if (_repairMap.TryGetValue(pageName, out actionTree)) { _repairByForce = false; SetCurrentAction(actionTree); actionTree.Action(); } else { OnJobFailed(); return(State.Failed); } return(_status = State.Active); }