프로젝트

일반

사용자정보

개정판 036650a0

ID036650a01758a31b0f2f1a8e591ed6c8af870eef
상위 f286e80b
하위 d4e73fc9

백흠경이(가) 5년 이상 전에 추가함

issue #999: Add serialize method to all of controls

Change-Id: I74e404885e8cd107b48ad1921e768137ed14a3da

차이점 보기:

MarkupToPDF/Controls/Parsing/MarkupCopy.cs
26 26

  
27 27
namespace MarkupToPDF.Controls.Parsing
28 28
{
29
    //public partial class LayerControl : Control
30
    //{
31
    //public class MarkupReturn
32
    //{
33
    //    public string ConvertData { get; set; }
34
    //    public int DATA_TYPE { get; set; }
35
    //}
36

  
37
    //public string MarkupToString(ObservableCollection<CommentUserInfo> baseLayer, string UserId)
38
    //{
39

  
40
    //    String ConvertData = "";
41

  
42
    //    #region ######### 마크업 파싱##########
43
    //    foreach (UIElement item in baseLayer)
44
    //    {
45
    //        switch (item.GetType().Name.ToString())
46
    //        {
47
    //            #region Arrow_Multi
48
    //            case "ArrowControl_Multi":
49
    //                using (S_ArrowControl_Multi STemp = new S_ArrowControl_Multi())
50
    //                {
51
    //                    var instance = item as ArrowControl_Multi;
52
    //                    STemp.TransformPoint = "0|0";
53
    //                    STemp.PointSet = instance.PointSet;
54
    //                    STemp.SizeSet = String.Format("{0}", instance.LineSize);
55
    //                    STemp.StrokeColor = instance.StrokeColor.Color.ToString();
56
    //                    STemp.StartPoint = instance.StartPoint;
57
    //                    STemp.EndPoint = instance.EndPoint;
58
    //                    STemp.UserID = UserId;
59
    //                    STemp.Opac = instance.Opacity;
60
    //                    STemp.DashSize = instance.DashSize;
61
    //                    STemp.MidPoint = instance.MiddlePoint;
62
    //                    STemp.Name = instance.GetType().Name.ToString();
63
    //                    ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
64
    //                };
65
    //                break;
66
    //            #endregion
67
    //            #region ArrowText
68
    //            case "ArrowTextControl":
69
    //                using (S_ArrowTextControl STemp = new S_ArrowTextControl())
70
    //                {
71
    //                    var instance = item as ArrowTextControl;
72
    //                    STemp.TransformPoint = "0|0";
73
    //                    STemp.PointSet = instance.PointSet;
74
    //                    STemp.SizeSet = String.Format("{0}", instance.LineSize);
75
    //                    STemp.StrokeColor = instance.StrokeColor.Color.ToString();
76
    //                    STemp.StartPoint = instance.StartPoint;
77
    //                    STemp.ArrowStyle = instance.ArrowTextStyle;
78
    //                    STemp.UserID = UserId;
79
    //                    STemp.ArrowText = instance.Base_TextBox.Text;
80
    //                    STemp.BorderSize = instance.BorderSize;
81
    //                    STemp.isHighLight = instance.isHighLight;
82
    //                    STemp.BoxHeight = instance.BoxHeight;
83
    //                    STemp.BoxWidth = instance.BoxWidth;
84
    //                    STemp.Opac = instance.Opacity;
85
    //                    STemp.EndPoint = instance.EndPoint;
86
    //                    STemp.isFixed = instance.isFixed;
87
    //                    //STemp.DashSize = instance.DashSize;
88
    //                    STemp.Name = instance.GetType().Name.ToString();
89
    //                    STemp.isTrans = instance.isTrans;
90
    //                    STemp.MidPoint = instance.MidPoint;
91
    //                    STemp.Angle = instance.Angle;
92
    //                    STemp.fontConfig = new List<string>()
93
    //                    {
94
    //                        instance.TextFamily.ToString(),
95
    //                        instance.TextStyle.ToString(),
96
    //                        instance.TextWeight.ToString(),
97
    //                        instance.TextSize.ToString(),
98
    //                    };
99
    //                    ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
100
    //                };
101
    //                break;
102
    //            #endregion
103
    //            #region Line
104
    //            case "LineControl":
105
    //                using (S_LineControl STemp = new S_LineControl())
106
    //                {
107
    //                    var instance = item as LineControl;
108
    //                    STemp.TransformPoint = "0|0";
109
    //                    STemp.PointSet = instance.PointSet;
110
    //                    STemp.SizeSet = String.Format("{0}", instance.LineSize);
111
    //                    STemp.LineStyleSet = instance.LineStyleSet;
112
    //                    STemp.StrokeColor = instance.StrokeColor.Color.ToString();
113
    //                    STemp.StartPoint = instance.StartPoint;
114
    //                    STemp.EndPoint = instance.EndPoint;
115
    //                    STemp.UserID = UserId;
116
    //                    STemp.Opac = instance.Opacity;
117
    //                    STemp.DashSize = instance.DashSize;
118
    //                    STemp.Interval = instance.Interval;
119
    //                    STemp.DimSize = instance.DimSize;
120
    //                    STemp.Name = instance.GetType().Name.ToString();
121
    //                    ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
122
    //                };
123
    //                break;
124
    //            #endregion
125
    //            #region Arc
126
    //            case "ArcControl":
127
    //                using (S_ArcControl STemp = new S_ArcControl())
128
    //                {
129
    //                    var instance = item as ArcControl;
130
    //                    STemp.TransformPoint = "0|0";
131
    //                    STemp.PointSet = instance.PointSet;
132
    //                    STemp.SizeSet = String.Format("{0}", instance.LineSize);
133
    //                    STemp.StrokeColor = instance.StrokeColor.Color.ToString();
134
    //                    STemp.StartPoint = instance.StartPoint;
135
    //                    STemp.UserID = UserId;
136
    //                    STemp.Opac = instance.Opacity;
137
    //                    STemp.MidPoint = instance.MidPoint;
138
    //                    STemp.EndPoint = instance.EndPoint;
139
    //                    STemp.IsTransOn = instance.isTransOn;
140
    //                    STemp.DashSize = instance.DashSize;
141
    //                    STemp.Clock = instance.Clock;
142
    //                    //STemp.ArcStyleSet = instance.ControlType;
143
    //                    STemp.Name = instance.GetType().Name.ToString();
144
    //                    ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
145
    //                };
146
    //                break;
147
    //            #endregion
148
    //            #region RectCloud
149
    //            case "RectCloudControl":
150
    //                {
151
    //                    using (S_RectCloudControl STemp = new S_RectCloudControl())
152
    //                    {
153
    //                        var instance = item as RectCloudControl;
154
    //                        STemp.TransformPoint = "0|0";
155
    //                        STemp.PointSet = instance.PointSet;
156
    //                        STemp.SizeSet = String.Format("{0}", instance.LineSize);
157
    //                        STemp.StrokeColor = instance.StrokeColor.Color.ToString();
158
    //                        STemp.StartPoint = instance.StartPoint;
159
    //                        STemp.UserID = UserId;
160
    //                        STemp.Opac = instance.Opacity;
161
    //                        STemp.TR = instance.TopRightPoint;
162
    //                        STemp.LB = instance.LeftBottomPoint;
163
    //                        STemp.EndPoint = instance.EndPoint;
164
    //                        STemp.PaintState = instance.Paint;
165
    //                        STemp.DashSize = instance.DashSize;
166
    //                        STemp.Name = instance.GetType().Name.ToString();
167
    //                        ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
168
    //                    }
169
    //                }
170
    //                break;
171
    //            #endregion
172
    //            #region Circle
173
    //            case "CircleControl":
174
    //                using (S_CircleControl STemp = new S_CircleControl())
175
    //                {
176
    //                    var instance = item as CircleControl;
177
    //                    STemp.TransformPoint = "0|0";
178
    //                    STemp.SizeSet = String.Format("{0}", instance.LineSize);
179
    //                    STemp.PaintState = instance.Paint;
180
    //                    STemp.StrokeColor = instance.StrokeColor.Color.ToString();
181
    //                    if (instance.FillColor != null)
182
    //                    {
183
    //                        STemp.FillColor = instance.FillColor.Color.ToString();
184
    //                    }
185
    //                    STemp.StartPoint = instance.StartPoint;
186
    //                    STemp.UserID = UserId;
187
    //                    STemp.EndPoint = instance.EndPoint;
188
    //                    STemp.TRP = instance.TopRightPoint;
189
    //                    STemp.LBP = instance.LeftBottomPoint;
190
    //                    STemp.Opac = instance.Opacity;
191
    //                    STemp.Angle = instance.Angle;
192
    //                    STemp.PointSet = instance.PointSet;
193
    //                    STemp.DashSize = instance.DashSize;
194
    //                    STemp.Name = instance.GetType().Name.ToString();
195
    //                    ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
196
    //                };
197
    //                break;
198
    //            #endregion
199
    //            #region Rectangle
200
    //            case "RectangleControl":
201
    //                using (S_RectControl STemp = new S_RectControl())
202
    //                {
203
    //                    var instance = item as RectangleControl;
204
    //                    STemp.TransformPoint = "0|0";
205
    //                    STemp.SizeSet = String.Format("{0}", instance.LineSize);
206
    //                    STemp.PaintState = instance.Paint;
207
    //                    STemp.PointSet = instance.PointSet;
208
    //                    STemp.StrokeColor = instance.StrokeColor.Color.ToString();
209
    //                    if (instance.FillColor != null)
210
    //                    {
211
    //                        STemp.FillColor = instance.FillColor.Color.ToString();
212
    //                    }
213
    //                    STemp.StartPoint = instance.StartPoint;
214
    //                    STemp.UserID = instance.Uid;
215
    //                    //STemp.Angle = instance.a;
216
    //                    STemp.EndPoint = instance.EndPoint;
217
    //                    STemp.LB = instance.LeftBottomPoint;
218
    //                    STemp.TR = instance.TopRightPoint;
219
    //                    //STemp.DashSize = instance.DashSize;
220
    //                    STemp.Opac = instance.Opacity;
221
    //                    STemp.Name = instance.GetType().Name.ToString();
222
    //                    ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
223
    //                };
224
    //                break;
225
    //            #endregion
226
    //            #region Triangle
227
    //            case "TriControl":
228
    //                using (S_TriControl STemp = new S_TriControl())
229
    //                {
230
    //                    var instance = item as TriControl;
231
    //                    STemp.TransformPoint = "0|0";
232
    //                    STemp.Paint = instance.Paint;
233
    //                    STemp.SizeSet = String.Format("{0}", instance.LineSize);
234
    //                    STemp.StrokeColor = instance.StrokeColor.Color.ToString();
235
    //                    if (instance.FillColor != null)
236
    //                    {
237
    //                        STemp.FillColor = instance.FillColor.Color.ToString();
238
    //                    }
239
    //                    STemp.StartPoint = instance.StartPoint;
240
    //                    STemp.EndPoint = instance.EndPoint;
241
    //                    STemp.MidPoint = instance.MidPoint;
242
    //                    STemp.Opac = instance.Opacity;
243
    //                    STemp.UserID = UserId;
244
    //                    STemp.PointSet = instance.PointSet;
245
    //                    STemp.Angle = instance.Angle;
246
    //                    STemp.DashSize = instance.DashSize;
247
    //                    STemp.Name = instance.GetType().Name.ToString();
248
    //                    ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
249
    //                }
250
    //                break;
251
    //            #endregion
252
    //            #region Poly
253
    //            case "PolygonControl":
254
    //                using (S_PolyControl STemp = new S_PolyControl())
255
    //                {
256
    //                    var instance = item as PolygonControl;
257

  
258
    //                    STemp.TransformPoint = "0|0";
259
    //                    STemp.SizeSet = String.Format("{0}", instance.LineSize);
260
    //                    //STemp.StrokeColor = instance.StrokeColor.Color.ToString();
261
    //                    STemp.Name = instance.GetType().Name.ToString();
262
    //                    //STemp.Toler = instance.Toler;
263
    //                    //STemp.PaintState = instance.Paint;
264
    //                    STemp.Opac = instance.Opacity;
265
    //                    STemp.UserID = UserId;
266
    //                    //STemp.IsTrans = instance.isTransOn;
267
    //                    //STemp.IsChain = instance.isChain;
268
    //                    STemp.PointSet = new List<Point>();
269
    //                    //STemp.DashSize = instance.DashSize;
270
    //                    STemp.IsCompleted = instance.IsCompleted;
271
    //                    foreach (var point in instance.PointSet)
272
    //                    {
273
    //                        STemp.PointSet.Add(point);
274
    //                    }
275
    //                    ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
276
    //                };
277
    //                break;
278
    //            #endregion
279
    //            #region Cloud
280
    //            case "CloudControl":
281
    //                using (S_CloudControl STemp = new S_CloudControl())
282
    //                {
283
    //                    var instance = item as CloudControl;
284

  
285
    //                    STemp.TransformPoint = "0|0";
286
    //                    STemp.SizeSet = String.Format("{0}", instance.LineSize);
287
    //                    STemp.StrokeColor = instance.StrokeColor.Color.ToString();
288
    //                    STemp.Name = instance.GetType().Name.ToString();
289
    //                    STemp.Toler = instance.Toler;
290
    //                    STemp.PaintState = instance.Paint;
291
    //                    STemp.Opac = instance.Opacity;
292
    //                    STemp.UserID = UserId;
293
    //                    STemp.IsTrans = instance.isTransOn;
294
    //                    STemp.IsChain = instance.isChain;
295
    //                    STemp.PointSet = new List<Point>();
296
    //                    STemp.DashSize = instance.DashSize;
297
    //                    foreach (var point in instance.PointSet)
298
    //                    {
299
    //                        STemp.PointSet.Add(point);
300
    //                    }
301

  
302
    //                    //STemp.CloudFill = instance.Fill;
303
    //                    STemp.ArcLength = instance.ArcLength;
304
    //                    ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
305
    //                }
306
    //                break;
307
    //            #endregion
308
    //            #region Sign
309
    //            case "SignControl":
310
    //                {
311
    //                    using (S_SignControl STemp = new S_SignControl())
312
    //                    {
313
    //                        //SignControl instance = item as SignControl;
314
    //                        //STemp.Angle = instance.Angle;
315
    //                        //STemp.EndPoint = instance.EndPoint;
316
    //                        //STemp.UserID = UserId;
317
    //                        //STemp.LB = instance.LeftBottomPoint;
318
    //                        //STemp.Name = instance.GetType().Name;
319
    //                        //STemp.PointSet = instance.PointSet;
320
    //                        //STemp.StartPoint = instance.StartPoint;
321
    //                        //STemp.Opac = instance.Opacity;
322
    //                        //STemp.TR = instance.TopRightPoint;
323
    //                        //STemp.UserNumber = instance.UserNumber;
324
    //                        //ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
325
    //                    }
326
    //                }
327
    //                break;
328
    //            #endregion
329
    //            #region Ink
330
    //            case "InkPresenter":
331
    //                {
332
    //                    var instance = item as InkPresenter;
333
    //                    if (instance.Strokes.Count >= 1)
334
    //                    {
335
    //                        using (S_PensilControl STemp = new S_PensilControl())
336
    //                        {
337
    //                            bool isRealData = true;
338
    //                            foreach (var strokeData in instance.Strokes)
339
    //                            {
340
    //                                if (strokeData.StylusPoints.Count == 0)
341
    //                                {
342
    //                                    isRealData = false;
343
    //                                }
344
    //                            }
345
    //                            if (isRealData)
346
    //                            {
347
    //                                if (instance.Tag != null)
348
    //                                {
349
    //                                    STemp.UserID = instance.Tag.ToString();
350
    //                                }
351
    //                                STemp.SCC = instance.Strokes;
352
    //                                STemp.Name = instance.GetType().Name;
353
    //                                STemp.Opac = instance.Opacity;
354
    //                                STemp.TransformPoint = "0|0";
355
    //                                ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
356
    //                            }
357
    //                        }
358
    //                    }
359
    //                }
360
    //                break;
361
    //            #endregion
362
    //            #region Text
363
    //            case "TextControl":
364
    //                using (S_TextControl STemp = new S_TextControl())
365
    //                {
366

  
367
    //                    var instance = item as TextControl;
368
    //                    STemp.TransformPoint = "0|0";
369
    //                    STemp.SizeSet = String.Format("{0}|{1}", instance.LineSize.Left.ToString(), instance.TextSize.ToString());
370
    //                    STemp.Text = instance.Text;
371
    //                    STemp.UserID = UserId;
372
    //                    STemp.FontColor = instance.FontColor.Color.ToString();
373
    //                    //STemp.EndPoint = instance.EndPoint;
374
    //                    STemp.StartPoint = new Point(instance.CanvasX, instance.CanvasY);
375
    //                    STemp.Opac = instance.Opacity;
376
    //                    //STemp.StartPoint = instance.StartPoint;
377
    //                    STemp.PointSet = instance.PointSet;
378
    //                    STemp.Angle = instance.Angle;
379
    //                    STemp.paintMethod = instance.ControlType_No;
380
    //                    STemp.BoxW = instance.BoxWidth;
381
    //                    STemp.BoxH = instance.BoxHeight;
382
    //                    STemp.isHighLight = instance.IsHighLight;
383
    //                    STemp.Name = instance.GetType().Name.ToString();
384
    //                    STemp.fontConfig = new List<string>()
385
    //                    {
386
    //                        instance.TextFamily.ToString(),
387
    //                        instance.TextStyle.ToString(),
388
    //                        instance.TextWeight.ToString(),
389
    //                    };
390

  
391

  
392

  
393
    //                    if (instance.UnderLine != null)
394
    //                    {
395
    //                        STemp.fontConfig.Add("true");
396
    //                    }
397

  
398
    //                    ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
399
    //                }
400
    //                break;
401
    //            #endregion
402
    //            #region Date
403
    //            case "DateControl":
404
    //                {
405
    //                    using (S_DateControl STemp = new S_DateControl())
406
    //                    {
407
    //                        DateControl instance = item as DateControl;
408
    //                        STemp.Angle = instance.Angle;
409
    //                        STemp.EndPoint = instance.EndPoint;
410
    //                        STemp.UserID = UserId;
411
    //                        STemp.LB = instance.LeftBottomPoint;
412
    //                        STemp.Name = instance.GetType().Name;
413
    //                        STemp.PointSet = instance.PointSet;
414
    //                        STemp.StartPoint = instance.StartPoint;
415
    //                        STemp.Opac = instance.Opacity;
416
    //                        STemp.TR = instance.TopRightPoint;
417
    //                        STemp.TransformPoint = "0|0";
418
    //                        STemp.FontColor = instance.FontColor.Color.ToString();
419
    //                        STemp.SizeSet = String.Format("{0}", instance.LineSize);
420
    //                        STemp.Text = instance.Text;
421
    //                        ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
422
    //                    }
423
    //                }
424
    //                break;
425
    //            #endregion
426
    //            #region Symbol
427
    //            case "SymControl":
428
    //                using (S_SymControl STemp = new S_SymControl())
429
    //                {
430
    //                    //var instance = item as SymControl;
431
    //                    //STemp.TransformPoint = "0|0";
432
    //                    //STemp.PointSet = instance.PointSet;
433
    //                    //STemp.UserID = UserId;
434
    //                    //STemp.SizeSet = String.Format("{0}", instance.LineSize.ToString());
435
    //                    //STemp.PaintState = instance.Paint;
436
    //                    //STemp.PathInfo = instance.PathData.ToString();
437
    //                    //STemp.StrokeColor = instance.StrokeColor.Color.ToString();
438
    //                    //STemp.StartPoint = instance.StartPoint;
439
    //                    //STemp.Angle = instance.Angle;
440
    //                    //STemp.EndPoint = instance.EndPoint;
441
    //                    //STemp.LB = instance.LeftBottomPoint;
442
    //                    //STemp.TR = instance.TopRightPoint;
443
    //                    //STemp.Opac = instance.Opacity;
444
    //                    //STemp.Name = instance.GetType().Name.ToString();
445
    //                    //ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
446
    //                }
447
    //                break;
448
    //            #endregion
449
    //            #region SymbolN
450
    //            case "SymControlN":
451
    //                using (S_SymControlN STemp = new S_SymControlN())
452
    //                {
453
    //                    //var instance = item as SymControlN;
454
    //                    //STemp.TransformPoint = "0|0";
455
    //                    //STemp.PointSet = instance.PointSet;
456
    //                    ////STemp.XamlData = instance.PathXathData;
457
    //                    //STemp.UserID = UserId;
458
    //                    //STemp.DBData = JsonSerializerHelper.CompressString(instance.PathXathData);
459
    //                    ////STemp.StrokeColor = instance.StrokeColor.Color.ToString();
460
    //                    //STemp.StartPoint = instance.StartPoint;
461
    //                    //STemp.Angle = instance.Angle;
462
    //                    //STemp.EndPoint = instance.EndPoint;
463
    //                    //STemp.LB = instance.LeftBottomPoint;
464
    //                    //STemp.TR = instance.TopRightPoint;
465
    //                    //STemp.Opac = instance.Opacity;
466
    //                    //STemp.Name = instance.GetType().Name.ToString();
467
    //                    //ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
468
    //                }
469
    //                break;
470
    //            #endregion
471
    //            #region Image
472
    //            case "ImgControl":
473
    //                using (S_ImgControl STemp = new S_ImgControl())
474
    //                {
475
    //                    ImgControl instance = item as ImgControl;
476
    //                    STemp.Angle = instance.Angle;
477
    //                    STemp.EndPoint = instance.EndPoint;
478
    //                    STemp.LB = instance.LeftBottomPoint;
479
    //                    STemp.Name = instance.GetType().Name;
480
    //                    STemp.PointSet = instance.PointSet;
481
    //                    STemp.StartPoint = instance.StartPoint;
482
    //                    STemp.UserID = UserId;
483
    //                    STemp.Opac = instance.Opacity;
484
    //                    STemp.TR = instance.TopRightPoint;
485
    //                    STemp.ImagePath = instance.FilePath;
486
    //                    ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
487
    //                }
488
    //                break;
489
    //            #endregion
490
    //            default:
491
    //                break;
492
    //        }
493
    //    }
494
    //    #endregion
495

  
496
    //    return ConvertData;
497
    //}
498

  
499 29
    public partial class LayerControl : Control
500 30
    {
501

  
502
        public MarkupReturn MarkupToString(CommentUserInfo Control, string UserId)
503
        {
504
            MarkupReturn Data = new MarkupReturn();
505
            Data.ConvertData = "";
506
            Data.DATA_TYPE = 0;
507
            Data.CommentID = Control.CommentID;
508
            if(Data.CommentID == null)
509
            {
510
                Data.CommentID = shortGuid();
511
            }
512

  
513
            String ConvertData = "";
514
            //int DATA_TYPE = 0;
515

  
516
            #region ######### 마크업 파싱##########
517

  
518
            switch (Control.GetType().Name.ToString())
519
            {
520
                #region Line
521
                #region Arrow_Multi
522
                case "ArrowControl_Multi":
523
                    using (S_ArrowControl_Multi STemp = new S_ArrowControl_Multi())
524
                    {
525
                        var instance = Control as ArrowControl_Multi;
526
                        STemp.TransformPoint = "0|0";
527
                        STemp.PointSet = instance.PointSet;
528
                        STemp.SizeSet = String.Format("{0}", instance.LineSize);
529
                        //STemp.StrokeColor = "#FF00FF00";
530
                        STemp.StrokeColor = instance.StrokeColor.Color.ToString();
531
                        STemp.StartPoint = instance.StartPoint;
532
                        STemp.EndPoint = instance.EndPoint;
533
                        STemp.UserID = UserId;
534
                        STemp.Opac = instance.Opacity;
535
                        STemp.DashSize = instance.DashSize;
536
                        STemp.MidPoint = instance.MiddlePoint;
537
                        STemp.Name = instance.GetType().Name.ToString();
538

  
539
                        ///강인구 추가(2017.11.02)
540
                        ///Memo 추가
541
                        STemp.Memo = instance.Memo;
542

  
543
                        ///강인구 추가(2017.11.02)
544
                        ///DATA_TYPE추가로 인한 클래스 변수 대입
545
                        //ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
546
                        Data.DATA_TYPE = (int)(instance.ControlType);
547
                        Data.ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
548
                    };
549
                    break;
550
                #endregion
551
                #region Line
552
                case "LineControl":
553
                    using (S_LineControl STemp = new S_LineControl())
554
                    {
555
                        var instance = Control as LineControl;
556

  
557
                        STemp.TransformPoint = "0|0";
558
                        STemp.PointSet = instance.PointSet;
559
                        STemp.SizeSet = String.Format("{0}", instance.LineSize);
560
                        STemp.LineStyleSet = instance.LineStyleSet;
561
                        //STemp.StrokeColor = "#FF00FF00";
562
                        STemp.StrokeColor = instance.StrokeColor.Color.ToString();
563
                        STemp.StartPoint = instance.StartPoint;
564
                        STemp.EndPoint = instance.EndPoint;
565
                        STemp.UserID = UserId;
566
                        STemp.Opac = instance.Opacity;
567
                        STemp.DashSize = instance.DashSize;
568
                        STemp.Interval = instance.Interval;
569
                        STemp.DimSize = instance.DimSize;
570
                        STemp.Name = instance.GetType().Name.ToString();
571

  
572
                        ///강인구 추가(2017.11.02)
573
                        ///Memo 추가
574
                        STemp.Memo = instance.Memo;
575

  
576
                        ///강인구 추가(2017.11.02)
577
                        ///DATA_TYPE추가로 인한 클래스 변수 대입
578
                        //ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
579
                        Data.DATA_TYPE = (int)(instance.ControlType);
580

  
581
                        Data.ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
582

  
583
                        //var item = JsonSerializerHelper.UnCompressString(Data.ConvertData); //언패킹작업
584
                        //using (S_LineControl s = JsonSerializerHelper.JsonDeserialize<S_LineControl>(item))
585
                        //{
586
                        //    LineControl ins = new LineControl()
587
                        //    {
588
                        //        Memo = s.Memo
589
                        //    };
590
                        //}
591

  
592
                    };
593
                    break;
594
                #endregion
595
                #region Arc
596
                case "ArcControl":
597
                    using (S_ArcControl STemp = new S_ArcControl())
598
                    {
599
                        var instance = Control as ArcControl;
600
                        STemp.TransformPoint = "0|0";
601
                        STemp.PointSet = instance.PointSet;
602
                        STemp.SizeSet = String.Format("{0}", instance.LineSize);
603
                        //STemp.StrokeColor = "#FF000FFF";
604
                        STemp.StrokeColor = instance.StrokeColor.Color.ToString();
605
                        STemp.StartPoint = instance.StartPoint;
606
                        STemp.UserID = UserId;
607
                        STemp.Opac = instance.Opacity;
608
                        STemp.MidPoint = instance.MidPoint;
609
                        STemp.EndPoint = instance.EndPoint;
610
                        STemp.IsTransOn = instance.isTransOn;
611
                        STemp.DashSize = instance.DashSize;
612
                        STemp.Clock = instance.Clock;
613
                        //STemp.ArcStyleSet = instance.ControlType;
614
                        STemp.Name = instance.GetType().Name.ToString();
615

  
616
                        ///강인구 추가(2017.11.02)
617
                        ///Memo 추가
618
                        STemp.Memo = instance.Memo;
619

  
620
                        ///강인구 추가(2017.11.02)
621
                        ///DATA_TYPE추가로 인한 클래스 변수 대입
622
                        //ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
623
                        Data.DATA_TYPE = (int)(instance.ControlType);
624
                        Data.ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
625

  
626
                    };
627
                    break;
628
                #endregion
629
                #region ArrowArc
630
                case "ArrowArcControl":
631
                    using (S_ArrowArcControl STemp = new S_ArrowArcControl())
632
                    {
633
                        var instance = Control as ArrowArcControl;
634
                        STemp.TransformPoint = "0|0";
635
                        STemp.PointSet = instance.PointSet;
636
                        STemp.SizeSet = String.Format("{0}", instance.LineSize);
637
                        //STemp.StrokeColor = "#FF000FFF";
638
                        STemp.StrokeColor = instance.StrokeColor.Color.ToString();
639
                        STemp.StartPoint = instance.StartPoint;
640
                        STemp.UserID = UserId;
641
                        STemp.Opac = instance.Opacity;
642
                        STemp.MidPoint = instance.MidPoint;
643
                        STemp.EndPoint = instance.EndPoint;
644
                        STemp.IsTransOn = instance.isTransOn;
645
                        STemp.DashSize = instance.DashSize;
646
                        STemp.Clock = instance.Clock;
647
                        //STemp.ArcStyleSet = instance.ControlType;
648
                        STemp.Name = instance.GetType().Name.ToString();
649

  
650
                        ///강인구 추가(2017.11.02)
651
                        ///Memo 추가
652
                        STemp.Memo = instance.Memo;
653

  
654
                        ///강인구 추가(2017.11.02)
655
                        ///DATA_TYPE추가로 인한 클래스 변수 대입
656
                        //ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
657
                        Data.DATA_TYPE = (int)(instance.ControlType);
658
                        Data.ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
659

  
660
                    };
661
                    break;
662
                #endregion
663
                #endregion
664
                #region Shape
665
                #region RectCloud
666
                case "RectCloudControl":
667
                    {
668
                        using (S_RectCloudControl STemp = new S_RectCloudControl())
669
                        {
670
                            var instance = Control as RectCloudControl;
671
                            STemp.TransformPoint = "0|0";
672
                            STemp.PointSet = instance.PointSet;
673
                            STemp.SizeSet = String.Format("{0}", instance.LineSize);
674
                            //STemp.StrokeColor = "#FF00FF00";
675
                            STemp.StrokeColor = instance.StrokeColor.Color.ToString();
676
                            STemp.StartPoint = instance.StartPoint;
677
                            STemp.UserID = UserId;
678
                            STemp.Opac = instance.Opacity;
679
                            STemp.TR = instance.TopRightPoint;
680
                            STemp.LB = instance.LeftBottomPoint;
681
                            STemp.EndPoint = instance.EndPoint;
682
                            STemp.PaintState = instance.Paint;
683
                            STemp.DashSize = instance.DashSize;
684
                            STemp.ArcLength = instance.ArcLength;
685
                            STemp.Name = instance.GetType().Name.ToString();
686
                            ///강인구 추가(2017.11.02)
687
                            ///Memo 추가
688
                            STemp.Memo = instance.Memo;
689

  
690
                            ///강인구 추가(2017.11.02)
691
                            ///DATA_TYPE추가로 인한 클래스 변수 대입
692
                            //ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
693
                            Data.DATA_TYPE = (int)(instance.ControlType);
694
                            Data.ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
695
                        }
696
                    }
697
                    break;
698
                #endregion
699
                #region Circle
700
                case "CircleControl":
701
                    using (S_CircleControl STemp = new S_CircleControl())
702
                    {
703
                        var instance = Control as CircleControl;
704
                        STemp.TransformPoint = "0|0";
705
                        STemp.SizeSet = String.Format("{0}", instance.LineSize);
706
                        STemp.PaintState = instance.Paint;
707
                        //STemp.StrokeColor = "#FF00FF00";
708
                        STemp.StrokeColor = instance.StrokeColor.Color.ToString();
709
                        if (instance.FillColor != null)
710
                        {
711
                            STemp.FillColor = instance.FillColor.Color.ToString();
712
                        }
713
                        STemp.StartPoint = instance.StartPoint;
714
                        STemp.UserID = UserId;
715
                        STemp.EndPoint = instance.EndPoint;
716
                        STemp.TRP = instance.TopRightPoint;
717
                        STemp.LBP = instance.LeftBottomPoint;
718
                        STemp.Opac = instance.Opacity;
719
                        STemp.Angle = instance.Angle;
720
                        STemp.PointSet = instance.PointSet;
721
                        STemp.DashSize = instance.DashSize;
722
                        STemp.Name = instance.GetType().Name.ToString();
723
                        ///강인구 추가(2017.11.02)
724
                        ///Memo 추가
725
                        STemp.Memo = instance.Memo;
726

  
727
                        ///강인구 추가(2017.11.02)
728
                        ///DATA_TYPE추가로 인한 클래스 변수 대입
729
                        //ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
730
                        Data.DATA_TYPE = (int)(instance.ControlType);
731
                        Data.ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
732
                    };
733
                    break;
734
                #endregion
735
                #region Rectangle
736
                case "RectangleControl":
737
                    using (S_RectControl STemp = new S_RectControl())
738
                    {
739
                        var instance = Control as RectangleControl;
740
                        STemp.TransformPoint = "0|0";
741
                        STemp.SizeSet = String.Format("{0}", instance.LineSize);
742
                        STemp.PaintState = instance.Paint;
743
                        STemp.PointSet = instance.PointSet;
744
                        //STemp.StrokeColor = "#FF00FF00";
745
                        STemp.StrokeColor = instance.StrokeColor.Color.ToString();
746
                        if (instance.FillColor != null)
747
                        {
748
                            STemp.FillColor = instance.FillColor.Color.ToString();
749
                        }
750
                        STemp.StartPoint = instance.StartPoint;
751
                        STemp.UserID = UserId;
752
                        //STemp.Angle = instance.a;
753
                        STemp.EndPoint = instance.EndPoint;
754
                        STemp.LB = instance.LeftBottomPoint;
755
                        STemp.TR = instance.TopRightPoint;
756
                        STemp.DashSize = instance.DashSize;
757
                        STemp.Opac = instance.Opacity;
758
                        STemp.Name = instance.GetType().Name.ToString();
759
                        ///강인구 추가(2017.11.02)
760
                        ///Memo 추가
761
                        STemp.Memo = instance.Memo;
762

  
763
                        ///강인구 추가(2017.11.02)
764
                        ///DATA_TYPE추가로 인한 클래스 변수 대입
765
                        //ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
766
                        Data.DATA_TYPE = (int)(instance.ControlType);
767
                        Data.ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
768
                    };
769
                    break;
770
                #endregion
771
                #region Triangle
772
                case "TriControl":
773
                    using (S_TriControl STemp = new S_TriControl())
774
                    {
775
                        var instance = Control as TriControl;
776
                        STemp.TransformPoint = "0|0";
777
                        STemp.Paint = instance.Paint;
778
                        STemp.SizeSet = String.Format("{0}", instance.LineSize);
779
                        //STemp.StrokeColor = "#FF00FF00";
780
                        STemp.StrokeColor = instance.StrokeColor.Color.ToString();
781
                        if (instance.FillColor != null)
782
                        {
783
                            STemp.FillColor = instance.FillColor.Color.ToString();
784
                        }
785
                        STemp.StartPoint = instance.StartPoint;
786
                        STemp.EndPoint = instance.EndPoint;
787
                        STemp.MidPoint = instance.MidPoint;
788
                        STemp.Opac = instance.Opacity;
789
                        STemp.UserID = UserId;
790
                        STemp.PointSet = instance.PointSet;
791
                        STemp.Angle = instance.Angle;
792
                        STemp.DashSize = instance.DashSize;
793
                        STemp.Name = instance.GetType().Name.ToString();
794
                        ///강인구 추가(2017.11.02)
795
                        ///Memo 추가
796
                        STemp.Memo = instance.Memo;
797

  
798
                        ///강인구 추가(2017.11.02)
799
                        ///DATA_TYPE추가로 인한 클래스 변수 대입
800
                        //ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
801
                        Data.DATA_TYPE = (int)(instance.ControlType);
802
                        Data.ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
803
                    }
804
                    break;
805
                #endregion
806
                #endregion
807

  
808
                #region Polygon
809
                #region Poly
810
                case "PolygonControl":
811
                    using (S_PolyControl STemp = new S_PolyControl())
812
                    {
813
                        var instance = Control as PolygonControl;
814

  
815
                        STemp.TransformPoint = "0|0";
816
                        STemp.SizeSet = String.Format("{0}", instance.LineSize);
817
                        STemp.StrokeColor = instance.StrokeColor.Color.ToString();
818
                        //STemp.StrokeColor = "#FF000FFF";
819
                        STemp.Name = instance.GetType().Name.ToString();
820
                        //STemp.Toler = instance.Toler;
821
                        STemp.PaintState = instance.Paint;
822
                        STemp.Opac = instance.Opacity;
823
                        STemp.UserID = UserId;
824
                        STemp.PaintState = instance.Paint;
825
                        //강인구 추가(Chain인지 Polygon인지 구분)
826
                        STemp.Type = instance.ControlType;
827
                        //STemp.IsTrans = instance.isTransOn;
828
                        //STemp.IsChain = instance.isChain;
829
                        STemp.PointSet = new List<Point>();
830
                        STemp.DashSize = instance.DashSize;
831
                        STemp.StartPoint = instance.StartPoint;
832
                        STemp.EndPoint = instance.EndPoint;
833
                        STemp.IsCompleted = instance.IsCompleted;
834
                        foreach (var point in instance.PointSet)
835
                        {
836
                            STemp.PointSet.Add(point);
837
                        }
838
                        ///강인구 추가(2017.11.02)
839
                        ///Memo 추가
840
                        STemp.Memo = instance.Memo;
841

  
842
                        ///강인구 추가(2017.11.02)
843
                        ///DATA_TYPE추가로 인한 클래스 변수 대입
844
                        //ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
845
                        Data.DATA_TYPE = (int)(instance.ControlType);
846
                        Data.ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
847
                    };
848
                    break;
849
                #endregion
850

  
851
                #region InkControl
852
                case "InkControl":
853
                    using (S_PolyControl STemp = new S_PolyControl())
854
                    {
855
                        var instance = Control as InkControl;
856

  
857
                        STemp.TransformPoint = "0|0";
858
                        STemp.SizeSet = String.Format("{0}", instance.LineSize);
859
                        STemp.StrokeColor = instance.StrokeColor.Color.ToString();
860
                        //STemp.StrokeColor = "#FF000FFF";
861
                        STemp.Name = instance.GetType().Name.ToString();
862
                        //STemp.Toler = instance.Toler;
863
                        STemp.PaintState = instance.Paint;
864
                        STemp.Opac = instance.Opacity;
865
                        STemp.UserID = UserId;
866
                        STemp.PaintState = instance.Paint;
867
                        //강인구 추가(Chain인지 Polygon인지 구분)
868
                        STemp.Type = instance.ControlType;
869
                        //STemp.IsTrans = instance.isTransOn;
870
                        //STemp.IsChain = instance.isChain;
871
                        STemp.PointSet = new List<Point>();
872
                        STemp.DashSize = instance.DashSize;
873
                        STemp.IsCompleted = instance.IsCompleted;
874
                        STemp.StartPoint = instance.StartPoint;
875
                        STemp.EndPoint = instance.EndPoint;
876
                        foreach (var point in instance.PointSet)
877
                        {
878
                            STemp.PointSet.Add(point);
879
                        }
880
                        ///강인구 추가(2017.11.02)
881
                        ///Memo 추가
882
                        STemp.Memo = instance.Memo;
883

  
884
                        ///강인구 추가(2017.11.02)
885
                        ///DATA_TYPE추가로 인한 클래스 변수 대입
886
                        //ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
887
                        Data.DATA_TYPE = (int)(instance.ControlType);
888
                        Data.ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
889
                    };
890
                    break;
891
                #endregion
892

  
893
                #region Cloud
894
                case "CloudControl":
895
                    using (S_CloudControl STemp = new S_CloudControl())
896
                    {
897
                        var instance = Control as CloudControl;
898

  
899
                        STemp.TransformPoint = "0|0";
900
                        STemp.SizeSet = String.Format("{0}", instance.LineSize);
901
                        //STemp.StrokeColor = "#FF000FFF";
902
                        STemp.StrokeColor = instance.StrokeColor.Color.ToString();
903
                        STemp.Name = instance.GetType().Name.ToString();
904
                        STemp.Toler = instance.Toler;
905
                        STemp.PaintState = instance.Paint;
906
                        STemp.Opac = instance.Opacity;
907
                        STemp.UserID = UserId;
908
                        STemp.IsTrans = instance.isTransOn;
909
                        STemp.IsChain = instance.isChain;
910
                        STemp.PointSet = new List<Point>();
911
                        STemp.DashSize = instance.DashSize;
912
                        STemp.StartPoint = instance.StartPoint;
913
                        STemp.EndPoint = instance.EndPoint;
914
                        STemp.ArcLength = instance.ArcLength;
915
                        foreach (var point in instance.PointSet)
916
                        {
917
                            STemp.PointSet.Add(point);
918
                        }
919

  
920
                        //STemp.CloudFill = instance.Fill;
921
                        STemp.ArcLength = instance.ArcLength;
922
                        ///강인구 추가(2017.11.02)
923
                        ///Memo 추가
924
                        STemp.Memo = instance.Memo;
925

  
926
                        ///강인구 추가(2017.11.02)
927
                        ///DATA_TYPE추가로 인한 클래스 변수 대입
928
                        //ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
929
                        Data.DATA_TYPE = (int)(instance.ControlType);
930
                        Data.ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
931
                    }
932
                    break;
933
                #endregion
934
                #endregion
935

  
936
                #region Text
937
                #region Text
938
                case "TextControl":
939
                    using (S_TextControl STemp = new S_TextControl())
940
                    {
941

  
942
                        var instance = Control as TextControl;
943
                        STemp.TransformPoint = "0|0";
944
                        STemp.SizeSet = String.Format("{0}|{1}", instance.LineSize.Left.ToString(), instance.TextSize.ToString());
945
                        STemp.Text = instance.Text;
946
                        STemp.UserID = UserId;
947
                        STemp.FontColor = instance.FontColor.Color.ToString();
948
                        //STemp.FontColor = "#FFFFFF00";
949

  
950
                        if(instance.StartPoint == new Point())
951
                            STemp.StartPoint = new Point(instance.CanvasX, instance.CanvasY);
952
                        else
953
                            STemp.StartPoint = instance.StartPoint;
954

  
955
                        STemp.EndPoint = instance.EndPoint;
956
                        STemp.Opac = instance.Opacity;
957
                        STemp.PointSet = instance.PointSet;
958
                        STemp.Angle = instance.Angle;
959
                        STemp.paintMethod = instance.ControlType_No;
960
                        STemp.BoxW = instance.BoxWidth;
961
                        STemp.BoxH = instance.BoxHeight;
962
                        STemp.isHighLight = instance.IsHighLight;
963
                        STemp.Name = instance.GetType().Name.ToString();
964
                        STemp.fontConfig = new List<string>()
965
                            {
966
                                instance.TextFamily.ToString(),
967
                                instance.TextStyle.ToString(),
968
                                instance.TextWeight.ToString(),
969
                            };
970

  
971

  
972

  
973
                        if (instance.UnderLine != null)
974
                        {
975
                            STemp.fontConfig.Add("true");
976
                        }
977

  
978
                        ///강인구 추가(2017.11.02)
979
                        ///Memo 추가
980
                        STemp.Memo = instance.Memo;
981

  
982
                        ///강인구 추가(2017.11.02)
983
                        ///DATA_TYPE추가로 인한 클래스 변수 대입
984
                        //ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
985
                        Data.DATA_TYPE = (int)(instance.ControlType);
986
                        Data.ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
987
                    }
988
                    break;
989
                #endregion
990
                #region ArrowText
991
                case "ArrowTextControl":
992
                    using (S_ArrowTextControl STemp = new S_ArrowTextControl())
993
                    {
994
                        var instance = Control as ArrowTextControl;
995

  
996
                        STemp.TransformPoint = "0|0";
997
                        STemp.PointSet = instance.PointSet;
998
                        STemp.SizeSet = String.Format("{0}", instance.LineSize);
999
                        STemp.StrokeColor = instance.StrokeColor.Color.ToString();
1000
                        STemp.StartPoint = instance.StartPoint;
1001
                        STemp.ArrowStyle = instance.ArrowTextStyle;
1002
                        //STemp.StrokeColor = "#FF00FF00";
1003
                        STemp.UserID = UserId;
1004
                        STemp.ArrowText = instance.Base_TextBox.Text;
1005
                        STemp.BorderSize = instance.BorderSize;
1006
                        STemp.isHighLight = instance.isHighLight;
1007
                        STemp.BoxHeight = instance.BoxHeight;
1008
                        STemp.BoxWidth = instance.BoxWidth;
1009
                        STemp.Opac = instance.Opacity;
1010
                        STemp.EndPoint = instance.EndPoint;
1011
                        STemp.isFixed = instance.isFixed;
1012
                        //STemp.DashSize = instance.DashSize;
1013
                        STemp.Name = instance.GetType().Name.ToString();
1014
                        STemp.isTrans = instance.isTrans;
1015
                        STemp.MidPoint = instance.MidPoint;
1016
                        STemp.Angle = instance.Angle;
1017
                        STemp.fontConfig = new List<string>()
1018
                            {
1019
                                instance.TextFamily.ToString(),
1020
                                instance.TextStyle.ToString(),
1021
                                instance.TextWeight.ToString(),
1022
                                instance.TextSize.ToString(),
1023
                            };
1024

  
1025
                        if (instance.UnderLine != null)
1026
                        {
1027
                            STemp.fontConfig.Add("true");
1028
                        }
1029

  
1030
                        ///강인구 추가(2017.11.02)
1031
                        ///Memo 추가
1032
                        STemp.Memo = instance.Memo;
1033
                        STemp.BorderSize = instance.BorderSize;
1034
                        ///강인구 추가(2017.11.02)
1035
                        ///DATA_TYPE추가로 인한 클래스 변수 대입
1036
                        //ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
1037
                        Data.DATA_TYPE = (int)(instance.ControlType);
1038
                        Data.ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
1039
                    };
1040
                    break;
1041
                #endregion
1042
                #endregion
1043

  
1044
                #region ETC
1045
                #region Sign
1046
                case "SignControl":
1047
                    {
1048
//강인구 추가
1049
                        using (S_SignControl STemp = new S_SignControl())
1050
                        {
1051
                            SignControl instance = Control as SignControl;
1052
                            STemp.Angle = instance.Angle;
1053
                            STemp.EndPoint = instance.EndPoint;
1054
                            STemp.UserID = UserId;
1055
                            STemp.LB = instance.LeftBottomPoint;
1056
                            STemp.Name = instance.GetType().Name;
1057
                            STemp.PointSet = instance.PointSet;
1058
                            STemp.StartPoint = instance.StartPoint;
1059
                            STemp.Opac = instance.Opacity;
1060
                            STemp.TR = instance.TopRightPoint;
1061
                            STemp.UserNumber = instance.UserNumber == null ? UserId : instance.UserNumber;
1062

  
1063
                            ///강인구 추가(2017.11.02)
1064
                            ///Memo 추가
1065
                            STemp.Memo = instance.Memo;
1066

  
1067
                            ///강인구 추가(2017.11.02)
1068
                            ///DATA_TYPE추가로 인한 클래스 변수 대입
1069
                            //ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
1070
                            Data.DATA_TYPE = (int)(instance.ControlType);
1071
                            Data.ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
1072
                        }
1073
                    }
1074
                    break;
1075
                #endregion
1076

  
1077

  
1078
                //변경 필요
1079
                #region Ink
1080
                case "InkPresenter":
1081
                    {
1082
                        //var instance = item as InkPresenter;
1083
                        //if (instance.Strokes.Count >= 1)
1084
                        //{
1085
                        //    using (S_PensilControl STemp = new S_PensilControl())
1086
                        //    {
1087
                        //        bool isRealData = true;
1088
                        //        foreach (var strokeData in instance.Strokes)
1089
                        //        {
1090
                        //            if (strokeData.StylusPoints.Count == 0)
1091
                        //            {
1092
                        //                isRealData = false;
1093
                        //            }
1094
                        //        }
1095
                        //        if (isRealData)
1096
                        //        {
1097
                        //            if (instance.Tag != null)
1098
                        //            {
1099
                        //                STemp.UserID = instance.Tag.ToString();
1100
                        //            }
1101
                        //            STemp.SCC = instance.Strokes;
1102
                        //            STemp.Name = instance.GetType().Name;
1103
                        //            STemp.Opac = instance.Opacity;
1104
                        //            STemp.TransformPoint = "0|0";
1105
                        //            ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
1106
                        //        }
1107
                        //    }
1108
                        //}
1109
                    }
1110
                    break;
1111
                #endregion
1112
                #region Date
1113
                case "DateControl":
1114
                    {
1115
                        using (S_DateControl STemp = new S_DateControl())
1116
                        {
1117
                            DateControl instance = Control as DateControl;
1118
                            STemp.Angle = instance.Angle;
1119
                            STemp.EndPoint = instance.EndPoint;
1120
                            STemp.UserID = UserId;
1121
                            STemp.LB = instance.LeftBottomPoint;
1122
                            STemp.Name = instance.GetType().Name;
1123
                            STemp.PointSet = instance.PointSet;
1124
                            STemp.StartPoint = instance.StartPoint;
1125
                            STemp.Opac = instance.Opacity;
1126
                            STemp.TR = instance.TopRightPoint;
1127
                            STemp.TransformPoint = "0|0";
1128
                            STemp.FontColor = instance.FontColor.Color.ToString();
1129
                            //STemp.FontColor = "#FFFFFF00";
1130
                            STemp.SizeSet = String.Format("{0}", instance.LineSize);
1131
                            STemp.Text = instance.Text;
1132
                            ///강인구 추가(2017.11.02)
1133
                            ///Memo 추가
1134
                            STemp.Memo = instance.Memo;
1135

  
1136
                            ///강인구 추가(2017.11.02)
1137
                            ///DATA_TYPE추가로 인한 클래스 변수 대입
1138
                            //ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
1139
                            Data.DATA_TYPE = (int)(instance.ControlType);
1140
                            Data.ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
1141
                        }
1142
                    }
1143
                    break;
1144
                #endregion
1145
                #region Symbol
1146
                case "SymControl":
1147
                    using (S_SymControl STemp = new S_SymControl())
1148
                    {
1149
                        var instance = Control as SymControl;
1150
                        STemp.TransformPoint = "0|0";
1151
                        STemp.PointSet = instance.PointSet;
1152
                        STemp.UserID = UserId;
1153
                        STemp.SizeSet = String.Format("{0}", instance.LineSize.ToString());
1154
                        STemp.PaintState = instance.Paint;
1155
                        STemp.PathInfo = instance.PathData.ToString();
1156
                        STemp.StrokeColor = instance.StrokeColor.Color.ToString();
1157
                        STemp.StartPoint = instance.StartPoint;
1158
                        STemp.Angle = instance.Angle;
1159
                        STemp.EndPoint = instance.EndPoint;
1160
                        STemp.LB = instance.LeftBottomPoint;
1161
                        STemp.TR = instance.TopRightPoint;
1162
                        STemp.Opac = instance.Opacity;
1163
                        STemp.Name = instance.GetType().Name.ToString();
1164

  
1165
                        ///강인구 추가(2017.11.02)
1166
                        ///DATA_TYPE추가로 인한 클래스 변수 대입
1167
                        //ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
1168
                        Data.DATA_TYPE = (int)(instance.ControlType);
1169
                        Data.ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
1170
                    }
1171
                    break;
1172
                #endregion
1173
                #region SymbolN
1174
                case "SymControlN":
1175
                    using (S_SymControlN STemp = new S_SymControlN())
1176
                    {
1177
                        var instance = Control as SymControlN;
1178
                        STemp.TransformPoint = "0|0";
1179
                        STemp.PointSet = instance.PointSet;
1180
                        //STemp.XamlData = instance.PathXathData;
1181
                        STemp.UserID = UserId;
1182
                        STemp.DBData = instance.PathXathData;
1183
                        //STemp.StrokeColor = instance.StrokeColor.Color.ToString();
1184
                        STemp.StartPoint = instance.StartPoint;
1185
                        STemp.Angle = instance.Angle;
1186
                        STemp.EndPoint = instance.EndPoint;
1187
                        STemp.LB = instance.LeftBottomPoint;
1188
                        STemp.TR = instance.TopRightPoint;
1189
                        STemp.Opac = instance.Opacity;
1190
                        STemp.Name = instance.GetType().Name.ToString();
1191

  
1192
                        ///강인구 추가(2017.11.02)
1193
                        ///DATA_TYPE추가로 인한 클래스 변수 대입
1194
                        //ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
1195
                        Data.DATA_TYPE = (int)(instance.ControlType);
1196
                        Data.ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
1197
                    }
1198
                    break;
1199
                #endregion
1200
                #region Image
1201
                case "ImgControl":
1202
                    using (S_ImgControl STemp = new S_ImgControl())
1203
                    {
1204
                        ImgControl instance = Control as ImgControl;
1205
                        STemp.Angle = instance.Angle;
1206
                        STemp.EndPoint = instance.EndPoint;
1207
                        STemp.LB = instance.LeftBottomPoint;
1208
                        STemp.Name = instance.GetType().Name;
1209
                        STemp.PointSet = instance.PointSet;
1210
                        STemp.StartPoint = instance.StartPoint;
1211
                        STemp.UserID = UserId;
1212
                        STemp.Opac = instance.Opacity;
1213
                        STemp.TR = instance.TopRightPoint;
1214
                        STemp.ImagePath = instance.FilePath;
1215
                        ///강인구 추가(2017.11.02)
1216
                        ///Memo 추가
1217
                        STemp.Memo = instance.Memo;
1218

  
1219
                        ///강인구 추가(2017.11.02)
1220
                        ///DATA_TYPE추가로 인한 클래스 변수 대입
1221
                        //ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
1222
                        Data.DATA_TYPE = (int)(instance.ControlType);
1223
                        Data.ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
1224
                    }
1225
                    break;
1226
                #endregion
1227
                #endregion
1228
                #region Cad
1229
                case "InsideWhiteControl":
1230
                    using (S_InsideWhiteControl STemp = new S_InsideWhiteControl())
1231
                    {
1232
                        var instance = Control as InsideWhiteControl;
1233
                        STemp.TransformPoint = "0|0";
1234
                        STemp.SizeSet = String.Format("{0}", instance.LineSize);
1235
                        STemp.PaintState = instance.Paint;
1236
                        STemp.PointSet = instance.PointSet;
1237
                        //STemp.StrokeColor = "#FF00FF00";
1238
                        STemp.StrokeColor = instance.StrokeColor.Color.ToString();
1239
                        if (instance.FillColor != null)
1240
                        {
1241
                            STemp.FillColor = instance.FillColor.Color.ToString();
1242
                        }
1243
                        STemp.StartPoint = instance.StartPoint;
1244
                        STemp.UserID = UserId;
1245
                        STemp.EndPoint = instance.EndPoint;
1246
                        STemp.LB = instance.LeftBottomPoint;
1247
                        STemp.TR = instance.TopRightPoint;
1248
                        STemp.DashSize = instance.DashSize;
1249
                        STemp.Opac = instance.Opacity;
1250
                        STemp.Name = instance.GetType().Name.ToString();
1251
                        STemp.Memo = instance.Memo;
1252
                        Data.DATA_TYPE = (int)(instance.ControlType);
1253
                        Data.ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
1254
                    };
1255
                    break;
1256
                case "OverlapWhiteControl":
1257
                    using (S_OverlapWhiteControl STemp = new S_OverlapWhiteControl())
1258
                    {
1259
                        var instance = Control as OverlapWhiteControl;
1260
                        STemp.TransformPoint = "0|0";
1261
                        STemp.SizeSet = String.Format("{0}", instance.LineSize);
1262
                        STemp.PaintState = instance.Paint;
1263
                        STemp.PointSet = instance.PointSet;
1264
                        //STemp.StrokeColor = "#FF00FF00";
1265
                        STemp.StrokeColor = instance.StrokeColor.Color.ToString();
1266
                        if (instance.FillColor != null)
1267
                        {
1268
                            STemp.FillColor = instance.FillColor.Color.ToString();
1269
                        }
1270
                        STemp.StartPoint = instance.StartPoint;
1271
                        STemp.UserID = UserId;
1272
                        STemp.EndPoint = instance.EndPoint;
1273
                        STemp.LB = instance.LeftBottomPoint;
1274
                        STemp.TR = instance.TopRightPoint;
1275
                        STemp.DashSize = instance.DashSize;
1276
                        STemp.Opac = instance.Opacity;
1277
                        STemp.Name = instance.GetType().Name.ToString();
1278
                        STemp.Memo = instance.Memo;
1279
                        Data.DATA_TYPE = (int)(instance.ControlType);
1280
                        Data.ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
1281
                    };
1282
                    break;
1283
                case "ClipWhiteControl":
1284
                    using (S_ClipWhiteControl STemp = new S_ClipWhiteControl())
1285
                    {
1286
                        var instance = Control as ClipWhiteControl;
1287
                        STemp.TransformPoint = "0|0";
1288
                        STemp.SizeSet = String.Format("{0}", instance.LineSize);
1289
                        STemp.PaintState = instance.Paint;
1290
                        STemp.PointSet = instance.PointSet;
1291
                        //STemp.StrokeColor = "#FF00FF00";
1292
                        STemp.StrokeColor = instance.StrokeColor.Color.ToString();
1293
                        if (instance.FillColor != null)
1294
                        {
1295
                            STemp.FillColor = instance.FillColor.Color.ToString();
1296
                        }
1297
                        STemp.StartPoint = instance.StartPoint;
1298
                        STemp.UserID = UserId;
1299
                        STemp.EndPoint = instance.EndPoint;
1300
                        STemp.LB = instance.LeftBottomPoint;
1301
                        STemp.TR = instance.TopRightPoint;
1302
                        STemp.DashSize = instance.DashSize;
1303
                        STemp.Opac = instance.Opacity;
1304
                        STemp.Name = instance.GetType().Name.ToString();
1305
                        STemp.Memo = instance.Memo;
1306
                        Data.DATA_TYPE = (int)(instance.ControlType);
1307
                        Data.ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
1308
                    };
1309
                    break;
1310
                case "CoordinateControl":
1311
                    using (S_CoordinateControl STemp = new S_CoordinateControl())
1312
                    {
1313
                        var instance = Control as CoordinateControl;
1314
                        STemp.TransformPoint = "0|0";
1315
                        STemp.SizeSet = String.Format("{0}", instance.LineSize);
1316
                        STemp.PaintState = instance.Paint;
1317
                        STemp.PointSet = instance.PointSet;
1318
                        //STemp.StrokeColor = "#FF00FF00";
1319
                        STemp.StrokeColor = instance.StrokeColor.Color.ToString();
1320
                        if (instance.FillColor != null)
1321
                        {
1322
                            STemp.FillColor = instance.FillColor.Color.ToString();
1323
                        }
1324
                        STemp.StartPoint = instance.StartPoint;
1325
                        STemp.UserID = UserId;
1326
                        STemp.EndPoint = instance.EndPoint;
1327
                        STemp.LB = instance.LeftBottomPoint;
1328
                        STemp.TR = instance.TopRightPoint;
1329
                        STemp.DashSize = instance.DashSize;
1330
                        STemp.Opac = instance.Opacity;
1331
                        STemp.Name = instance.GetType().Name.ToString();
1332
                        STemp.Memo = instance.Memo;
1333

  
1334
                        Data.DATA_TYPE = (int)(instance.ControlType);
1335
                        Data.ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
1336
                    };
1337
                    break;
1338
                #endregion
1339
                default:
1340
                    break;
1341
            }
1342

  
1343
            #endregion
1344

  
1345
            //return ConvertData;
1346
            return Data;
1347
        }
1348

  
1349
        public MarkupReturn MarkupToString(ObservableCollection<Control> baseLayer, string UserId)
1350
        {
1351
            MarkupReturn Data = new MarkupReturn();
1352
            Data.ConvertData = "";
1353
            Data.DATA_TYPE = 0;
1354

  
1355
            String ConvertData = "";
1356
            //int DATA_TYPE = 0;
1357

  
1358
            #region ######### 마크업 파싱##########
1359
            foreach (UIElement item in baseLayer)
1360
            {
1361
                switch (item.GetType().Name.ToString())
1362
                {
1363
                    #region Line
1364
                    #region Arrow_Multi
1365
                    case "ArrowControl_Multi":
1366
                        using (S_ArrowControl_Multi STemp = new S_ArrowControl_Multi())
1367
                        {
1368
                            var instance = item as ArrowControl_Multi;
1369
                            STemp.TransformPoint = "0|0";
1370
                            STemp.PointSet = instance.PointSet;
1371
                            STemp.SizeSet = String.Format("{0}", instance.LineSize);
1372
                            //STemp.StrokeColor = "#FF00FF00";
1373
                            STemp.StrokeColor = instance.StrokeColor.Color.ToString();
1374
                            STemp.StartPoint = instance.StartPoint;
1375
                            STemp.EndPoint = instance.EndPoint;
1376
                            STemp.UserID = UserId;
1377
                            STemp.Opac = instance.Opacity;
1378
                            STemp.DashSize = instance.DashSize;
1379
                            STemp.MidPoint = instance.MiddlePoint;
1380
                            STemp.Name = instance.GetType().Name.ToString();
1381
                            ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
1382
                        };
1383
                        break;
1384
                    #endregion
1385
                    #region Line
1386
                    case "LineControl":
1387
                        using (S_LineControl STemp = new S_LineControl())
1388
                        {
1389
                            var instance = item as LineControl;
1390

  
1391
                            //Data Type 테스트
1392
                            Data.DATA_TYPE = (int)(instance.ControlType);
1393

  
1394
                            STemp.TransformPoint = "0|0";
1395
                            STemp.PointSet = instance.PointSet;
1396
                            STemp.SizeSet = String.Format("{0}", instance.LineSize);
1397
                            STemp.LineStyleSet = instance.LineStyleSet;
1398
                            //STemp.StrokeColor = "#FF00FF00";
1399
                            STemp.StrokeColor = instance.StrokeColor.Color.ToString();
1400
                            STemp.StartPoint = instance.StartPoint;
1401
                            STemp.EndPoint = instance.EndPoint;
1402
                            STemp.UserID = UserId;
1403
                            STemp.Opac = instance.Opacity;
1404
                            STemp.DashSize = instance.DashSize;
1405
                            STemp.Interval = instance.Interval;
1406
                            STemp.DimSize = instance.DimSize;
1407
                            STemp.Name = instance.GetType().Name.ToString();
1408

  
1409
                            Data.ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
1410
                            //ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
1411
                        };
1412
                        break;
1413
                    #endregion
1414
                    #region Arc
1415
                    case "ArcControl":
1416
                        using (S_ArcControl STemp = new S_ArcControl())
1417
                        {
1418
                            var instance = item as ArcControl;
1419
                            STemp.TransformPoint = "0|0";
1420
                            STemp.PointSet = instance.PointSet;
1421
                            STemp.SizeSet = String.Format("{0}", instance.LineSize);
1422
                            //STemp.StrokeColor = "#FF000FFF";
1423
                            STemp.StrokeColor = instance.StrokeColor.Color.ToString();
1424
                            STemp.StartPoint = instance.StartPoint;
1425
                            STemp.UserID = UserId;
1426
                            STemp.Opac = instance.Opacity;
1427
                            STemp.MidPoint = instance.MidPoint;
1428
                            STemp.EndPoint = instance.EndPoint;
1429
                            STemp.IsTransOn = instance.isTransOn;
1430
                            STemp.DashSize = instance.DashSize;
1431
                            STemp.Clock = instance.Clock;
1432
                            //STemp.ArcStyleSet = instance.ControlType;
1433
                            STemp.Name = instance.GetType().Name.ToString();
1434
                            ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
1435
                        };
1436
                        break;
1437
                    #endregion
1438
                    #region ArrowArc
1439
                    case "ArrowArcControl":
1440
                        using (S_ArrowArcControl STemp = new S_ArrowArcControl())
1441
                        {
1442
                            var instance = item as ArrowArcControl;
1443
                            STemp.TransformPoint = "0|0";
1444
                            STemp.PointSet = instance.PointSet;
1445
                            STemp.SizeSet = String.Format("{0}", instance.LineSize);
1446
                            //STemp.StrokeColor = "#FF000FFF";
1447
                            STemp.StrokeColor = instance.StrokeColor.Color.ToString();
1448
                            STemp.StartPoint = instance.StartPoint;
1449
                            STemp.UserID = UserId;
1450
                            STemp.Opac = instance.Opacity;
1451
                            STemp.MidPoint = instance.MidPoint;
1452
                            STemp.EndPoint = instance.EndPoint;
1453
                            STemp.IsTransOn = instance.isTransOn;
1454
                            STemp.DashSize = instance.DashSize;
1455
                            STemp.Clock = instance.Clock;
1456
                            //STemp.ArcStyleSet = instance.ControlType;
1457
                            STemp.Name = instance.GetType().Name.ToString();
1458
                            ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
1459
                        };
1460
                        break;
1461
                    #endregion
1462
                    #endregion
1463
                    #region Shape
1464
                    #region RectCloud
1465
                    case "RectCloudControl":
1466
                        {
1467
                            using (S_RectCloudControl STemp = new S_RectCloudControl())
1468
                            {
1469
                                var instance = item as RectCloudControl;
1470
                                STemp.TransformPoint = "0|0";
1471
                                STemp.PointSet = instance.PointSet;
1472
                                STemp.SizeSet = String.Format("{0}", instance.LineSize);
1473
                                //STemp.StrokeColor = "#FF00FF00";
1474
                                STemp.StrokeColor = instance.StrokeColor.Color.ToString();
1475
                                STemp.StartPoint = instance.StartPoint;
1476
                                STemp.UserID = UserId;
1477
                                STemp.Opac = instance.Opacity;
1478
                                STemp.TR = instance.TopRightPoint;
1479
                                STemp.LB = instance.LeftBottomPoint;
1480
                                STemp.EndPoint = instance.EndPoint;
1481
                                STemp.PaintState = instance.Paint;
1482
                                STemp.DashSize = instance.DashSize;
1483
                                STemp.Name = instance.GetType().Name.ToString();
1484
                                STemp.ArcLength = instance.ArcLength;
1485
                                ConvertData += "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
1486
                            }
1487
                        }
1488
                        break;
1489
                    #endregion
1490
                    #region Circle
1491
                    case "CircleControl":
1492
                        using (S_CircleControl STemp = new S_CircleControl())
1493
                        {
1494
                            var instance = item as CircleControl;
1495
                            STemp.TransformPoint = "0|0";
1496
                            STemp.SizeSet = String.Format("{0}", instance.LineSize);
1497
                            STemp.PaintState = instance.Paint;
1498
                            //STemp.StrokeColor = "#FF00FF00";
1499
                            STemp.StrokeColor = instance.StrokeColor.Color.ToString();
1500
                            if (instance.FillColor != null)
1501
                            {
1502
                                STemp.FillColor = instance.FillColor.Color.ToString();
1503
                            }
1504
                            STemp.StartPoint = instance.StartPoint;
1505
                            STemp.UserID = UserId;
1506
                            STemp.EndPoint = instance.EndPoint;
1507
                            STemp.TRP = instance.TopRightPoint;
1508
                            STemp.LBP = instance.LeftBottomPoint;
1509
                            STemp.Opac = instance.Opacity;
1510
                            STemp.Angle = instance.Angle;
1511
                            STemp.PointSet = instance.PointSet;
1512
                            STemp.DashSize = instance.DashSize;
1513
                            STemp.Name = instance.GetType().Name.ToString();
... 이 차이점은 표시할 수 있는 최대 줄수를 초과해서 이 차이점은 잘렸습니다.

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)