public CameraData(CameraData src) { if (null == src) { ArgumentNullException argumentNullException = new ArgumentNullException("src in CameraData copy constructor"); throw argumentNullException; } else { ID = Guid.NewGuid(); FrameHistory = new History(300); CameraPrefix = src.CameraPrefix; Path = src.Path; RegistrationX = src.RegistrationX; RegistrationY = src.RegistrationY; RegistrationXResolution = src.RegistrationXResolution; RegistrationYResolution = src.RegistrationYResolution; Monitoring = src.Monitoring; LiveContactData = new CameraContactData(src.LiveContactData); AOI = new AreasOfInterestCollection(src.AOI); Monitor = null; NoMotionTimeout = src.NoMotionTimeout; } }
public static void SetCameraContactData(RegistryKey key, CameraContactData data) { key.SetValue("IPAddress", data.CameraIPAddress, RegistryValueKind.String); key.SetValue("CameraPassword", data.CameraPassword, RegistryValueKind.String); key.SetValue("UserName", data.CameraUserName, RegistryValueKind.String); key.SetValue("XResolution", data.CameraXResolution, RegistryValueKind.DWord); key.SetValue("YResolution", data.CameraXResolution, RegistryValueKind.DWord); key.SetValue("Port", data.Port, RegistryValueKind.DWord); key.SetValue("CameraName", data.ShortCameraName, RegistryValueKind.String); }
public CameraData(string prefix, string path) { ID = Guid.NewGuid(); FrameHistory = new History(300); LiveContactData = new CameraContactData(); CameraPrefix = prefix; Path = path; Monitoring = true; AOI = new AreasOfInterestCollection(Path, CameraPrefix); NoMotionTimeout = 90; }
public CameraContactData(CameraContactData src) { if (null != src) { CameraIPAddress = src.CameraIPAddress; Port = src.Port; ShortCameraName = src.ShortCameraName; CameraUserName = src.CameraUserName; CameraPassword = src.CameraPassword; CameraXResolution = src.CameraXResolution; CameraYResolution = src.CameraYResolution; } }
public static CameraContactData GetContactData(RegistryKey key) { CameraContactData data = new CameraContactData(); data.CameraIPAddress = (string)key.GetValue("IPAddress"); data.CameraPassword = (string)key.GetValue("CameraPassword"); data.CameraUserName = (string)key.GetValue("UserName"); data.CameraXResolution = (int)key.GetValue("XResolution"); data.CameraYResolution = (int)key.GetValue("YResolution"); data.Port = (int)key.GetValue("Port"); data.ShortCameraName = (string)key.GetValue("CameraName"); return(data); }
public static CameraContactData GetContactData(RegistryKey key) { if (key != null) { CameraContactData data = new CameraContactData { CameraIPAddress = (string)key.GetValue("IPAddress"), CameraPassword = (string)key.GetValue("CameraPassword"), CameraUserName = (string)key.GetValue("UserName"), CameraXResolution = (int)key.GetValue("XResolution"), CameraYResolution = (int)key.GetValue("YResolution"), Port = (int)key.GetValue("Port"), ShortCameraName = (string)key.GetValue("CameraName") }; return(data); } else { return(null); } }