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(); }
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); }
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; } }