/// <summary> /// Deserialization constructor /// </summary> /// <param name="info">Serialization info</param> /// <param name="context">Streaming context</param> protected PureObjectLabelPeer(SerializationInfo info, StreamingContext context) { type = info.GetValue("Kind", typeof(string)) as string; kind = (string)info.GetValue("Type", typeof(string)); name = (string)info.GetValue("Name", typeof(string)); x = (int)info.GetValue("X", typeof(int)); y = (int)info.GetValue("Y", typeof(int)); obj = info.GetValue("Object", typeof(object)) as ICategoryObject; string t = obj.GetType() + ""; if (!t.Equals(type)) { type = t; } try { bytes = PureDesktopPeer.LoadLabel(info); } catch (Exception ex) { ex.ShowError(10); } }
/// <summary> /// Deserialization constructor /// </summary> /// <param name="info">Serialization info</param> /// <param name="context">Streaming context</param> public PureArrowLabelPeer(SerializationInfo info, StreamingContext context) { type = info.GetValue("Kind", typeof(string)) as string; kind = (string)info.GetValue("Type", typeof(string)); name = (string)info.GetValue("Name", typeof(string)); arrow = info.GetValue("Arrow", typeof(object)) as ICategoryArrow; sourceNumber = info.GetValue("SourceNumber", typeof(object)); targetNumber = info.GetValue("TargetNumber", typeof(object)); string t = arrow.GetType() + ""; if (!t.Equals(type)) { type = t; } try { bytes = PureDesktopPeer.LoadLabel(info); } catch (Exception ex) { ex.ShowError(10); } }