/// <summary>
 /// Reset TouchScreenHidReport and EgsGestureHidReport properties.
 /// </summary>
 public void ResetHidReportObjects()
 {
     if (TouchScreenHidReport == null)
     {
         Debugger.Break();
     }
     if (EgsGestureHidReport == null)
     {
         Debugger.Break();
     }
     TouchScreenHidReport.Reset();
     EgsGestureHidReport.Reset();
     OnHidReportObjectsReset(EventArgs.Empty);
 }
        internal void InitializeOnceAtStartup()
        {
            if (HidReportsUpdate != null)
            {
                HidReportsUpdate.InitializeOnceAtStartup(this);
            }
            TouchScreenHidReport.InitializeOnceAtStartup(this);
            EgsGestureHidReport.InitializeOnceAtStartup(this);

            AddPropertiesToHidAccessPropertyList();
            InitializePropertiesByDefaultValue();

            TemperatureInCelsius.ValueUpdated    += delegate { OnPropertyChanged(nameof(TemperatureInCelsiusString)); };
            TemperatureInFahrenheit.ValueUpdated += delegate { OnPropertyChanged(nameof(TemperatureInFahrenheitString)); };
        }
Exemplo n.º 3
0
        internal void InitializeOnceAtStartup()
        {
            if (HidReportsUpdate != null)
            {
                HidReportsUpdate.InitializeOnceAtStartup(this);
            }
            TouchScreenHidReport.InitializeOnceAtStartup(this);
            EgsGestureHidReport.InitializeOnceAtStartup(this);

            AddPropertiesToHidAccessPropertyList();
            InitializePropertiesByDefaultValue();

            TemperatureInCelsius.ValueUpdated    += delegate { OnPropertyChanged(nameof(TemperatureInCelsiusString)); };
            TemperatureInFahrenheit.ValueUpdated += delegate { OnPropertyChanged(nameof(TemperatureInFahrenheitString)); };

            CameraViewImageSourceBitmapCapture.InitializeOnceAtStartup(this);
            FaceDetectionOnHost.InitializeOnceAtStartup(this);
            // static event
            Microsoft.Win32.SystemEvents.DisplaySettingsChanged += EgsGestureHidReport.OnDisplaySettingsChanged;
        }
        public void SetSettings(EgsDeviceSettings value)
        {
            Trace.Assert(value != null);

            if (_Settings != null)
            {
                _Settings.HidAccessPropertyUpdated -= EgsDeviceSettings_HidAccessPropertyUpdated;
                _Settings.CurrentConnectedEgsDevice = null;
                _Settings = null;
            }
            value.CurrentConnectedEgsDevice = this;
            value.HidAccessPropertyUpdated += EgsDeviceSettings_HidAccessPropertyUpdated;
            _Settings = value;

            // NOTE: When device is connected and then settings is updated, the app sets the settings from host to device.
            if (IsHidDeviceConnected)
            {
                SetAllSettingsToDeviceAndReadStatusFromDevice();
            }
            TouchScreenHidReport.Reset();
            EgsGestureHidReport.Reset();
        }