예제 #1
0
        protected virtual void Dispose(bool disposing)
        {
            var unRegister = RzChromaBroadcastNative.UnregisterEventNotification();
            var unInit     = RzChromaBroadcastNative.UnInit();

            RzChromaBroadcastNative.UnLoad();
        }
        protected virtual void Dispose(bool disposing)
        {
            _ = RzChromaBroadcastNative.UnregisterEventNotification();
            _ = RzChromaBroadcastNative.UnInit();
            RzChromaBroadcastNative.UnLoad();

            Initialized = false;
        }
예제 #3
0
        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);

            var unRegister = RzChromaBroadcastNative.UnregisterEventNotification();
            var unInit     = RzChromaBroadcastNative.UnInit();

            RzChromaBroadcastNative.UnLoad();
        }
예제 #4
0
        public RzChromaBroadcastManager()
        {
            if (RzChromaBroadcastNative.Load())
            {
                var init = RzChromaBroadcastNative.Init(Guid.Parse("b0ecdaf9-26b2-d33f-f046-1c44ce64eb58"));
                if (init == RzResult.SUCCESS)
                {
                    _callback = new RzBroadcastCallback(BroadcastCallback);

                    var register = RzChromaBroadcastNative.RegisterEventNotification(_callback);
                    if (register == RzResult.SUCCESS)
                    {
                        _colors = new int[RzChromaBroadcastNative.BroadcastColorCount];
                    }
                }
            }
        }
예제 #5
0
        public RazerConnectEffect(RazerConnectEffectConfig config) : base(config)
        {
            _connected    = false;
            _colors       = new LedColor[BroadcastColorCount];
            _packedColors = new int[BroadcastColorCount];

            if (RzChromaBroadcastNative.Load())
            {
                var init = RzChromaBroadcastNative.Init(Guid.Parse("b0ecdaf9-26b2-d33f-f046-1c44ce64eb58"));
                if (init == RzResult.SUCCESS)
                {
                    _callback = new RzBroadcastCallback(BroadcastCallback);

                    var register = RzChromaBroadcastNative.RegisterEventNotification(_callback);
                    if (register == RzResult.SUCCESS)
                    {
                        _connected = true;
                    }
                }
            }
        }
        public RzChromaBroadcastManager()
        {
            if (!RzChromaBroadcastNative.Load())
            {
                return;
            }

            var guid = Guid.Parse("b0ecdaf9-26b2-d33f-f046-1c44ce64eb58");

            if (RzChromaBroadcastNative.Init(guid) != RzResult.SUCCESS)
            {
                return;
            }

            _callback = new RzBroadcastCallback(BroadcastCallback);
            if (RzChromaBroadcastNative.RegisterEventNotification(_callback) != RzResult.SUCCESS)
            {
                return;
            }

            _colors     = new int[RzChromaBroadcastNative.BroadcastColorCount];
            Initialized = true;
        }