Example #1
0
 //===========================================================
 //		ISerializable
 //===========================================================
 private FontManager(Serial::SerializationInfo info, Serial::StreamingContext context)
 {
     this.f        = null;
     this.fontname = (string)info.GetValue("fontname", typeof(string));
     this._size    = info.GetSingle("_size");
     this.style    = (Gdi::FontStyle)info.GetValue("style", typeof(Gdi::FontStyle));
 }
Example #2
0
 void Serial::ISerializable.GetObjectData(Serial::SerializationInfo info, Serial::StreamingContext context)
 {
     info.AddValue("hasName", this.hasName);
     if (this.hasName)
     {
         info.AddValue("color", (int)c_values[this.color]);
         info.AddValue("name", c_names[this.color]);
     }
     else
     {
         info.AddValue("color", this.color);
     }
 }
Example #3
0
 //===========================================================
 //		Serialization
 //===========================================================
 private ColorName(Serial::SerializationInfo info, Serial::StreamingContext context)
 {
     if (this.hasName = info.GetBoolean("hasName"))
     {
         string name = info.GetString("name");
         int    index;
         if (c_indices.TryGetValue(name, out index))
         {
             this.color = index;
         }
         else
         {
             this.color = RegisterColor(name, info.GetInt32("color"));
         }
     }
     else
     {
         this.color = info.GetInt32("color");
     }
 }
Example #4
0
 void Serial::ISerializable.GetObjectData(Serial::SerializationInfo info, Serial::StreamingContext context)
 {
     info.AddValue("vals", this.vals);
 }
Example #5
0
 MatrixR8(Serial::SerializationInfo info, Serial::StreamingContext context)
     : this((Rational[, ])info.GetValue("vals", typeof(Rational[, ])))
 {
 }
Example #6
0
 void Serial::ISerializable.GetObjectData(Serial::SerializationInfo info, Serial::StreamingContext context)
 {
     info.AddValue("fontname", this.fontname);
     info.AddValue("_size", this._size);
     info.AddValue("style", this.style);
 }