프로젝트

일반

사용자정보

개정판 661b7416

ID661b7416598de29c8ba957a702c8b0b2135eda3f
상위 8c66babd
하위 5529d2a2

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

issue #999: Add FromString to all of controls

Change-Id: I64093e34a5f9e8d367cbed769ff4db8d7472cb7a

차이점 보기:

KCOM/Controls/AdornerFinal.xaml.cs
2196 2196
                    {
2197 2197
                        instance.isTransOn = true;
2198 2198
                    }
2199
                    instance.SetArcPath();
2199
                    ///instance.SetArcPath();
2200 2200
                    BorderUpdate();
2201 2201
                }
2202 2202
                else if ((MemberSet.First() as AdornerMember).DrawingData.GetType().Name == "ArrowArcControl")
KCOM/Services/BaseServices.cs
413 413
                    //});
414 414
                    item.MarkupList.Where(pageItem => pageItem.PageNumber == ViewerDataModel.Instance.PageNumber).ToList().ForEach(delegate (MarkupItem markupitem)
415 415
                    {
416
                        layerControl.markupParse(markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_Sync, item.DisplayColor, "", item.MarkupInfoID);
416
                        MarkupParser.ParseEx(App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_Sync, item.DisplayColor, "", item.MarkupInfoID);
417 417
                    });
418 418
                }
419 419
            }
......
495 495
                            {
496 496
                                foreach (var markup in instance)
497 497
                                {
498
                                    layerControl.markupParseEx(markup.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, item.DisplayColor, "", item.MarkupInfoID, markup.ID);
498
                                    MarkupParser.ParseEx(App.ViewInfo.ProjectNO, markup.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, item.DisplayColor, "", 
499
                                        item.MarkupInfoID, markup.ID);
499 500
                                }
500 501
                            }
501 502
                            else
......
877 878
            List<MarkupInfoItem> gridSelectionItem = gridViewMarkup.SelectedItems.Cast<MarkupInfoItem>().ToList(); //선택 된 마크업
878 879
            List<MarkupInfoItem> gridNonSelectionItem = gridItem.Except(gridSelectionItem).ToList(); //선택 되지 않은 마크업
879 880
                                                                                                     //MarkupToPDF.Controls.Parsing.LayerControl layerControl = new MarkupToPDF.Controls.Parsing.LayerControl();
880
            layerControl.ProjectNo = App.ViewInfo.ProjectNO;
881 881
            Common.ViewerDataModel.Instance.MarkupControls_USER.Clear();  //전체 제거
882 882
            Common.ViewerDataModel.Instance.MarkupControls.Clear();  //전체 제거
883 883
            //foreach (var item in gridSelectionItem)
......
918 918
                {
919 919
                    ViewerDataModel.Instance.MarkupList_USER.Where(data => data.PageNumber == pageNavigator.CurrentPage.PageNumber && data.MarkupInfoID == item.MarkupInfoID).ToList().ForEach(delegate (MarkupItemEx markupitem)
920 920
                    {
921
                        layerControl.markupParseEx(markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, item.DisplayColor, "", item.MarkupInfoID, markupitem.ID);
921
                        MarkupParser.ParseEx(App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, item.DisplayColor, "", 
922
                            item.MarkupInfoID, markupitem.ID);
922 923
                    });
923 924
                }
924 925
                else
925 926
                {
926 927
                    ViewerDataModel.Instance.MarkupList_Pre.Where(data => data.PageNumber == pageNavigator.CurrentPage.PageNumber && data.MarkupInfoID == item.MarkupInfoID).ToList().ForEach(delegate (MarkupItemEx markupitem)
927 928
                    {
928
                        layerControl.markupParse(markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls, item.DisplayColor, "", item.MarkupInfoID);
929
                        MarkupParser.ParseEx(App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls, item.DisplayColor, "", item.MarkupInfoID);
929 930
                    });
930 931
                }
931 932
            }
KCOM/Views/MainMenu.xaml.cs
900 900
                    ViewerDataModel.Instance.current_page_commentcnt = ViewerDataModel.Instance.MarkupList_USER.Where(data => data.PageNumber == pageNavigator.CurrentPage.PageNumber && data.MarkupInfoID == item.MarkupInfoID).ToList().Count;
901 901
                    ViewerDataModel.Instance.MarkupList_USER.Where(data => data.PageNumber == pageNavigator.CurrentPage.PageNumber && data.MarkupInfoID == item.MarkupInfoID).ToList().ForEach(delegate (MarkupItemEx markupitem)
902 902
                    {
903
                        layerControl.markupParseEx(markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, item.DisplayColor, "", item.MarkupInfoID, markupitem.ID);
903
                        MarkupParser.ParseEx(App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, item.DisplayColor, "", 
904
                            item.MarkupInfoID, markupitem.ID);
904 905
                    });
905 906

  
906 907
                }
......
908 909
                {
909 910
                    ViewerDataModel.Instance.MarkupList_Pre.Where(data => data.PageNumber == pageNavigator.CurrentPage.PageNumber && data.MarkupInfoID == item.MarkupInfoID).ToList().ForEach(delegate (MarkupItemEx markupitem)
910 911
                    {
911
                        layerControl.markupParse(markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls, item.DisplayColor, "", item.MarkupInfoID);
912
                        MarkupParser.ParseEx(App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls, item.DisplayColor, "", item.MarkupInfoID);
912 913
                    });
913 914
                }
914 915
            }
......
927 928
                {
928 929
                    item.MarkupList.Where(pageItem => pageItem.PageNumber == BalancePoint).ToList().ForEach(delegate (MarkupItem markupitem)
929 930
                    {
930
                        layerControl.markupParse(markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_Sync, item.DisplayColor, "", item.MarkupInfoID);
931
                        MarkupParser.ParseEx(App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_Sync, item.DisplayColor, "", item.MarkupInfoID);
931 932
                    });
932 933
                }
933

  
934 934
            }
935 935

  
936 936
            var instanceMain = this.ParentOfType<MainWindow>();
......
969 969
                        }
970 970

  
971 971
                        //Control                   
972
                        item = layerControl.TempMarkupParseEx(tempLoadData[k].ConvertData, Common.ViewerDataModel.Instance.MarkupControls_USER, "#FFFF0000", "", tempLoadData[k].MarkupInfoID, tempLoadData[k].CommentID);
972
                        item = MarkupParser.ParseEx(App.ViewInfo.ProjectNO, tempLoadData[k].ConvertData, Common.ViewerDataModel.Instance.MarkupControls_USER, "#FFFF0000", "", tempLoadData[k].MarkupInfoID, tempLoadData[k].CommentID);
973 973

  
974 974
                        UndoData = new Undo_data()
975 975
                        {
......
995 995
                        }
996 996

  
997 997
                        //Control                   
998
                        item = layerControl.TempMarkupParseEx(tempLoadData[k].ConvertData, Common.ViewerDataModel.Instance.MarkupControls_USER, "#FFFF0000", "", tempLoadData[k].MarkupInfoID, tempLoadData[k].CommentID);
998
                        item = MarkupParser.ParseEx(App.ViewInfo.ProjectNO, tempLoadData[k].ConvertData, Common.ViewerDataModel.Instance.MarkupControls_USER, "#FFFF0000", "", tempLoadData[k].MarkupInfoID, tempLoadData[k].CommentID);
999 999

  
1000 1000
                        UndoData = new Undo_data()
1001 1001
                        {
......
2121 2121
                                        ViewerDataModel.Instance.AngleValue = MathSet.returnAngleString(control.StartPoint, ref tempPoint, false);
2122 2122
                                    }
2123 2123

  
2124
                                    control.SetPolyPath();
2124
                                    ///control.SetPolyPath();
2125 2125

  
2126 2126
                                    control.DashSize = ViewerDataModel.Instance.DashSize;
2127 2127
                                }
......
2583 2583
                                    control.PointSet.RemoveAt(control.PointSet.Count - 1);
2584 2584
                                    control.PointSet.Add(currentCanvasDrawingMouseMovePoint);
2585 2585
                                    control.Paint = ViewerDataModel.Instance.paintSet;
2586
                                    control.SetPolyPath();
2586
                                    ///control.SetPolyPath();
2587 2587
                                    //강인구 추가
2588 2588
                                    control.DashSize = ViewerDataModel.Instance.DashSize;
2589 2589
                                    control.Paint = ViewerDataModel.Instance.paintSet;
......
2604 2604

  
2605 2605
                                    if (control.StartPoint != control.EndPoint && control.SignImage == null)
2606 2606
                                    {
2607
                                        GetUserSign getUser = new GetUserSign();
2608
                                        var _sign = getUser.GetSign(App.ViewInfo.UserID, App.ViewInfo.ProjectNO);
2607
                                        var _sign = GetUserSign.GetSign(App.ViewInfo.UserID, App.ViewInfo.ProjectNO);
2609 2608
                                        byte[] imageBytes = System.Convert.FromBase64String(_sign);
2610 2609
                                        System.IO.MemoryStream stream = new System.IO.MemoryStream();
2611 2610
                                        stream.Write(imageBytes, 0, imageBytes.Length);
......
5165 5164
                                    control.LineSize = ViewerDataModel.Instance.LineSize;
5166 5165
                                    control.PointSet.Add(firstPoint);
5167 5166

  
5168
                                    control.SetPolyPath();
5167
                                    ///control.SetPolyPath();
5169 5168

  
5170 5169
                                    control.ApplyOverViewData();
5171 5170

  
......
5206 5205
                            {
5207 5206
                                //if (IsDrawingEnable(canvasZoomPanningMouseDownPoint))
5208 5207
                                //{
5209
                                    GetUserSign getUser = new GetUserSign();
5210
                                    var _sign = getUser.GetSign(App.ViewInfo.UserID, App.ViewInfo.ProjectNO);
5208
                                    var _sign = GetUserSign.GetSign(App.ViewInfo.UserID, App.ViewInfo.ProjectNO);
5211 5209

  
5212 5210
                                    if (_sign == null)
5213 5211
                                    {
......
5891 5889
                    {
5892 5890
                        item.MarkupList.Where(pageItem => pageItem.PageNumber == ViewerDataModel.Instance.PageNumber).ToList().ForEach(delegate (MarkupItem markupitem)
5893 5891
                        {
5894
                            layerControl.markupParse(markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_Sync, item.DisplayColor, "", item.MarkupInfoID);
5892
                            MarkupParser.ParseEx(App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_Sync, item.DisplayColor, "", item.MarkupInfoID);
5895 5893
                        });
5896 5894
                    }
5897 5895

  
......
7035 7033
                    {
7036 7034
                        if (item.PageNumber == pageNavigator.CurrentPage.PageNumber)
7037 7035
                        {
7038
                            layerControl.markupParseEx(item.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, "#FFFF0000", "", items.MarkupInfoID, Save.shortGuid());
7036
                            MarkupParser.ParseEx(App.ViewInfo.ProjectNO, item.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, "#FFFF0000", "", 
7037
                                items.MarkupInfoID, Save.shortGuid());
7039 7038
                        }
7040 7039
                    }
7041 7040
                }
......
7107 7106
                        pc.CommentID = Save.shortGuid();
7108 7107
                        pc.StrokeColor = new SolidColorBrush(Colors.Red);
7109 7108
                        ViewerDataModel.Instance.MarkupControls_USER.Add(pc);
7110
                        pc.SetPolyPath();
7109
                        ///pc.SetPolyPath();
7111 7110

  
7112 7111
                        ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i =>
7113 7112
                        {
MarkupToPDF/App.Config
19 19
      </basicHttpBinding>
20 20
    </bindings>
21 21
    <client>
22
      <endpoint address="http://localhost:13009/ServiceDeepView.svc" binding="basicHttpBinding" bindingConfiguration="DeepViewPoint" contract="markus_api.ServiceDeepView" name="DeepViewPoint"/>
22
      <endpoint address="http://www.devdoftech.co.kr:5979/ServiceDeepView.svc" binding="basicHttpBinding" bindingConfiguration="DeepViewPoint" contract="markus_api.ServiceDeepView" name="DeepViewPoint"/>
23 23
    </client>
24 24
  </system.serviceModel>  
25 25
</configuration>
MarkupToPDF/Common/CommentUserInfo.cs
14 14

  
15 15
    public class CommentUserInfo : System.Windows.Controls.Control
16 16
    {
17
        public static readonly string[] delimiterChars = { "|DZ|" };
18
        public static readonly string[] delimiterChars2 = { "|" };
19
        public static readonly SolidColorBrush DefaultColor = new SolidColorBrush(MarkupToPDF.Controls.Common.ValueConverter.StringToColorConverter.Parse(""));
20

  
17 21
        public string Memo { get; set; }
18 22
        public string MarkupInfoID { get; set; }
19 23
        public bool IsMouseOver { get; set; }
MarkupToPDF/Common/GetUserSign.cs
11 11
{
12 12
    public class GetUserSign
13 13
    {
14
        public BasicHttpBinding _binding;
15
        public EndpointAddress _EndPoint;
16 14
        /// <summary>
17 15
        /// get signature of given user of given project
18 16
        /// </summary>
19 17
        /// <param name="UserID"></param>
20 18
        /// <param name="ProjectNo"></param>
21 19
        /// <returns></returns>
22
        public string GetSign(string UserID, string ProjectNo)
20
        public static string GetSign(string UserID, string ProjectNo)
23 21
        {
24
            
22
            BasicHttpBinding _binding;
23
            EndpointAddress _EndPoint;
24

  
25 25
            _binding = new BasicHttpBinding(BasicHttpSecurityMode.TransportCredentialOnly);
26 26
            _binding.MaxBufferSize = 2147483647;
27 27
            _binding.MaxReceivedMessageSize = 2147483647;
MarkupToPDF/Controls/Cad/ClipWhiteControlcs.cs
584 584
            };
585 585
        }
586 586

  
587
        /// <summary>
588
        /// create a ClipWhiteControl from given string
589
        /// </summary>
590
        /// <param name="str"></param>
591
        /// <returns></returns>
592
        public static ClipWhiteControl FromString(string str, SolidColorBrush brush, string sProjectNo)
593
        {
594
            using (S_ClipWhiteControl s = JsonSerializerHelper.JsonDeserialize<S_ClipWhiteControl>(str))
595
            {
596
                string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries);
597
                return new ClipWhiteControl
598
                {
599
                    LineSize = Convert.ToDouble(data2.First()),
600
                    Paint = s.PaintState,
601
                    StartPoint = s.StartPoint,
602
                    EndPoint = s.EndPoint,
603
                    Angle = s.Angle,
604
                    StrokeColor = Brushes.White,
605
                    DashSize = s.DashSize,
606
                    Opacity = s.Opac,
607
                    LeftBottomPoint = s.LB,
608
                    TopRightPoint = s.TR,
609
                    PointSet = s.PointSet,
610
                    UserID = s.UserID,
611
                    FillColor = Brushes.White,
612
                    Memo = s.Memo
613
                };
614
            }
615
        }
616

  
587 617
        public event PropertyChangedEventHandler PropertyChanged;
588 618

  
589 619
        public void Dispose()
MarkupToPDF/Controls/Cad/CoordinateControl.cs
583 583
            };
584 584
        }
585 585

  
586
        /// <summary>
587
        /// create a CoordinateControl from given string
588
        /// </summary>
589
        /// <param name="str"></param>
590
        /// <returns></returns>
591
        public static CoordinateControl FromString(string str, SolidColorBrush brush, string sProjectNo)
592
        {
593
            using (S_CoordinateControl s = JsonSerializerHelper.JsonDeserialize<S_CoordinateControl>(str))
594
            {
595
                string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries);
596
                return new CoordinateControl
597
                {
598
                    LineSize = Convert.ToDouble(data2.First()),
599
                    Paint = s.PaintState,
600
                    StartPoint = s.StartPoint,
601
                    EndPoint = s.EndPoint,
602
                    Angle = s.Angle,
603
                    StrokeColor = Brushes.Yellow,
604
                    DashSize = s.DashSize,
605
                    Opacity = s.Opac,
606
                    LeftBottomPoint = s.LB,
607
                    TopRightPoint = s.TR,
608
                    PointSet = s.PointSet,
609
                    UserID = s.UserID,
610
                    //  FillColor = Brushes.Yellow,
611
                    Memo = s.Memo
612
                };
613
            }
614
        }
615

  
586 616
        public event PropertyChangedEventHandler PropertyChanged;
587 617

  
588 618
        public void Dispose()
MarkupToPDF/Controls/Cad/InsideWhiteControlcs.cs
584 584
            };
585 585
        }
586 586

  
587
        /// <summary>
588
        /// create a InsideWhiteControl from given string
589
        /// </summary>
590
        /// <param name="str"></param>
591
        /// <returns></returns>
592
        public static InsideWhiteControl FromString(string str, SolidColorBrush brush, string sProjectNo)
593
        {
594
            using (S_InsideWhiteControl s = JsonSerializerHelper.JsonDeserialize<S_InsideWhiteControl>(str))
595
            {
596
                string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries);
597
                return new InsideWhiteControl
598
                {
599
                    LineSize = Convert.ToDouble(data2.First()),
600
                    Paint = s.PaintState,
601
                    StartPoint = s.StartPoint,
602
                    EndPoint = s.EndPoint,
603
                    Angle = s.Angle,
604
                    StrokeColor = Brushes.White,
605
                    DashSize = s.DashSize,
606
                    Opacity = s.Opac,
607
                    LeftBottomPoint = s.LB,
608
                    TopRightPoint = s.TR,
609
                    PointSet = s.PointSet,
610
                    UserID = s.UserID,
611
                    FillColor = Brushes.White,
612
                    Memo = s.Memo
613
                };
614
            }
615
        }
616

  
587 617
        public event PropertyChangedEventHandler PropertyChanged;
588 618

  
589 619
        public void Dispose()
MarkupToPDF/Controls/Cad/OverlapWhiteControlcs.cs
584 584
            };
585 585
        }
586 586

  
587
        /// <summary>
588
        /// create a OverlapWhiteControl from given string
589
        /// </summary>
590
        /// <param name="str"></param>
591
        /// <returns></returns>
592
        public static OverlapWhiteControl FromString(string str, SolidColorBrush brush, string sProjectNo)
593
        {
594
            using (S_OverlapWhiteControl s = JsonSerializerHelper.JsonDeserialize<S_OverlapWhiteControl>(str))
595
            {
596
                string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries);
597
                return new OverlapWhiteControl
598
                {
599
                    LineSize = Convert.ToDouble(data2.First()),
600
                    Paint = s.PaintState,
601
                    StartPoint = s.StartPoint,
602
                    EndPoint = s.EndPoint,
603
                    Angle = s.Angle,
604
                    StrokeColor = Brushes.White,
605
                    DashSize = s.DashSize,
606
                    Opacity = s.Opac,
607
                    LeftBottomPoint = s.LB,
608
                    TopRightPoint = s.TR,
609
                    PointSet = s.PointSet,
610
                    UserID = s.UserID,
611
                    FillColor = Brushes.White,
612
                    Memo = s.Memo
613
                };
614
            }
615
        }
616

  
587 617
        public event PropertyChangedEventHandler PropertyChanged;
588 618

  
589 619
        public void Dispose()
MarkupToPDF/Controls/Etc/DateControl.cs
14 14
using MarkupToPDF.Common;
15 15
using MarkupToPDF.Serialize.Core;
16 16
using MarkupToPDF.Serialize.S_Control;
17
using System.Linq;
17 18

  
18 19
namespace MarkupToPDF.Controls.Etc
19 20
{
......
361 362
            Base_TextBox.Visibility = System.Windows.Visibility.Hidden;
362 363
            SetDate();
363 364
        }
364
        public void SetDate()
365

  
366
        private void SetDate()
365 367
        {
366 368
            if (Text == null)
367 369
            {
......
486 488
                return "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
487 489
            }
488 490
        }
491

  
492
        /// <summary>
493
        /// create a datecontrol from given string
494
        /// </summary>
495
        /// <param name="str"></param>
496
        /// <returns></returns>
497
        public static DateControl FromString(string str, SolidColorBrush brush, string sProjectNo)
498
        {
499
            using (S_DateControl s = JsonSerializerHelper.JsonDeserialize<S_DateControl>(str))
500
            {
501
                string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries);
502
                return new DateControl
503
                {
504
                    Angle = s.Angle,
505
                    StartPoint = s.StartPoint,
506
                    EndPoint = s.EndPoint,
507
                    LeftBottomPoint = s.LB,
508
                    TopRightPoint = s.TR,
509
                    Opacity = s.Opac,
510
                    FontColor = brush,
511
                    LineSize = Convert.ToDouble(data2.First()),
512
                    Text = s.Text,
513
                    PointSet = s.PointSet,
514
                    UserID = s.UserID,
515
                    Memo = s.Memo
516
                };
517
            }
518
        }
489 519
    }
490 520
}
MarkupToPDF/Controls/Etc/ImgControl.cs
15 15
using MarkupToPDF.Common;
16 16
using MarkupToPDF.Serialize.Core;
17 17
using MarkupToPDF.Serialize.S_Control;
18
using System.Windows.Media.Imaging;
19
using Svg2Xaml;
18 20

  
19 21
namespace MarkupToPDF.Controls.Etc
20 22
{
......
284 286
            Base_Image.Height = 0;
285 287
            SetImage();
286 288
        }
289

  
287 290
        public void SetImage()
288 291
        {
289 292
            this.ApplyTemplate();
......
368 371
                return "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
369 372
            }
370 373
        }
374

  
375
        /// <summary>
376
        /// create a imgcontrol from given string
377
        /// </summary>
378
        /// <param name="str"></param>
379
        /// <returns></returns>
380
        public static ImgControl FromString(string str, SolidColorBrush brush, string sProjectNo)
381
        {
382
            ImgControl instance = null;
383
            using (S_ImgControl s = JsonSerializerHelper.JsonDeserialize<S_ImgControl>(str))
384
            {
385
                Image img = new Image();
386
                if (s.ImagePath.Contains(".svg"))
387
                {
388
                    byte[] imageData = null;
389
                    DrawingImage image = null;
390
                    using (System.Net.WebClient web = new System.Net.WebClient())
391
                    {
392
                        imageData = web.DownloadData(new Uri(s.ImagePath));
393
                        System.IO.Stream stream = new System.IO.MemoryStream(imageData);
394
                        image = SvgReader.Load(stream);
395
                    }
396
                    img.Source = image;
397
                }
398
                else
399
                {
400
                    img.Source = new BitmapImage(new Uri(s.ImagePath));
401
                }
402

  
403
                instance = new ImgControl
404
                {
405
                    Angle = s.Angle,
406
                    StartPoint = s.StartPoint,
407
                    TopRightPoint = s.TR,
408
                    EndPoint = s.EndPoint,
409
                    LeftBottomPoint = s.LB,
410
                    PointSet = s.PointSet,
411
                    Opacity = s.Opac,
412
                    FilePath = s.ImagePath,
413
                    UserID = s.UserID,
414
                    ImageData = img.Source,
415
                    Memo = s.Memo 
416
                };
417

  
418
                instance.ImageData = img.Source;
419
            }
420

  
421
            return instance;
422
        }
371 423
    }
372 424
}
MarkupToPDF/Controls/Etc/SignControl.cs
15 15
using MarkupToPDF.Common;
16 16
using MarkupToPDF.Serialize.Core;
17 17
using MarkupToPDF.Serialize.S_Control;
18
using System.Windows.Media.Imaging;
18 19

  
19 20
//강인구 추가
20 21
namespace MarkupToPDF.Controls.Etc
......
234 235
            Base_Image = GetTemplateChild(PART_Image) as Image;
235 236
            SetImage();
236 237
        }
237
        public void SetImage()
238

  
239
        private void SetImage()
238 240
        {
239 241
            this.ApplyTemplate();
240 242

  
......
320 322
            }
321 323
        }
322 324

  
323
public double LineSize
325
        /// <summary>
326
        /// create a signcontrol from given string
327
        /// </summary>
328
        /// <param name="str"></param>
329
        /// <returns></returns>
330
        public static SignControl FromString(string str, SolidColorBrush brush, string sProjectNo)
331
        {
332
            SignControl instance = null;
333
            using (S_SignControl s = JsonSerializerHelper.JsonDeserialize<S_SignControl>(str))
334
            {
335
                instance = new SignControl
336
                {
337
                    Angle = s.Angle,
338
                    StartPoint = s.StartPoint,
339
                    TopRightPoint = s.TR,
340
                    EndPoint = s.EndPoint,
341
                    LeftBottomPoint = s.LB,
342
                    PointSet = s.PointSet,
343
                    Opacity = s.Opac,
344
                    SignImage = null,
345
                    UserID = s.UserID,
346
                    Memo = s.Memo
347
                };
348

  
349
                if (s.UserNumber != null)
350
                {
351
                    var _sign = GetUserSign.GetSign(s.UserNumber, sProjectNo);
352
                    if (_sign != null)
353
                    {
354
                        byte[] imageBytes = System.Convert.FromBase64String(_sign);
355

  
356
                        System.IO.MemoryStream stream = new System.IO.MemoryStream();
357
                        stream.Write(imageBytes, 0, imageBytes.Length);
358
                        stream.Position = 0;
359
                        System.Drawing.Image img = System.Drawing.Image.FromStream(stream);
360
                        BitmapImage returnImage = new BitmapImage();
361
                        returnImage.BeginInit();
362
                        System.IO.MemoryStream ms = new System.IO.MemoryStream();
363
                        img.Save(ms, System.Drawing.Imaging.ImageFormat.Png);
364
                        ms.Seek(0, System.IO.SeekOrigin.Begin);
365
                        returnImage.StreamSource = ms;
366
                        returnImage.EndInit();
367
                        stream.Close();
368
                        instance.SignImage = returnImage;
369
                    }
370
                }
371
            }
372

  
373
            return instance;
374
        }
375

  
376
        public double LineSize
324 377
        {
325 378
            get;
326 379
            set;
MarkupToPDF/Controls/Etc/SymControl.cs
14 14
using MarkupToPDF.Common;
15 15
using MarkupToPDF.Serialize.Core;
16 16
using MarkupToPDF.Serialize.S_Control;
17
using System.Linq;
17 18

  
18 19
namespace MarkupToPDF.Controls.Etc
19 20
{
......
297 298
            Base_SymPath = GetTemplateChild(PART_SymPath) as Path;
298 299
            SetSymPath();
299 300
        }
300
        public void SetSymPath()
301

  
302
        private void SetSymPath()
301 303
        {
302 304
            this.ApplyTemplate();
303 305
            switch (this.Paint)
......
396 398
                return "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
397 399
            }
398 400
        }
401

  
402
        /// <summary>
403
        /// create a symcontrol from given string
404
        /// </summary>
405
        /// <param name="str"></param>
406
        /// <returns></returns>
407
        public static SymControl FromString(string str, SolidColorBrush brush, string sProjectNo)
408
        {
409
            SymControl instance = null;
410
            using (S_SymControl s = JsonSerializerHelper.JsonDeserialize<S_SymControl>(str))
411
            {
412
                string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries);
413
                Common.StringToPathConverter sm = new Common.StringToPathConverter();
414
                instance = new SymControl
415
                {
416
                    LineSize = Convert.ToDouble(data2.First()),
417
                    PointSet = s.PointSet,
418
                    Paint = s.PaintState,
419
                    StartPoint = s.StartPoint,
420
                    StrokeColor = brush,
421
                    EndPoint = s.EndPoint,
422
                    Angle = s.Angle,
423
                    UserID = s.UserID,
424
                    LeftBottomPoint = s.LB,
425
                    TopRightPoint = s.TR,
426
                    PathData = sm.Convert(s.PathInfo.ToString()),
427
                    Opacity = s.Opac,
428
                    Memo = s.Memo
429
                };
430
            }
431

  
432
            return instance;
433
        }
399 434
    }
400 435
}
MarkupToPDF/Controls/Etc/SymControlN.cs
362 362
                return "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
363 363
            }
364 364
        }
365

  
366
        /// <summary>
367
        /// create a symcontroln from given string
368
        /// </summary>
369
        /// <param name="str"></param>
370
        /// <returns></returns>
371
        public static SymControlN FromString(string str, SolidColorBrush brush, string sProjectNo)
372
        {
373
            using (S_SymControlN s = JsonSerializerHelper.JsonDeserialize<S_SymControlN>(str))
374
            {
375
                return new SymControlN()
376
                {
377
                    PointSet = s.PointSet,
378
                    StartPoint = s.StartPoint,
379
                    EndPoint = s.EndPoint,
380
                    Angle = s.Angle,
381
                    LeftBottomPoint = s.LB,
382
                    TopRightPoint = s.TR,
383
                    Opacity = s.Opac,
384
                    PathXathData = s.DBData,
385
                    Memo = s.Memo
386
                };
387
            }
388
        }
365 389
    }
366 390
}
367 391

  
MarkupToPDF/Controls/Line/ArcControl.cs
14 14
using MarkupToPDF.Common;
15 15
using MarkupToPDF.Serialize.S_Control;
16 16
using MarkupToPDF.Serialize.Core;
17
using System.Linq;
17 18

  
18 19
namespace MarkupToPDF.Controls.Line
19 20
{
......
392 393
        //        this.Clock =SweepDirection.Clockwise;
393 394
        //    }
394 395
        //}
395
        public void SetArcPath()
396
        private void SetArcPath()
396 397
        {
397 398
            this.ApplyTemplate();
398 399

  
......
553 554
                return "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
554 555
            }
555 556
        }
557

  
558
        /// <summary>
559
        /// create a arccontrol from given string
560
        /// </summary>
561
        /// <param name="str"></param>
562
        /// <returns></returns>
563
        public static ArcControl FromString(string str, SolidColorBrush brush, string sProjectNo)
564
        {
565
            ArcControl instance = null;
566
            using (S_ArcControl s = JsonSerializerHelper.JsonDeserialize<S_ArcControl>(str))
567
            {
568
                string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries);
569
                instance = new ArcControl()
570
                {
571
                    StartPoint = s.StartPoint,
572
                    EndPoint = s.EndPoint,
573
                    DashSize = s.DashSize,
574
                    PointSet = s.PointSet,
575
                    isTransOn = s.IsTransOn,
576
                    MidPoint = s.MidPoint,
577
                    StrokeColor = brush,
578
                    Opacity = s.Opac,
579
                    Clock = s.Clock,
580
                    LineSize = Convert.ToDouble(data2.First()),
581
                    UserID = s.UserID,
582
                    Memo = s.Memo
583
                };
584
            }
585

  
586
            return instance;
587
        }
556 588
    }
557 589
}
MarkupToPDF/Controls/Line/ArrowArcControl.cs
14 14
using MarkupToPDF.Common;
15 15
using MarkupToPDF.Serialize.Core;
16 16
using MarkupToPDF.Serialize.S_Control;
17
using System.Linq;
17 18

  
18 19
namespace MarkupToPDF.Controls.Line
19 20
{
......
498 499
                return "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
499 500
            }
500 501
        }
502

  
503
        /// <summary>
504
        /// create a arrowarccontrol from given string
505
        /// </summary>
506
        /// <param name="str"></param>
507
        /// <returns></returns>
508
        public static ArrowArcControl FromString(string str, SolidColorBrush brush, string sProjectNo)
509
        {
510
            ArrowArcControl instance = null;
511
            using (S_ArrowArcControl s = JsonSerializerHelper.JsonDeserialize<S_ArrowArcControl>(str))
512
            {
513
                string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries);
514
                instance = new ArrowArcControl()
515
                {
516
                    StartPoint = s.StartPoint,
517
                    EndPoint = s.EndPoint,
518
                    DashSize = s.DashSize,
519
                    PointSet = s.PointSet,
520
                    isTransOn = s.IsTransOn,
521
                    MidPoint = s.MidPoint,
522
                    StrokeColor = brush,
523
                    Opacity = s.Opac,
524

  
525
                    Clock = s.Clock,
526
                    LineSize = Convert.ToDouble(data2.First()),
527
                    UserID = s.UserID,
528
                    Memo = s.Memo
529
                };
530
            }
531

  
532
            return instance;
533
        }
501 534
    }
502 535
}
MarkupToPDF/Controls/Line/ArrowControl_Multi.cs
14 14
using MarkupToPDF.Common;
15 15
using MarkupToPDF.Serialize.S_Control;
16 16
using MarkupToPDF.Serialize.Core;
17
using System.Linq;
17 18

  
18 19
namespace MarkupToPDF.Controls.Line
19 20
{
......
337 338
            };
338 339
        }
339 340

  
341
        /// <summary>
342
        /// create a arrowcontrol_multi from given string
343
        /// </summary>
344
        /// <param name="str"></param>
345
        /// <returns></returns>
346
        public static ArrowControl_Multi FromString(string str, SolidColorBrush brush, string sProjectNo)
347
        {
348
            ArrowControl_Multi instance = null;
349
            using (S_ArrowControl_Multi s = JsonSerializerHelper.JsonDeserialize<S_ArrowControl_Multi>(str))
350
            {
351
                string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries);
352
                instance = new ArrowControl_Multi
353
                {
354
                    LineSize = Convert.ToDouble(data2.First()),
355
                    StartPoint = s.StartPoint,
356
                    MiddlePoint = s.MidPoint,
357
                    DashSize = s.DashSize,
358
                    EndPoint = s.EndPoint,
359
                    PointSet = s.PointSet,
360
                    Opacity = s.Opac,
361
                    StrokeColor = brush,
362
                    UserID = s.UserID,
363
                    Memo = s.Memo
364
                };
365
            }
366

  
367
            return instance;
368
        }
369

  
340 370
        public void Dispose()
341 371
        {
342 372
            GC.Collect();
MarkupToPDF/Controls/Line/LineControl.cs
14 14
using MarkupToPDF.Common;
15 15
using MarkupToPDF.Serialize.S_Control;
16 16
using MarkupToPDF.Serialize.Core;
17
using System.Linq;
17 18

  
18 19
namespace MarkupToPDF.Controls.Line
19 20
{
......
355 356
            Base_LinePath = GetTemplateChild("PART_LinePath") as Path;
356 357
            SetLinePath();
357 358
        }
359

  
358 360
        public void updateControl()
359 361
        {
360 362
            this.StartPoint = new Point(this.PointSet[0].X, this.PointSet[0].Y);
......
402 404
            this.OverViewPathData = this.PathData;
403 405
        }
404 406

  
405
        public void SetLinePath()
407
        private void SetLinePath()
406 408
        {
407 409
            this.ApplyTemplate();           
408 410
            if (this.DashSize != null)
......
515 517
                return "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
516 518
            }
517 519
        }
520

  
521
        /// <summary>
522
        /// create a linecontrol from given string
523
        /// </summary>
524
        /// <param name="str"></param>
525
        /// <returns></returns>
526
        public static LineControl FromString(string str, SolidColorBrush brush, string sProjectNo)
527
        {
528
            LineControl instance = null;
529
            using (S_LineControl s = JsonSerializerHelper.JsonDeserialize<S_LineControl>(str))
530
            {
531
                string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries);
532
                instance = new LineControl()
533
                {
534
                    LineStyleSet = s.LineStyleSet,
535
                    StartPoint = s.StartPoint,
536
                    DimSize = s.DimSize,
537
                    EndPoint = s.EndPoint,
538
                    DashSize = s.DashSize,
539
                    Interval = s.Interval,
540
                    PointSet = s.PointSet,
541
                    Opacity = s.Opac,
542
                    StrokeColor = brush,
543
                    UserID = s.UserID,
544
                    LineSize = Convert.ToDouble(data2.First()),
545
                };
546
            }
547

  
548
            return instance;
549
        }
518 550
    }
519 551
}
MarkupToPDF/Controls/Parsing/MarkupCopy.cs
1
using System;
2
using System.Net;
3
using System.Windows;
4
using System.Windows.Controls;
5
using System.Windows.Documents;
6
using System.Windows.Ink;
7
using System.Windows.Input;
8
using System.Windows.Media;
9
using System.Windows.Media.Animation;
10
using System.Windows.Shapes;
11
using MarkupToPDF.Controls;
12
using MarkupToPDF.Controls.Line;
13
using MarkupToPDF.Controls.Shape;
14
using MarkupToPDF.Controls.Polygon;
15
using MarkupToPDF.Controls.Text;
16
using MarkupToPDF.Controls.Etc;
17
using MarkupToPDF.Controls.Common.ValueConverter;
18
using MarkupToPDF.Serialize.S_Control;
19
using MarkupToPDF.Serialize.Core;
20
using System.Collections.Generic;
21
using System.Collections.ObjectModel;
22
using System.Text;
23
using MarkupToPDF.Controls.Common;
24
using MarkupToPDF.Common;
25
using MarkupToPDF.Controls.Cad;
26

  
27
namespace MarkupToPDF.Controls.Parsing
28
{
29
    public partial class LayerControl : Control
30
    {
31
        //GUID생성
32
        //안쓰는 내용
33
        public Guid GetUniqueGuid()
34
        {
35
            char[] chars = "ABCDEF1234567890".ToCharArray();
36
            byte[] data = new byte[1];
37
            System.Security.Cryptography.RNGCryptoServiceProvider crypto = new System.Security.Cryptography.RNGCryptoServiceProvider();
38
            crypto.GetNonZeroBytes(data);
39
            data = new byte[32];
40
            crypto.GetNonZeroBytes(data);
41
            StringBuilder result = new StringBuilder(32);
42

  
43
            foreach (byte b in data)
44
            {
45
                result.Append(chars[b % (chars.Length - 1)]);
46
            }
47

  
48
            return Guid.ParseExact(result.ToString(0, 8) + "-" + result.ToString(8, 4) + "-" + result.ToString(11, 4) + "-"
49
                + result.ToString(16, 4) + "-" + result.ToString(20, 12), "D");
50
        }
51
    }
52
}
MarkupToPDF/Controls/Parsing/MarkupCopy.cs.bak
1
using System;
2
using System.Net;
3
using System.Windows;
4
using System.Windows.Controls;
5
using System.Windows.Documents;
6
using System.Windows.Ink;
7
using System.Windows.Input;
8
using System.Windows.Media;
9
using System.Windows.Media.Animation;
10
using System.Windows.Shapes;
11
using MarkupToPDF.Controls;
12
using MarkupToPDF.Controls.Line;
13
using MarkupToPDF.Controls.Shape;
14
using MarkupToPDF.Controls.Polygon;
15
using MarkupToPDF.Controls.Text;
16
using MarkupToPDF.Controls.Etc;
17
using MarkupToPDF.Controls.Common.ValueConverter;
18
using MarkupToPDF.Serialize.S_Control;
19
using MarkupToPDF.Serialize.Core;
20
using System.Collections.Generic;
21
using System.Collections.ObjectModel;
22
using System.Text;
23
using MarkupToPDF.Controls.Common;
24
using MarkupToPDF.Common;
25

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

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

  
39
    //    String ConvertData = "";
40

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

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

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

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

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

  
390

  
391

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

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

내보내기 Unified diff

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