개정판 036650a0
issue #999: Add serialize method to all of controls
Change-Id: I74e404885e8cd107b48ad1921e768137ed14a3da
MarkupToPDF/Controls/Text/TextControl.cs | ||
---|---|---|
1 | 1 |
using MarkupToPDF.Common; |
2 | 2 |
using MarkupToPDF.Controls.Common; |
3 |
using MarkupToPDF.Serialize.Core; |
|
4 |
using MarkupToPDF.Serialize.S_Control; |
|
3 | 5 |
using System; |
4 | 6 |
using System.Collections.Generic; |
5 | 7 |
using System.ComponentModel; |
... | ... | |
583 | 585 |
|
584 | 586 |
|
585 | 587 |
|
586 |
public ControlType ControlType |
|
588 |
override public ControlType ControlType
|
|
587 | 589 |
{ |
588 | 590 |
get |
589 | 591 |
{ |
... | ... | |
1139 | 1141 |
if (PropertyChanged != null) |
1140 | 1142 |
PropertyChanged(this, new PropertyChangedEventArgs(propName)); |
1141 | 1143 |
} |
1144 |
|
|
1145 |
/// <summary> |
|
1146 |
/// Serialize this |
|
1147 |
/// </summary> |
|
1148 |
/// <param name="sUserId"></param> |
|
1149 |
/// <returns></returns> |
|
1150 |
public override string Serialize() |
|
1151 |
{ |
|
1152 |
using (S_TextControl STemp = new S_TextControl()) |
|
1153 |
{ |
|
1154 |
STemp.TransformPoint = "0|0"; |
|
1155 |
STemp.SizeSet = String.Format("{0}|{1}", this.LineSize.Left.ToString(), this.TextSize.ToString()); |
|
1156 |
STemp.Text = this.Text; |
|
1157 |
STemp.UserID = this.UserID; |
|
1158 |
STemp.FontColor = this.FontColor.Color.ToString(); |
|
1159 |
//STemp.FontColor = "#FFFFFF00"; |
|
1160 |
|
|
1161 |
if (this.StartPoint == new Point()) |
|
1162 |
STemp.StartPoint = new Point(this.CanvasX, this.CanvasY); |
|
1163 |
else |
|
1164 |
STemp.StartPoint = this.StartPoint; |
|
1165 |
|
|
1166 |
STemp.EndPoint = this.EndPoint; |
|
1167 |
STemp.Opac = this.Opacity; |
|
1168 |
STemp.PointSet = this.PointSet; |
|
1169 |
STemp.Angle = this.Angle; |
|
1170 |
STemp.paintMethod = this.ControlType_No; |
|
1171 |
STemp.BoxW = this.BoxWidth; |
|
1172 |
STemp.BoxH = this.BoxHeight; |
|
1173 |
STemp.isHighLight = this.IsHighLight; |
|
1174 |
STemp.Name = this.GetType().Name.ToString(); |
|
1175 |
STemp.fontConfig = new List<string>() |
|
1176 |
{ |
|
1177 |
this.TextFamily.ToString(), |
|
1178 |
this.TextStyle.ToString(), |
|
1179 |
this.TextWeight.ToString(), |
|
1180 |
}; |
|
1181 |
|
|
1182 |
|
|
1183 |
|
|
1184 |
if (this.UnderLine != null) |
|
1185 |
{ |
|
1186 |
STemp.fontConfig.Add("true"); |
|
1187 |
} |
|
1188 |
|
|
1189 |
///강인구 추가(2017.11.02) |
|
1190 |
///Memo 추가 |
|
1191 |
STemp.Memo = this.Memo; |
|
1192 |
|
|
1193 |
return "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize())); |
|
1194 |
} |
|
1195 |
} |
|
1142 | 1196 |
} |
1143 | 1197 |
} |
내보내기 Unified diff