Inheritance: ISerializable
Beispiel #1
0
        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);
        }
Beispiel #2
0
 public void Copy(CameraRegions c)
 {
     if (this != c)
     {
         lock (this)
         {
             this.mRegions = (ArrayList)c.Regions.Clone();
             this.mOutline = null;
         }
     }
 }
Beispiel #3
0
 public void Copy(CameraRegions c)
 {
     if (this != c)
     {
         lock (this)
         {
             this.mRegions = (ArrayList)c.Regions.Clone();
             this.mOutline = null;
         }
     }
 }