コード例 #1
0
        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;
            }
        }
コード例 #2
0
        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);
        }