예제 #1
0
 public GlimmrData(SystemData sd)
 {
     Tag = "Glimmr";
     Name ??= Tag;
     LastSeen    = DateTime.Now.ToString(CultureInfo.InvariantCulture);
     LeftCount   = sd.LeftCount;
     RightCount  = sd.RightCount;
     TopCount    = sd.TopCount;
     BottomCount = sd.BottomCount;
     IpAddress   = IpUtil.GetLocalIpAddress();
     Id          = sd.CheckDeviceVariables();
 }
예제 #2
0
        public sealed override void RefreshSystem()
        {
            var sd = DataUtil.GetSystemData();

            _devMode  = sd.DeviceMode;
            _hostName = _sd.DeviceName;
            _discovery?.Dispose();
            var address = new List <IPAddress> {
                IPAddress.Parse(IpUtil.GetLocalIpAddress())
            };
            var service = new ServiceProfile(_hostName, "_glimmr._tcp", 21324, address);

            service.AddProperty("mac", sd.DeviceId);
            _discovery = new ServiceDiscovery();
            _discovery.Advertise(service);
        }
예제 #3
0
 public SystemData(bool setDefaults = false)
 {
     if (setDefaults)
     {
         RecId           = 1;
         DevType         = "DreamScreen4K";
         CamWidth        = 1920;
         CamHeight       = 1080;
         CamType         = 1;
         ScaleFactor     = .5f;
         CaptureMode     = 2;
         MinBrightness   = 255;
         SaturationBoost = 0;
         DsIp            = IpUtil.GetLocalIpAddress();
         AudioThreshold  = .01f;
         DefaultSet      = true;
     }
 }