示例#1
0
        void DigitalJoinHandler(DigitalJoin join, bool pressed)
        {
            if (pressed)
            {
                switch (join)
                {
                case DigitalJoin.SystemStartup:
                    break;

                case DigitalJoin.SystemShutdown:
                    break;

                default:
                    Trace("DigitalJoinHandler() unhandled join: " + join);
                    break;
                }
            }
            else
            {
            }
        }
示例#2
0
        void PanelSigChangeHandler(BasicTriList currentDevice, SigEventArgs args)
        {
            switch (args.Sig.Type)
            {
            case eSigType.Bool:
                if (Enum.IsDefined(typeof(DigitalJoin), args.Sig.Number))     // check that signal is defined in enum
                {
                    DigitalJoin join = (DigitalJoin)args.Sig.Number;
                    DigitalJoinHandler(join, args.Sig.BoolValue);
                }
                break;

            case eSigType.UShort:
                break;

            case eSigType.String:
                break;

            default:
                Trace("PanelSigChangeHandler() unhandled signal type: " + args.Sig.Type);
                break;
            }
        }