public bool Unserialize(byte[] data) { CameraRegions t = null; try { MemoryStream ms = new MemoryStream(data); BinaryFormatter bformatter = new BinaryFormatter(); t = (CameraRegions)bformatter.Deserialize(ms); ms.Close(); } catch (Exception) { t = null; } if (t != null) { this.Copy(t); } else { this.ClearRegion(); } return(true); }
public void Copy(CameraRegions c) { if (this != c) { lock (this) { this.mRegions = (ArrayList)c.Regions.Clone(); this.mOutline = null; } } }
public void Copy(CameraRegions c) { if (this != c) { lock (this) { this.mRegions = (ArrayList)c.Regions.Clone(); this.mOutline = null; } } }