Esempio n. 1
0
        private void SubscribeCimSessionEvent(string namespaceName, string query)
        {
            IObservable <CimSubscriptionResult> queryInstances = CimSession.SubscribeAsync(namespaceName, "WQL", query);
            var observer = new MMIObserver <CimSubscriptionResult>();

            TouchScreenDisposeAble = queryInstances.Subscribe(observer);
        }
Esempio n. 2
0
        public IValueChangedNotify SubscribeBrightnessEvent()
        {
            string namespaceName = "root\\WMI";
            string query         = "SELECT Brightness from WmiMonitorBrightnessEvent";

            IObservable <CimSubscriptionResult> queryInstances = CimSession.SubscribeAsync(namespaceName, "WQL", query);
            var observer = new MMIObserver <CimSubscriptionResult>();

            TouchScreenDisposeAble = queryInstances.Subscribe(observer);
            return(observer);
        }