示例#1
0
 //============================================================
 // <T>序列化内容到输出流。</T>
 //
 // @param output 输出流
 //============================================================
 public override void OnSerialize(IOutput output)
 {
     base.OnSerialize(output);
     // 存储位置
     output.WriteInt8((sbyte)_dockCd);
     _location.Serialize16(output);
     _size.Serialize16(output);
     // 存储边距
     if (!_margin.IsEmpty())
     {
         _margin.Serialize8(output);
     }
     if (!_padding.IsEmpty())
     {
         _padding.Serialize8(output);
     }
     // 存储边框
     if (!_borderOuter.IsEmpty())
     {
         _borderOuter.Serialize(output);
     }
     if (!_borderInner.IsEmpty())
     {
         _borderInner.Serialize(output);
     }
     // 存储前景
     output.WriteInt32(RColor.ConvertRevert(_foreColor));
     if (_foreResource.IsValid())
     {
         _foreResource.Serialize(output);
     }
     // 存储后景
     output.WriteInt32(RColor.ConvertRevert(_backColor));
     if (_backResource.IsValid())
     {
         _backResource.Serialize(output);
     }
     // 存储事件
     //output.WriteString(_onClick);
     //output.WriteString(_onDoubleClick);
     //output.WriteString(_onMouseEnter);
     //output.WriteString(_onMouseLeave);
     //output.WriteString(_onMouseDown);
     //output.WriteString(_onMouseMove);
     //output.WriteString(_onMouseUp);
 }