示例#1
0
    protected EnterCode EnterBlockState(BLOCKSTATE value, bool syncenter = false)
    {
        var c = base.EnterBlockState(value);

        if (syncenter && c == EnterCode.Success)
        {
            SyncEvent(value.ToString());
        }
        return(c);
    }
示例#2
0
        protected virtual EnterCode EnterBlockState(BLOCKSTATE value)
        {
            if (value == blockstate)
            {
                return(EnterCode.AlreadyIn);
            }
            switch (value)
            {
            case BLOCKSTATE.NONE:
                break;

            case BLOCKSTATE.PREIBI:
                PreIBIOnTime = timer.ElapsedMillisecond;
                if (ex.CondTestAtState != CONDTESTATSTATE.NONE)
                {
                    condtestmanager.AddInList(CONDTESTPARAM.Event, value.ToString(), PreIBIOnTime);
                }
                break;

            case BLOCKSTATE.BLOCK:
                BlockOnTime = timer.ElapsedMillisecond;
                if (ex.CondTestAtState != CONDTESTATSTATE.NONE)
                {
                    condtestmanager.AddInList(CONDTESTPARAM.Event, value.ToString(), BlockOnTime);
                }
                break;

            case BLOCKSTATE.SUFIBI:
                SufIBIOnTime = timer.ElapsedMillisecond;
                if (ex.CondTestAtState != CONDTESTATSTATE.NONE)
                {
                    condtestmanager.AddInList(CONDTESTPARAM.Event, value.ToString(), SufIBIOnTime);
                }
                break;
            }
            blockstate = value;
            return(EnterCode.Success);
        }