프로젝트

일반

사용자정보

개정판 fa48eb85

IDfa48eb85a9297b6aa53ad163a75afe98c86443d3
상위 5113a44c
하위 52827a4c

김태성이(가) 약 5년 전에 추가함

issue #1000 컨트롤 angle 수정/ Textcontrol 텍스트 선택 수정

Change-Id: I56b5c6295adb7409774045545f30f16a920be96c

차이점 보기:

KCOM/App.xaml.cs
20 20
using System.Runtime.InteropServices;
21 21
using KCOM.Views;
22 22
using System.Threading.Tasks;
23
using System.Windows.Input;
23 24

  
24 25
[assembly: log4net.Config.XmlConfigurator(Watch = true)]
25 26
namespace KCOM
......
211 212

  
212 213
                await SplashScreenAsnyc();
213 214
                base.OnStartup(e);
215

  
216
                System.Windows.Input.Keyboard.AddKeyDownHandler(this.MainWindow, KeyDownEvent);
217

  
214 218
            }
215 219
            catch (Exception ex)
216 220
            {
......
222 226
            }
223 227
        }
224 228

  
229
        private void KeyDownEvent(object sender, KeyEventArgs e)
230
        {
231
            if (e.Key == Key.Escape || e.Key == Key.Delete)
232
            {
233
                System.Diagnostics.Debug.WriteLine("app key Event");
234
                Common.ViewerDataModel.Instance.SystemMain.KeyEventDownAction(sender, e);
235
            }
236
        }
237

  
225 238
        private async Task<bool> SplashScreenAsnyc()
226 239
        {
227 240
            int value = 100 / ISplashMessage.SplashMessageCnt;
KCOM/Controls/AdornerFinal.xaml
15 15
                    <Setter.Value>
16 16
                        <ControlTemplate TargetType="Thumb">
17 17
                            <Grid >
18
                                <Rectangle x:Name="RectThumb" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Fill="#ffcfcfce"  
18
                                <Rectangle x:Name="RectThumb" Width="{TemplateBinding  Width}" Height="{TemplateBinding Height}" Fill="#ffcfcfce"  
19 19
                                           Opacity="0.6" Stroke="#ff6a6b68" StrokeDashArray="2 2" MouseLeftButtonDown="RectThumb_MouseLeftButtonDown">
20 20
                                </Rectangle>
21 21
                                <telerik:RadDropDownButton DropDownIndicatorVisibility="Collapsed" IsHitTestVisible="False" x:Name="Date_Drop" Opacity="0.01" 
......
40 40
                    <Setter.Value>
41 41
                        <ControlTemplate TargetType="Thumb">
42 42
                                <!--<TextBox Text="" x:Name="testText" Loaded="testText_Loaded"  Width="{Binding Width, ElementName=Self}" Height="{Binding Height, ElementName=Self}"/>-->
43
                                <Rectangle Fill="#ff8ef814" Width="{Binding Width, ElementName=Self}" Height="{Binding Height, ElementName=Self}"
43
                                <Rectangle x:Name="thumbRect" Fill="#ff8ef814" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}"
44 44
        						    Opacity="0.6" MouseLeftButtonDown="RectThumb_MouseLeftButtonDown"/>                                
45 45
                        </ControlTemplate>
46 46
                    </Setter.Value>
......
83 83
                            <Ellipse Stroke="#ff2e3436"  StrokeThickness="2" MouseLeftButtonDown="ControlPointMouseLeftButtonDown"
84 84
                                     HorizontalAlignment="Center" Width="20"  Height="20" Margin="0,0,0,0" Canvas.ZIndex="1">
85 85
                                <Ellipse.Fill>
86
                                    <SolidColorBrush Color="#fff814df" Opacity="{Binding Opacity}"/>
86
                                    <SolidColorBrush Color="#fff814df"/>
87
                                    <!--<SolidColorBrush Color="#fff814df" Opacity="{Binding Opacity, RelativeSource={RelativeSource TemplatedParent}}"/>-->
87 88
                                </Ellipse.Fill>
88 89
                                <i:Interaction.Behaviors>
89 90
                                    <behavior:ExpandingMouseOver ScaleFactor="2"/>
KCOM/Controls/AdornerFinal.xaml.cs
303 303
                    {
304 304
                        if (AngleValue == 0)
305 305
                        {
306
                            AngleValue = (item.DrawingData as TextControl).Angle;
306
                            AngleValue = (item.DrawingData as TextControl).CommentAngle;
307 307
                        }
308 308
                        double X = Canvas.GetLeft((item.DrawingData as TextControl));
309 309
                        double Y = Canvas.GetTop((item.DrawingData as TextControl));
......
369 369
                        Group_ID = member.GroupID,
370 370
                    });
371 371
                    (member as ArrowTextControl).Base_TextBox.IsHitTestVisible = false;
372
                    AngleValue = (member as ArrowTextControl).Angle;
372
                    AngleValue = (member as ArrowTextControl).CommentAngle;
373 373
                    Observable.FromEventPattern(((ArrowTextControl)member).Base_TextBox, "LostFocus").Subscribe(a =>
374 374
                    {
375 375
                        TextCompensation = false;
......
383 383
                    break;
384 384
                case "ImgControl":
385 385
                    this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = member.ControlType, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
386
                    AngleValue = (member as ImgControl).Angle;
386
                    AngleValue = (member as ImgControl).CommentAngle;
387 387
                    break;
388 388
                case "DateControl":
389 389
                    this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = member.ControlType, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
390
                    AngleValue = (member as DateControl).Angle;
390
                    AngleValue = (member as DateControl).CommentAngle;
391 391
                    break;
392 392
                case "SignControl":
393 393
                    this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = member.ControlType, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
394
                    AngleValue = (member as SignControl).Angle;
394
                    AngleValue = (member as SignControl).CommentAngle;
395 395
                    break;
396 396
                case "SymControl":
397 397
                    this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = member.ControlType, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
398
                    AngleValue = (member as SymControl).Angle;
398
                    AngleValue = (member as SymControl).CommentAngle;
399 399
                    break;
400 400
                case "SymControlN":
401 401
                    this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = member.ControlType, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
402
                    AngleValue = (member as SymControlN).Angle;
402
                    AngleValue = (member as SymControlN).CommentAngle;
403 403
                    break;
404 404
                case "TextControl":
405 405
                    this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.TextControl, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
......
422 422
                    DragThumb.RenderTransformOrigin = new Point(0.0, 0.0);
423 423
                    DragThumb.RenderTransform = new RotateTransform()
424 424
                    {
425
                        Angle = (member as TextControl).Angle,
425
                        Angle = (member as TextControl).CommentAngle,
426 426
                        //CenterX = middle.X,
427 427
                        //CenterY = middle.Y,
428 428
                    };
......
430 430
                    AdornerBorder.RenderTransformOrigin = new Point(0.0, 0.0);
431 431
                    AdornerBorder.RenderTransform = new RotateTransform()
432 432
                    {
433
                        Angle = (member as TextControl).Angle,
433
                        Angle = (member as TextControl).CommentAngle,
434 434
                        //CenterX = middle.X,
435 435
                        //CenterY = middle.Y,
436 436
                    };
......
480 480
        {
481 481
            AdornerBorder.RenderTransformOrigin = new Point(0.5, 0.5);
482 482
            DragThumb.RenderTransformOrigin = new Point(0.5, 0.5);
483
            AdornerBorder.RenderTransform = new RotateTransform() { Angle = (member as IViewBox).Angle };
484
            DragThumb.RenderTransform = new RotateTransform() { Angle = (member as IViewBox).Angle };
483
            AdornerBorder.RenderTransform = new RotateTransform() { Angle = (member as IViewBox).CommentAngle };
484
            DragThumb.RenderTransform = new RotateTransform() { Angle = (member as IViewBox).CommentAngle };
485 485
        }
486 486

  
487 487
        public void SetAdornerMember(List<CommentUserInfo> members)
......
616 616
            {
617 617
                if (this.Members.First().DrawingData.GetType().Name == "TextControl")
618 618
                {
619
                    if ((this.Members.First().DrawingData as TextControl).Angle != 0)
619
                    if ((this.Members.First().DrawingData as TextControl).CommentAngle != 0)
620 620
                    {
621
                        trRotate.Angle = (this.Members.First().DrawingData as TextControl).Angle;
622
                        trRotateThumb.Angle = (this.Members.First().DrawingData as TextControl).Angle;
621
                        trRotate.Angle = (this.Members.First().DrawingData as TextControl).CommentAngle;
622
                        trRotateThumb.Angle = (this.Members.First().DrawingData as TextControl).CommentAngle;
623 623
                    }
624 624
                    else
625 625
                    {
......
635 635
                {
636 636
                    double textControlWidth;
637 637
                    double textControlHeight;
638

  
638 639
                    if (((currentControl as TextControl).Base_TextBox.ActualWidth) == 0)
639 640
                    {
640 641
                        textControlWidth = ((currentControl as TextControl).Base_TextBlock.ActualWidth);
......
650 651
                    {
651 652
                        minX = (currentControl as TextControl).EndPoint.X;
652 653
                    }
654

  
653 655
                    if ((currentControl as TextControl).EndPoint.Y < minY)
654 656
                    {
655 657
                        minY = (currentControl as TextControl).EndPoint.Y;
656 658
                    }
659

  
657 660
                    if (textControlWidth + (currentControl as TextControl).EndPoint.X > maxX)
658 661
                    {
659 662
                        maxX = textControlWidth + (currentControl as TextControl).EndPoint.X;
660 663
                    }
664

  
661 665
                    if (textControlHeight + (currentControl as TextControl).EndPoint.Y > maxY)
662 666
                    {
663 667
                        maxY = textControlHeight + (currentControl as TextControl).EndPoint.Y;
......
829 833
                        var temp = (this.Members.First() as AdornerMember).DrawingData as ArrowTextControl;
830 834

  
831 835

  
832
                        switch (Math.Abs(temp.Angle).ToString())
836
                        switch (Math.Abs(temp.CommentAngle).ToString())
833 837
                        {
834 838
                            case "90":
835 839
                                {
......
918 922
                    tm.Style = (Style)this.LayoutRoot.Resources["ThumbTextStyle"];
919 923
                    tm.Width = (member as ArrowTextControl).BoxWidth;
920 924
                    tm.Height = (member as ArrowTextControl).BoxHeight;
921
                    var angle = (member as ArrowTextControl).Angle;
925
                    var angle = (member as ArrowTextControl).PageAngle;
922 926
                    if (Math.Abs(angle).ToString() == "90")
923 927
                    {
924 928
                        tm.RenderTransformOrigin = new Point(0, 0);
......
934 938
                        tm.RenderTransformOrigin = new Point(0.5, 0.5);
935 939
                        tm.RenderTransform = new RotateTransform()
936 940
                        {
937
                            Angle = angle,
941
                            Angle = angle
938 942
                        };
939 943
                    }
940 944
                }
......
1218 1222
                    switch (member.Drawingtype)
1219 1223
                    {
1220 1224
                        case ControlType.TextControl:
1221
                            (member.DrawingData as CommentUserInfo).Angle = AngleValue;
1225
                            (member.DrawingData as CommentUserInfo).CommentAngle = AngleValue;
1222 1226

  
1223 1227
                            DragThumb.RenderTransformOrigin = new Point(0, 0);
1224 1228
                            DragThumb.RenderTransform = new RotateTransform()
1225 1229
                            {
1226 1230

  
1227
                                Angle = (member.DrawingData as CommentUserInfo).Angle
1231
                                Angle = (member.DrawingData as CommentUserInfo).CommentAngle
1228 1232
                            };
1229 1233

  
1230 1234
                            AdornerBorder.RenderTransformOrigin = new Point(0, 0);
1231 1235
                            AdornerBorder.RenderTransform = new RotateTransform()
1232 1236
                            {
1233
                                Angle = (member.DrawingData as CommentUserInfo).Angle
1237
                                Angle = (member.DrawingData as CommentUserInfo).CommentAngle
1234 1238
                            };
1235 1239

  
1236 1240
                            //(member.DrawingData as TextControl).Angle = AngleValue;
......
1256 1260
                        case ControlType.Sign:
1257 1261
                        case ControlType.Symbol:
1258 1262
                        case ControlType.Stamp:
1259
                            (member.DrawingData as CommentUserInfo).Angle = AngleValue;
1263
                            (member.DrawingData as CommentUserInfo).CommentAngle = AngleValue;
1260 1264
                            BorderUpdate();
1261 1265
                            break;
1262 1266
                        case ControlType.PolygonCloud:
......
1264 1268
                            BorderUpdate();
1265 1269
                            break;
1266 1270
                        case ControlType.Circle:
1267
                            (member.DrawingData as CommentUserInfo).Angle = AngleValue;
1271
                            (member.DrawingData as CommentUserInfo).CommentAngle = AngleValue;
1268 1272
                            ((CircleControl)member.DrawingData).SetCenterXY();
1269 1273
                            BorderUpdate();
1270 1274
                            break;
......
1284 1288
            /// get angle from text controls' angle if only text control exists - 2018.05.10 added by humkyung
1285 1289
            if ((1 == this.Members.Count) && (this.Members.First() as AdornerMember).DrawingData.GetType().Name == "TextControl")
1286 1290
            {
1287
                this.AngleValue = ((this.Members.First() as AdornerMember).DrawingData as TextControl).Angle;
1291
                this.AngleValue = ((this.Members.First() as AdornerMember).DrawingData as TextControl).CommentAngle;
1288 1292
            }
1289 1293
            /// up to here
1290 1294

  
......
1345 1349
                AllControl.Base_TextBox.Focus();
1346 1350
                AllControl.Base_TextBox.Visibility = Visibility.Visible;
1347 1351
                AllControl.Base_TextBlock.Visibility = Visibility.Collapsed;
1352
                AllControl.Base_TextBox.IsHitTestVisible = true;
1348 1353
                AllControl.Base_TextBox.Focus();
1354

  
1349 1355
                AllControl.SizeChanged += (sen, ea) =>
1350 1356
                {
1351 1357
                    if (AllControl.Base_TextBox != null)
......
1365 1371
                        Point middle = MathSet.getMiddlePoint(AllControl.StartPoint, endPointV);
1366 1372
                        AllControl.Base_Grid.RenderTransform = new RotateTransform()
1367 1373
                        {
1368
                            Angle = AllControl.Angle,
1374
                            Angle = AllControl.CommentAngle,
1369 1375
                            CenterX = middle.X,
1370 1376
                            CenterY = middle.Y,
1371 1377
                        };
KCOM/Events/RedoCommand.cs
83 83

  
84 84
                            if ((item.Markup as IViewBox) != null)
85 85
                            {
86
                                (item.Markup as IViewBox).Angle = item.Angle;
86
                                (item.Markup as IViewBox).CommentAngle = item.Angle;
87 87
                            }
88 88
                            if ((item.Markup as TextControl) != null)
89 89
                            {
90
                                (item.Markup as TextControl).Angle = item.Angle;
90
                                (item.Markup as TextControl).CommentAngle = item.Angle;
91 91

  
92 92
                                Canvas.SetLeft((item.Markup as TextControl), item.PointSet[0].X);
93 93
                                Canvas.SetTop((item.Markup as TextControl), item.PointSet[0].Y);
KCOM/Events/UndoCommand.cs
79 79

  
80 80
                if (comment is ArrowTextControl)
81 81
                {
82
                    multi_Undo_Data.Angle = dAngle = (comment as ArrowTextControl).Angle;
82
                    multi_Undo_Data.Angle = dAngle = (comment as ArrowTextControl).CommentAngle;
83 83
                }
84 84
                else
85 85
                {
......
144 144

  
145 145
                            if ((item.Markup as IViewBox) != null)
146 146
                            {
147
                                (item.Markup as IViewBox).Angle = item.Angle;
147
                                (item.Markup as IViewBox).CommentAngle = item.Angle;
148 148
                            }
149 149
                            if ((item.Markup as TextControl) != null)
150 150
                            {
151
                                (item.Markup as TextControl).Angle = item.Angle;
151
                                (item.Markup as TextControl).CommentAngle = item.Angle;
152 152
                                Canvas.SetLeft((item.Markup as TextControl), item.PointSet[0].X);
153 153
                                Canvas.SetTop((item.Markup as TextControl), item.PointSet[0].Y);
154 154
                            }
KCOM/KCOM.csproj.user
13 13
    <VerifyUploadedFiles>false</VerifyUploadedFiles>
14 14
  </PropertyGroup>
15 15
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
16
    <StartArguments>eyJEb2N1bWVudEl0ZW1JRCI6IjA5MDJjMWUyODAwMjQxYmQiLCJQcm9qZWN0Tk8iOiIwMDAwMDAiLCJVc2VySUQiOiJkc2plb25nIiwiYlBhcnRuZXIiOmZhbHNlLCJDcmVhdGVGaW5hbFBERlBlcm1pc3Npb24iOnRydWUsIk5ld0NvbW1lbnRQZXJtaXNzaW9uIjp0cnVlLCJNb2RlIjowfQ==</StartArguments>
16
    <StartArguments>eyJEb2N1bWVudEl0ZW1JRCI6IjQwMDAwMTQyIiwiYlBhcnRuZXIiOmZhbHNlLCJDcmVhdGVGaW5hbFBERlBlcm1pc3Npb24iOmZhbHNlLCJOZXdDb21tZW50UGVybWlzc2lvbiI6dHJ1ZSwiUHJvamVjdE5PIjoiMDAwMDAwIiwiVXNlcklEIjoiZG9mdGVjaCIsIk1vZGUiOjB9</StartArguments>
17 17
  </PropertyGroup>
18 18
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
19 19
    <StartArguments>eyJEb2N1bWVudEl0ZW1JRCI6IjQwMDAwMTQ5IiwiYlBhcnRuZXIiOmZhbHNlLCJDcmVhdGVGaW5hbFBERlBlcm1pc3Npb24iOnRydWUsIk5ld0NvbW1lbnRQZXJtaXNzaW9uIjp0cnVlLCJQcm9qZWN0Tk8iOiIwMDAwMDAiLCJVc2VySUQiOiJhZG1pbiIsIk1vZGUiOjB9</StartArguments>
KCOM/Views/MainMenu.xaml.cs
1553 1553
                    #endregion
1554 1554
                    if (ViewerDataModel.Instance.AngleVisibility == Visibility.Visible)
1555 1555
                    {
1556
                        ViewerDataModel.Instance.Angle = currentControl.Angle;
1556
                        ViewerDataModel.Instance.Angle = currentControl.CommentAngle;
1557 1557
                    }
1558 1558
                }
1559 1559
            }
......
3212 3212
                                                currentControl.IsNew = true;
3213 3213
                                                ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl);
3214 3214

  
3215
                                                //20180903 LJY 회전된 방향으로 화면에 출력되지 않는 문제 수정  
3216
                                                (currentControl as ImgControl).Angle -= rotate.Angle;
3217
                                        }
3215
                                        //20180903 LJY 회전된 방향으로 화면에 출력되지 않는 문제 수정  
3216
                                        (currentControl as ImgControl).CommentAngle -= rotate.Angle;
3217
                                    }
3218 3218
                                    }
3219 3219
                                //}
3220 3220
                            }
......
3262 3262
                                        ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl);
3263 3263

  
3264 3264
                                        //20180903 LJY 회전된 방향으로 화면에 출력되지 않는 문제 수정 
3265
                                        (currentControl as DateControl).Angle -= rotate.Angle;
3265
                                        (currentControl as ImgControl).CommentAngle -= rotate.Angle;
3266 3266
                                }
3267 3267
                                //}
3268 3268
                            }
......
3289 3289
                                    currentControl.SetValue(TextControl.CanvasYProperty, canvasDrawingMouseDownPoint.Y);
3290 3290
                                    
3291 3291
                                    (currentControl as TextControl).ControlType_No = 0;
3292
                                    (currentControl as TextControl).Angle -= rotate.Angle;
3292
                                    (currentControl as TextControl).CommentAngle -= rotate.Angle;
3293 3293
                                    (currentControl as TextControl).IsHighLight = ViewerDataModel.Instance.checkHighShape;
3294 3294
                                    (currentControl as TextControl).ApplyTemplate();
3295 3295
                                    (currentControl as TextControl).Base_TextBox.Focus();
......
3320 3320
                                    currentControl.SetValue(TextControl.CanvasYProperty, canvasDrawingMouseDownPoint.Y);
3321 3321
                                    
3322 3322
                                    (currentControl as TextControl).ControlType_No = 1;
3323
                                    (currentControl as TextControl).Angle = Ang;
3323
                                    (currentControl as TextControl).CommentAngle = Ang;
3324 3324
                                    (currentControl as TextControl).IsHighLight = ViewerDataModel.Instance.checkHighShape;
3325 3325
                                    (currentControl as TextControl).ApplyTemplate();
3326 3326
                                    (currentControl as TextControl).Base_TextBox.Focus();
......
3349 3349

  
3350 3350
                                    currentControl.SetValue(Canvas.ZIndexProperty, 3);
3351 3351
                                    currentControl.SetValue(TextControl.CanvasXProperty, canvasDrawingMouseDownPoint.X);
3352
                                    currentControl.SetValue(TextControl.CanvasYProperty, canvasDrawingMouseDownPoint.Y);                                    
3352
                                    currentControl.SetValue(TextControl.CanvasYProperty, canvasDrawingMouseDownPoint.Y);
3353 3353

  
3354
                                    (currentControl as TextControl).Angle = Ang;
3354
                                    (currentControl as TextControl).CommentAngle = Ang;
3355 3355
                                    (currentControl as TextControl).ControlType_No = 2;
3356 3356
                                    (currentControl as TextControl).IsHighLight = ViewerDataModel.Instance.checkHighShape;
3357 3357
                                    (currentControl as TextControl).ApplyTemplate();
......
3398 3398
                                        (currentControl as ArrowTextControl).TextSize = ViewerDataModel.Instance.TextSize;
3399 3399
                                        (currentControl as ArrowTextControl).isHighLight = ViewerDataModel.Instance.checkHighShape;
3400 3400

  
3401
                                        //20180903 LJY 회전된 방향으로 화면에 출력되지 않는 문제 수정 
3402
                                        (currentControl as ArrowTextControl).Angle -= rotate.Angle;
3401
                                    //20180903 LJY 회전된 방향으로 화면에 출력되지 않는 문제 수정 
3402
                                    (currentControl as ArrowTextControl).CommentAngle -= rotate.Angle;
3403 3403

  
3404
                                        (currentControl as ArrowTextControl).ApplyTemplate();
3404
                                    (currentControl as ArrowTextControl).ApplyTemplate();
3405 3405
                                        (currentControl as ArrowTextControl).Base_TextBox.Focus();
3406 3406
                                        (currentControl as ArrowTextControl).SetFontFamily(new FontFamily(this.ParentOfType<MainWindow>().dzTopMenu.comboFontFamily.Text));
3407 3407
                                        ViewerDataModel.Instance.AngleVisibility = Visibility.Visible;
......
3452 3452
                                    (currentControl as ArrowTextControl).isHighLight = ViewerDataModel.Instance.checkHighShape;
3453 3453

  
3454 3454
                                    //20180903 LJY 회전된 방향으로 화면에 출력되지 않는 문제 수정 
3455
                                    (currentControl as ArrowTextControl).Angle -= rotate.Angle;
3455
                                    (currentControl as ArrowTextControl).CommentAngle -= rotate.Angle;
3456 3456

  
3457 3457
                                    (currentControl as ArrowTextControl).ApplyTemplate();
3458 3458
                                    (currentControl as ArrowTextControl).Base_TextBox.Focus();
......
3502 3502
                                        (currentControl as ArrowTextControl).TextSize = ViewerDataModel.Instance.TextSize;
3503 3503
                                        (currentControl as ArrowTextControl).SetFontFamily(new FontFamily(this.ParentOfType<MainWindow>().dzTopMenu.comboFontFamily.Text));
3504 3504
                                        //20180903 LJY 회전된 방향으로 화면에 출력되지 않는 문제 수정 
3505
                                        (currentControl as ArrowTextControl).Angle -= rotate.Angle;
3505
                                        (currentControl as ArrowTextControl).CommentAngle -= rotate.Angle;
3506 3506
                                        (currentControl as ArrowTextControl).ApplyTemplate();
3507 3507
                                        (currentControl as ArrowTextControl).Base_TextBox.Focus();
3508 3508
                                        ViewerDataModel.Instance.AngleVisibility = Visibility.Visible;                                    
......
3555 3555
                                        (currentControl as ArrowTextControl).isHighLight = ViewerDataModel.Instance.checkHighShape;
3556 3556
                                     
3557 3557
                                        //20180903 LJY 회전된 방향으로 화면에 출력되지 않는 문제 수정  
3558
                                        (currentControl as ArrowTextControl).Angle -= rotate.Angle;
3558
                                        (currentControl as ArrowTextControl).CommentAngle -= rotate.Angle;
3559 3559
                                        (currentControl as ArrowTextControl).ApplyTemplate();
3560 3560
                                        (currentControl as ArrowTextControl).SetFontFamily(new FontFamily(this.ParentOfType<MainWindow>().dzTopMenu.comboFontFamily.Text));
3561 3561
                                        (currentControl as ArrowTextControl).Base_TextBox.Focus();                                 
......
3607 3607
                                        (currentControl as ArrowTextControl).isHighLight = ViewerDataModel.Instance.checkHighShape;
3608 3608
                                        (currentControl as ArrowTextControl).SetFontFamily(new FontFamily(this.ParentOfType<MainWindow>().dzTopMenu.comboFontFamily.Text));
3609 3609
                                        //20180903 LJY 회전된 방향으로 화면에 출력되지 않는 문제 수정  
3610
                                        (currentControl as ArrowTextControl).Angle -= rotate.Angle;
3610
                                        (currentControl as ArrowTextControl).CommentAngle -= rotate.Angle;
3611 3611
                                    
3612 3612
                                        (currentControl as ArrowTextControl).ApplyTemplate();
3613 3613
                                        (currentControl as ArrowTextControl).Base_TextBox.Focus();
......
3657 3657
                                        (currentControl as ArrowTextControl).isHighLight = ViewerDataModel.Instance.checkHighShape;
3658 3658

  
3659 3659
                                        //20180903 LJY 회전된 방향으로 화면에 출력되지 않는 문제 수정 
3660
                                        (currentControl as ArrowTextControl).Angle -= rotate.Angle;
3660
                                        (currentControl as ArrowTextControl).CommentAngle -= rotate.Angle;
3661 3661
                                        (currentControl as ArrowTextControl).SetFontFamily(new FontFamily(this.ParentOfType<MainWindow>().dzTopMenu.comboFontFamily.Text));
3662 3662
                                        (currentControl as ArrowTextControl).ApplyTemplate();
3663 3663
                                        (currentControl as ArrowTextControl).Base_TextBox.Focus();
......
3724 3724
                                        ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl);
3725 3725

  
3726 3726
                                        //20180903 LJY 회전된 방향으로 화면에 출력되지 않는 문제 수정 
3727
                                        (currentControl as SignControl).Angle -= rotate.Angle;                                    
3727
                                        (currentControl as SignControl).CommentAngle -= rotate.Angle;                                    
3728 3728
                                }
3729 3729
                                //}
3730 3730
                            }
......
3808 3808
                                    ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl);
3809 3809

  
3810 3810
                                    //20180903 LJY 회전된 방향으로 화면에 출력되지 않는 문제 수정  
3811
                                    (currentControl as SymControl).Angle -= rotate.Angle;
3811
                                    (currentControl as SymControl).CommentAngle -= rotate.Angle;
3812 3812
                                }
3813 3813
                                //}
3814 3814
                            }
......
3849 3849
                                        currentControl.CommentID = Commons.shortGuid();
3850 3850
                                        ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl);
3851 3851
                                        //20180903 LJY 회전된 방향으로 화면에 출력되지 않는 문제 수정  
3852
                                        (currentControl as SymControlN).Angle -= rotate.Angle;
3852
                                        (currentControl as SymControlN).CommentAngle -= rotate.Angle;
3853 3853
                                }                                    
3854 3854
                                //}
3855 3855
                            }
......
3881 3881
                        }
3882 3882
                        break;
3883 3883
                }
3884

  
3885
                if (currentControl != null)
3886
                {
3887
                    currentControl.PageAngle = pageNavigator.CurrentPage.Angle;
3888
                }
3884 3889
            }
3885 3890
            if (mouseHandlingMode != MouseHandlingMode.None && e.LeftButton == MouseButtonState.Pressed)
3886 3891
            {
......
5234 5239

  
5235 5240
                    PolygonControl pc = new PolygonControl()
5236 5241
                    {
5237
                        Angle = 0,
5242
                        CommentAngle = 0,
5238 5243
                        PointSet = inkPointSet,
5239 5244
                        ControlType = ControlType.Ink
5240 5245
                    };
MarkupToPDF/Common/CommentUserInfo.cs
81 81
        public virtual void OnTranslate(double dx, double dy)
82 82
        {
83 83
            var path = (this as IPath);
84
            for(int i=0; i < path.PointSet.Count;++i)
84
            for (int i = 0; i < path.PointSet.Count; ++i)
85 85
            {
86 86
                path.PointSet[i] = new Point(path.PointSet[i].X + dx, path.PointSet[i].Y + dy);
87 87
            }
......
103 103
        /// </summary>
104 104
        public virtual ControlType ControlType { get; set; }
105 105

  
106
        private double _CommentAngle;
107

  
106 108
        /// <summary>
107
        /// subclass has to override this property
109
        /// 컨트롤의 ANGLE
110
        /// </summary>
111
        public virtual double CommentAngle
112
        {
113
            get { return _CommentAngle; }
114
            set
115
            {
116
                _CommentAngle = value;
117
                System.Diagnostics.Debug.WriteLine($"CommentInfo CommentAngle {value}");
118
            }
119
        }
120

  
121
        private double _PageAngle;
122

  
123
        /// <summary>
124
        /// 실제 저장된 Page의 ANGLE
125
        /// DB에 저장됨
126
        /// </summary>
127
        public virtual double PageAngle
128
        {
129
            get { return _PageAngle; }
130
            set
131
            {
132
                _PageAngle = value;
133
                System.Diagnostics.Debug.WriteLine($"CommentInfo PageAngle {value}");
134
            }
135
        }
136

  
137
        private double _VisualPageAngle;
138

  
139
        /// <summary>
140
        /// Display되는 Page의 ANGLE
141
        /// PageAngle에서 변형됨
108 142
        /// </summary>
109
        public virtual double Angle { get; set; }
143
        public virtual double VisualPageAngle
144
        {
145
            get { return _VisualPageAngle; }
146
            set
147
            {
148
                _VisualPageAngle = value;
149
                //System.Diagnostics.Debug.WriteLine($"CommentInfo VisualPageAngle {value}");
150
            }
151
        }
110 152

  
111 153
        public virtual SolidColorBrush StrokeColor { get; set; }
112 154

  
MarkupToPDF/Controls/Cad/ClipWhiteControlcs.cs
262 262
            }
263 263
        }
264 264

  
265
        public double Angle
265
        public double CommentAngle
266 266
        {
267 267
            get { return (double)GetValue(AngleProperty); }
268 268
            set
269 269
            {
270
                if (this.Angle != value)
270
                if (this.CommentAngle != value)
271 271
                {
272 272
                    SetValue(AngleProperty, value);
273 273
                }
......
641 641
                    Paint = s.PaintState,
642 642
                    StartPoint = s.StartPoint,
643 643
                    EndPoint = s.EndPoint,
644
                    Angle = s.Angle,
644
                    CommentAngle = s.Angle,
645 645
                    StrokeColor = Brushes.White,
646 646
                    DashSize = s.DashSize,
647 647
                    Opacity = s.Opac,
MarkupToPDF/Controls/Cad/CoordinateControl.cs
262 262
            }
263 263
        }
264 264

  
265
        public double Angle
265
        public double CommentAngle
266 266
        {
267 267
            get { return (double)GetValue(AngleProperty); }
268 268
            set
269 269
            {
270
                if (this.Angle != value)
270
                if (this.CommentAngle != value)
271 271
                {
272 272
                    SetValue(AngleProperty, value);
273 273
                }
......
640 640
                    Paint = s.PaintState,
641 641
                    StartPoint = s.StartPoint,
642 642
                    EndPoint = s.EndPoint,
643
                    Angle = s.Angle,
643
                    CommentAngle = s.Angle,
644 644
                    StrokeColor = Brushes.Yellow,
645 645
                    DashSize = s.DashSize,
646 646
                    Opacity = s.Opac,
MarkupToPDF/Controls/Cad/InsideWhiteControlcs.cs
262 262
            }
263 263
        }
264 264

  
265
        public double Angle
265
        public double CommentAngle
266 266
        {
267 267
            get { return (double)GetValue(AngleProperty); }
268 268
            set
269 269
            {
270
                if (this.Angle != value)
270
                if (this.CommentAngle != value)
271 271
                {
272 272
                    SetValue(AngleProperty, value);
273 273
                }
......
641 641
                    Paint = s.PaintState,
642 642
                    StartPoint = s.StartPoint,
643 643
                    EndPoint = s.EndPoint,
644
                    Angle = s.Angle,
644
                    CommentAngle = s.Angle,
645 645
                    StrokeColor = Brushes.White,
646 646
                    DashSize = s.DashSize,
647 647
                    Opacity = s.Opac,
MarkupToPDF/Controls/Cad/OverlapWhiteControl.cs
262 262
            }
263 263
        }
264 264

  
265
        public double Angle
265
        public double CommentAngle
266 266
        {
267 267
            get { return (double)GetValue(AngleProperty); }
268 268
            set
269 269
            {
270
                if (this.Angle != value)
270
                if (this.CommentAngle != value)
271 271
                {
272 272
                    SetValue(AngleProperty, value);
273 273
                }
......
641 641
                    Paint = s.PaintState,
642 642
                    StartPoint = s.StartPoint,
643 643
                    EndPoint = s.EndPoint,
644
                    Angle = s.Angle,
644
                    CommentAngle = s.Angle,
645 645
                    StrokeColor = Brushes.White,
646 646
                    DashSize = s.DashSize,
647 647
                    Opacity = s.Opac,
MarkupToPDF/Controls/Common/IMarkupCommonData.cs
38 38

  
39 39
    public interface IShapeControl : IPath
40 40
    {
41
        double Angle { get; set; }
41
        double CommentAngle { get; set; }
42 42
        PaintSet Paint { get; set; }
43 43
        //강인구 추가
44 44
        //DoubleCollection DashSize { get; set; }
MarkupToPDF/Controls/Common/Interfaces.cs
36 36

  
37 37
    public interface IViewBox : IPath
38 38
    {
39
        double Angle { get; set; }
39
        double CommentAngle { get; set; }
40 40
    }
41 41
    public interface ICircleControl : IShapeControl
42 42
    {
MarkupToPDF/Controls/Common/MathSet.cs
438 438
                angle = approxAngle;
439 439
            }
440 440

  
441
            if (angle < 0)
442
            {
443
                angle = angle + 360;
444
            }
445

  
446 441
            return angle;
447 442
        }
448 443

  
MarkupToPDF/Controls/Etc/DateControl.cs
189 189
            }
190 190
        }
191 191

  
192
        public override double Angle
192
        public override double CommentAngle
193 193
        {
194 194
            get { return (double)GetValue(AngleProperty); }
195 195
            set
196 196
            {
197
                if (this.Angle != value)
197
                if (this.CommentAngle != value)
198 198
                {
199 199
                    SetValue(AngleProperty, value);
200 200
                }
......
380 380
            });
381 381

  
382 382

  
383
            double AngleData = this.Angle * -1;
383
            double AngleData = this.CommentAngle * -1;
384 384

  
385 385
            PathFigure pathFigure = new PathFigure();
386 386
            pathFigure.StartPoint = MathSet.RotateAbout(mid, this.StartPoint, AngleData);
......
551 551
        {
552 552
            using (S_DateControl STemp = new S_DateControl())
553 553
            {
554
                STemp.Angle = this.Angle;
554
                STemp.Angle = this.CommentAngle;
555 555
                STemp.EndPoint = this.EndPoint;
556 556
                STemp.UserID = this.UserID;
557 557
                STemp.LB = this.LeftBottomPoint;
......
585 585
                string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries);
586 586
                return new DateControl
587 587
                {
588
                    Angle = s.Angle,
588
                    CommentAngle = s.Angle,
589 589
                    StartPoint = s.StartPoint,
590 590
                    EndPoint = s.EndPoint,
591 591
                    LeftBottomPoint = s.LB,
MarkupToPDF/Controls/Etc/ImgControl.cs
224 224
            }
225 225
        }
226 226

  
227
        public override double Angle
227
        public override double CommentAngle
228 228
        {
229 229
            get { return (double)GetValue(AngleProperty); }
230 230
            set
231 231
            {
232
                if (this.Angle != value)
232
                if (this.CommentAngle != value)
233 233
                {
234 234
                    SetValue(AngleProperty, value);
235 235
                }
......
299 299
                this.EndPoint,
300 300
                this.TopRightPoint,                
301 301
            });
302
            double AngleData = this.Angle * -1;
302
            double AngleData = this.CommentAngle * -1;
303 303
            PathFigure pathFigure = new PathFigure();
304 304

  
305 305
            pathFigure.StartPoint = MathSet.RotateAbout(mid, this.StartPoint, AngleData);
......
438 438
        {
439 439
            using (S_ImgControl STemp = new S_ImgControl())
440 440
            {
441
                STemp.Angle = this.Angle;
441
                STemp.Angle = this.CommentAngle;
442 442
                STemp.EndPoint = this.EndPoint;
443 443
                STemp.LB = this.LeftBottomPoint;
444 444
                STemp.Name = this.GetType().Name;
......
486 486

  
487 487
                instance = new ImgControl
488 488
                {
489
                    Angle = s.Angle,
489
                    CommentAngle = s.Angle,
490 490
                    StartPoint = s.StartPoint,
491 491
                    TopRightPoint = s.TR,
492 492
                    EndPoint = s.EndPoint,
MarkupToPDF/Controls/Etc/SignControl.cs
190 190
                RaisePropertyChanged("LeftBottomPoint");
191 191
            }
192 192
        }
193
        public override double Angle
193
        public override double CommentAngle
194 194
        {
195 195
            get { return (double)GetValue(AngleProperty); }
196 196
            set
197 197
            {
198
                if (this.Angle != value)
198
                if (this.CommentAngle != value)
199 199
                {
200 200
                    SetValue(AngleProperty, value);
201 201
                }
......
251 251
                this.TopRightPoint,                
252 252
            });
253 253

  
254
            double AngleData = this.Angle * -1;
254
            double AngleData = this.CommentAngle * -1;
255 255

  
256 256
            PathFigure pathFigure = new PathFigure();
257 257
            pathFigure.StartPoint = MathSet.RotateAbout(mid, this.StartPoint, AngleData);
......
409 409
        {
410 410
            using (S_SignControl STemp = new S_SignControl())
411 411
            {
412
                STemp.Angle = this.Angle;
412
                STemp.Angle = this.CommentAngle;
413 413
                STemp.EndPoint = this.EndPoint;
414 414
                STemp.UserID = this.UserID;
415 415
                STemp.LB = this.LeftBottomPoint;
......
440 440
            {
441 441
                instance = new SignControl
442 442
                {
443
                    Angle = s.Angle,
443
                    CommentAngle = s.Angle,
444 444
                    StartPoint = s.StartPoint,
445 445
                    TopRightPoint = s.TR,
446 446
                    EndPoint = s.EndPoint,
MarkupToPDF/Controls/Etc/SymControl.cs
187 187
            set { SetValue(PointSetProperty, value); }
188 188
        }
189 189

  
190
        public override double Angle
190
        public override double CommentAngle
191 191
        {
192 192
            get { return (double)GetValue(AngleProperty); }
193 193
            set
194 194
            {
195
                if (this.Angle != value)
195
                if (this.CommentAngle != value)
196 196
                {
197 197
                    SetValue(AngleProperty, value);
198 198
                }
......
325 325
                this.TopRightPoint,
326 326
            });
327 327

  
328
            double AngleData = this.Angle * -1;
328
            double AngleData = this.CommentAngle * -1;
329 329

  
330 330
            PathFigure pathFigure = new PathFigure();
331 331
            pathFigure.StartPoint = MathSet.RotateAbout(mid, this.StartPoint, AngleData);
......
488 488
                STemp.PathInfo = this.PathData.ToString();
489 489
                STemp.StrokeColor = this.StrokeColor.Color.ToString();
490 490
                STemp.StartPoint = this.StartPoint;
491
                STemp.Angle = this.Angle;
491
                STemp.Angle = this.CommentAngle;
492 492
                STemp.EndPoint = this.EndPoint;
493 493
                STemp.LB = this.LeftBottomPoint;
494 494
                STemp.TR = this.TopRightPoint;
......
519 519
                    StartPoint = s.StartPoint,
520 520
                    StrokeColor = brush,
521 521
                    EndPoint = s.EndPoint,
522
                    Angle = s.Angle,
522
                    CommentAngle = s.Angle,
523 523
                    UserID = s.UserID,
524 524
                    LeftBottomPoint = s.LB,
525 525
                    TopRightPoint = s.TR,
MarkupToPDF/Controls/Etc/SymControlN.cs
291 291
            }
292 292
        }
293 293

  
294
        public override double Angle
294
        public override double CommentAngle
295 295
        {
296 296
            get { return (double)GetValue(AngleProperty); }
297 297
            set
298 298
            {
299
                if (this.Angle != value)
299
                if (this.CommentAngle != value)
300 300
                {
301 301
                    SetValue(AngleProperty, value);
302 302
                }
......
452 452
                STemp.DBData = this.PathXathData;
453 453
                //STemp.StrokeColor = this.StrokeColor.Color.ToString();
454 454
                STemp.StartPoint = this.StartPoint;
455
                STemp.Angle = this.Angle;
455
                STemp.Angle = this.CommentAngle;
456 456
                STemp.EndPoint = this.EndPoint;
457 457
                STemp.LB = this.LeftBottomPoint;
458 458
                STemp.TR = this.TopRightPoint;
......
477 477
                    PointSet = s.PointSet,
478 478
                    StartPoint = s.StartPoint,
479 479
                    EndPoint = s.EndPoint,
480
                    Angle = s.Angle,
480
                    CommentAngle = s.Angle,
481 481
                    LeftBottomPoint = s.LB,
482 482
                    TopRightPoint = s.TR,
483 483
                    Opacity = s.Opac,
MarkupToPDF/Controls/Line/ArcControl.cs
542 542
            this.MidPoint = new Point(0, 0);
543 543

  
544 544
            Point tmp = this.EndPoint;
545
            Angle = MathSet.returnAngle(this.StartPoint, ref tmp, bShiftKeyPressed);
545
            CommentAngle = MathSet.returnAngle(this.StartPoint, ref tmp, bShiftKeyPressed);
546 546

  
547 547
            if (bAxisLocked || bShiftKeyPressed)
548 548
            {
MarkupToPDF/Controls/Line/ArrowArcControl.cs
485 485
            this.EndPoint = pt;
486 486
         
487 487
            Point tmp = this.EndPoint;
488
            Angle = MathSet.returnAngle(this.StartPoint, ref tmp, bShiftKeyPressed);
488
            CommentAngle = MathSet.returnAngle(this.StartPoint, ref tmp, bShiftKeyPressed);
489 489

  
490 490
            if (bAxisLocked || bShiftKeyPressed)
491 491
            {
MarkupToPDF/Controls/Line/ArrowControl_Multi.cs
362 362
            if (this.MiddlePoint == new Point(0, 0))
363 363
            {
364 364
                Point tmp = this.EndPoint;
365
                Angle = MathSet.returnAngle(this.StartPoint, ref tmp, bShiftKeyPressed);
365
                CommentAngle = MathSet.returnAngle(this.StartPoint, ref tmp, bShiftKeyPressed);
366 366

  
367 367
                if (bAxisLocked || bShiftKeyPressed)
368 368
                {
......
372 372
            else
373 373
            {
374 374
                Point tmp = this.EndPoint;
375
                Angle = MathSet.returnAngle(this.MiddlePoint, ref tmp, bShiftKeyPressed);
375
                CommentAngle = MathSet.returnAngle(this.MiddlePoint, ref tmp, bShiftKeyPressed);
376 376

  
377 377
                if (bAxisLocked || bShiftKeyPressed)
378 378
                {
MarkupToPDF/Controls/Line/LineControl.cs
509 509
            this.EndPoint = pt;
510 510

  
511 511
            Point tmp = this.EndPoint;
512
            Angle = MathSet.returnAngle(this.StartPoint, ref tmp, bShiftKeyPressed);
512
            CommentAngle = MathSet.returnAngle(this.StartPoint, ref tmp, bShiftKeyPressed);
513 513

  
514 514
            if (bAxisLocked || bShiftKeyPressed)
515 515
            {
MarkupToPDF/Controls/Polygon/CloudControl.cs
827 827

  
828 828
            if (bAxisLocked || bShiftKeyPressed)
829 829
            {
830
                Angle = MathSet.returnAngle(this.StartPoint, ref tmp, bShiftKeyPressed);
830
                CommentAngle = MathSet.returnAngle(this.StartPoint, ref tmp, bShiftKeyPressed);
831 831
            }
832 832

  
833 833
            this.PointSet.Add(tmp);
MarkupToPDF/Controls/Polygon/InkControl.cs
391 391
            }
392 392
        }
393 393

  
394
        public double Angle
394
        public double CommentAngle
395 395
        {
396 396
            get { return (double)GetValue(AngleProperty); }
397 397
            set
398 398
            {
399
                if (this.Angle != value)
399
                if (this.CommentAngle != value)
400 400
                {
401 401
                    SetValue(AngleProperty, value);
402 402
                    OnPropertyChanged("Angle");
MarkupToPDF/Controls/Polygon/PolygonControl.cs
496 496

  
497 497
            if (bAxisLocked || bShiftKeyPressed)
498 498
            {
499
                Angle = MathSet.returnAngle(this.PointSet[this.PointSet.Count - 1], ref tmp, bShiftKeyPressed);
499
                CommentAngle = MathSet.returnAngle(this.PointSet[this.PointSet.Count - 1], ref tmp, bShiftKeyPressed);
500 500
            }
501 501

  
502 502
            this.PointSet.Add(tmp);
MarkupToPDF/Controls/Shape/CircleControl.cs
279 279
            get { return (double)GetValue(AngleProperty); }
280 280
            set { SetValue(AngleProperty, value); }
281 281
        }
282
        public double Angle
282
        public double CommentAngle
283 283
        {
284 284
            get { return (double)GetValue(AngleProperty); }
285 285
            set
286 286
            {
287
                if (this.Angle != value)
287
                if (this.CommentAngle != value)
288 288
                {
289 289
                    SetValue(AngleProperty, value);
290 290
                }
......
550 550
                STemp.TRP = this.TopRightPoint;
551 551
                STemp.LBP = this.LeftBottomPoint;
552 552
                STemp.Opac = this.Opacity;
553
                STemp.Angle = this.Angle;
553
                STemp.Angle = this.CommentAngle;
554 554
                STemp.PointSet = this.PointSet;
555 555
                STemp.DashSize = this.DashSize;
556 556
                STemp.Name = this.GetType().Name.ToString();
......
581 581
                    LeftBottomPoint = s.LBP,
582 582
                    TopRightPoint = s.TRP,
583 583
                    Opacity = s.Opac,
584
                    Angle = s.Angle,
584
                    CommentAngle = s.Angle,
585 585
                    DashSize = s.DashSize,
586 586
                    PointSet = s.PointSet,
587 587
                    StrokeColor = brush,
MarkupToPDF/Controls/Shape/RectCloudControl.cs
297 297
            get { return _fill; }
298 298
            set { _fill = value; }
299 299
        }
300
        public double Angle
300
        public double CommentAngle
301 301
        {
302 302
            get { return (double)GetValue(AngleProperty); }
303 303
            set
304 304
            {
305
                if (this.Angle != value)
305
                if (this.CommentAngle != value)
306 306
                {
307 307
                    SetValue(AngleProperty, value);
308 308
                }
MarkupToPDF/Controls/Shape/RectangleControl.cs
262 262
            }
263 263
        }
264 264

  
265
        public double Angle
265
        public double CommentAngle
266 266
        {
267 267
            get { return (double)GetValue(AngleProperty); }
268 268
            set
269 269
            {
270
                if (this.Angle != value)
270
                if (this.CommentAngle != value)
271 271
                {
272 272
                    SetValue(AngleProperty, value);
273 273
                }
......
683 683
                    Paint = s.PaintState,
684 684
                    StartPoint = s.StartPoint,
685 685
                    EndPoint = s.EndPoint,
686
                    Angle = s.Angle,
686
                    CommentAngle = s.Angle,
687 687
                    StrokeColor = brush,
688 688
                    DashSize = s.DashSize,
689 689
                    Opacity = s.Opac,
MarkupToPDF/Controls/Shape/TriControl.cs
267 267
        }
268 268

  
269 269

  
270
        public double Angle
270
        public double CommentAngle
271 271
        {
272 272
            get { return (double)GetValue(AngleProperty); }
273 273
            set
274 274
            {
275
                if (this.Angle != value)
275
                if (this.CommentAngle != value)
276 276
                {
277 277
                    SetValue(AngleProperty, value);
278 278
                }
......
505 505
                STemp.Opac = this.Opacity;
506 506
                STemp.UserID = this.UserID;
507 507
                STemp.PointSet = this.PointSet;
508
                STemp.Angle = this.Angle;
508
                STemp.Angle = this.CommentAngle;
509 509
                STemp.DashSize = this.DashSize;
510 510
                STemp.Name = this.GetType().Name.ToString();
511 511
                ///강인구 추가(2017.11.02)
......
534 534
                    Paint = s.Paint,
535 535
                    EndPoint = s.EndPoint,
536 536
                    Opacity = s.Opac,
537
                    Angle = s.Angle,
537
                    CommentAngle = s.Angle,
538 538
                    DashSize = s.DashSize,
539 539
                    PointSet = s.PointSet,
540 540
                    StrokeColor = brush,
MarkupToPDF/Controls/Text/ArrowTextControl.cs
76 76
            Base_TextBox.GotFocus += new RoutedEventHandler(Base_TextBox_GotFocus);
77 77
            Base_TextBox.LostFocus += new RoutedEventHandler(Base_TextBox_LostFocus);
78 78
            Base_TextBox.SelectionChanged += (sender, e) => MoveCustomCaret();
79

  
79
            this.KeyDown += ArrowTextControl_KeyDown;
80 80
            SetArrowTextPath();
81 81
            Base_TextBox.IsTabStop = true;
82 82
        }
83 83

  
84
        private void ArrowTextControl_KeyDown(object sender, System.Windows.Input.KeyEventArgs e)
85
        {
86
           if(e.Key == System.Windows.Input.Key.Escape)
87
            {
88
                if(string.IsNullOrEmpty(Base_TextBox.Text))
89
                {
90
                    this.Visibility = Visibility.Collapsed;
91
                }
92

  
93
                EditEnd();
94
            }
95
        }
96

  
84 97
        public void SetFontFamily(FontFamily fontFamily)
85 98
        {
86 99
            this.FontFamily = fontFamily;
......
94 107
        {
95 108
            var caretLocation = this.Base_TextBox.GetRectFromCharacterIndex(this.Base_TextBox.CaretIndex).Location;
96 109

  
110
            var angle = Math.Abs(this.PageAngle);
111
            //angle = 0;
112
            System.Diagnostics.Debug.WriteLine("Page Angle : " +  this.PageAngle);
113

  
97 114
            if (!double.IsInfinity(caretLocation.X))
98 115
            {
99
                if (Math.Abs(this.Angle) == 90)
116
                if (angle == 90)
100 117
                {
101 118
                    Canvas.SetLeft(this.BaseTextbox_Caret, this.EndPoint.X + caretLocation.Y);
102 119
                }
103
                else if (Math.Abs(this.Angle) == 180)
120
                else if (angle == 180)
104 121
                {
105 122
                    
106 123
                    Canvas.SetLeft(this.BaseTextbox_Caret, (this.EndPoint.X+ this.Base_TextBox.ActualWidth) - caretLocation.X) ;
107
                }
108
                else if (Math.Abs(this.Angle) == 270)
124
                    System.Diagnostics.Debug.WriteLine("Caret X : " + ((this.EndPoint.X + this.Base_TextBox.ActualWidth) - caretLocation.X));
125
                } 
126
                else if (angle == 270)
109 127
                {
110 128
                    Canvas.SetLeft(this.BaseTextbox_Caret, (this.EndPoint.X) - caretLocation.Y);
111 129
                }
112 130
                else
113 131
                {
132
                    System.Diagnostics.Debug.WriteLine("Caret X : " + (this.EndPoint.X - caretLocation.X));
114 133
                    Canvas.SetLeft(this.BaseTextbox_Caret, this.EndPoint.X + caretLocation.X);
115
                }
134
                } 
116 135
            }
117 136

  
118 137
            if (!double.IsInfinity(caretLocation.Y))
119 138
            {
120
                if (Math.Abs(this.Angle) == 90)
139
                if (angle == 90)
121 140
                {
122 141
                    Canvas.SetTop(this.BaseTextbox_Caret, this.EndPoint.Y - caretLocation.X);
123 142
                }
124
                else if (Math.Abs(this.Angle) == 180)
143
                else if (angle == 180)
125 144
                {//보정치40
126 145
                    Canvas.SetTop(this.BaseTextbox_Caret, ((this.EndPoint.Y -40) + this.Base_TextBox.ActualHeight)- caretLocation.Y );
146
                    System.Diagnostics.Debug.WriteLine("Caret Y : " + (((this.EndPoint.Y - 40) + this.Base_TextBox.ActualHeight) - caretLocation.Y));
127 147
                }
128
                else if (Math.Abs(this.Angle) == 270)
148
                else if (angle == 270)
129 149
                {
130 150
                    Canvas.SetTop(this.BaseTextbox_Caret, (this.EndPoint.Y) + caretLocation.X);
131 151
                }
132 152
                else
133 153
                {
134
                    Canvas.SetTop(this.BaseTextbox_Caret, this.EndPoint.Y + caretLocation.Y);
154
                    Canvas.SetTop(this.BaseTextbox_Caret, this.EndPoint.Y  + caretLocation.Y);
155
                    System.Diagnostics.Debug.WriteLine("Caret Y : " + (this.EndPoint.Y + caretLocation.Y - BaseTextbox_Caret.ActualHeight));
135 156
                }
136 157
            }
137 158
        }
......
143 164

  
144 165
            if (!double.IsInfinity(caretLocation.X))
145 166
            {
146
                if (Math.Abs(this.Angle) == 90)
167
                if (Math.Abs(this.PageAngle) == 90)
147 168
                {
148 169
                    Canvas.SetLeft(this.BaseTextbox_Caret, point.X + caretLocation.Y);
149 170
                }
150
                else if (Math.Abs(this.Angle) == 180)
171
                else if (Math.Abs(this.PageAngle) == 180)
151 172
                {
152 173

  
153 174
                    Canvas.SetLeft(this.BaseTextbox_Caret, (point.X + this.Base_TextBox.ActualWidth) - caretLocation.X);
154 175
                }
155
                else if (Math.Abs(this.Angle) == 270)
176
                else if (Math.Abs(this.PageAngle) == 270)
156 177
                {
157 178
                    Canvas.SetLeft(this.BaseTextbox_Caret, (point.X) - caretLocation.Y);
158 179
                }
......
164 185

  
165 186
            if (!double.IsInfinity(caretLocation.Y))
166 187
            {
167
                if (Math.Abs(this.Angle) == 90)
188
                if (Math.Abs(this.PageAngle) == 90)
168 189
                {
169 190
                    Canvas.SetTop(this.BaseTextbox_Caret, point.Y - caretLocation.X);
170 191
                }
171
                else if (Math.Abs(this.Angle) == 180)
192
                else if (Math.Abs(this.PageAngle) == 180)
172 193
                {
173 194
                    Canvas.SetTop(this.BaseTextbox_Caret, (point.Y + this.Base_TextBox.ActualHeight) - caretLocation.Y);
174 195
                }
175
                else if (Math.Abs(this.Angle) == 270)
196
                else if (Math.Abs(this.CommentAngle) == 270)
176 197
                {
177 198
                    Canvas.SetTop(this.BaseTextbox_Caret, (point.Y) + caretLocation.X);
178 199
                }
......
186 207

  
187 208
        void Base_TextBox_LostFocus(object sender, RoutedEventArgs e)
188 209
        {
189
            
210
            EditEnd();
211
        }
212

  
213
        private void EditEnd()
214
        { 
190 215
            this.ArrowText = Base_TextBox.Text;
216
            Base_TextBox.Focusable = false;
191 217
            this.BaseTextbox_Caret.Visibility = Visibility.Collapsed;
192 218
            this.IsEditingMode = false;
193 219
            ApplyOverViewData();
......
196 222
        void Base_TextBox_GotFocus(object sender, RoutedEventArgs e)
197 223
        {
198 224
            this.BaseTextbox_Caret.Visibility = Visibility.Visible;
225
            MoveCustomCaret();
199 226
            this.IsEditingMode = true;
200 227
        }
201 228

  
......
956 983
        {
957 984
            instanceGroup.Children.Clear();
958 985

  
986
            //VisualPageAngle = 0;
987

  
988
            if (Math.Abs(PageAngle).ToString() == "90")
989
            {
990
                VisualPageAngle = 270;
991
            }
992
            else if (Math.Abs(PageAngle).ToString() == "270")
993
            {
994
                VisualPageAngle = 90;
995
            }
996
            else
997
            {
998
                VisualPageAngle = PageAngle;
999
            }
1000

  
959 1001
            connectorSMGeometry.StartPoint = this.StartPoint;
960 1002
            connectorSMGeometry.EndPoint = this.MidPoint;
961 1003
            connectorMEGeometry.StartPoint = this.MidPoint; //핵심
962 1004

  
1005
            /// 텍스트박스의 좌표 설정
963 1006
            Canvas.SetLeft(Base_TextBox, this.EndPoint.X);
964 1007
            Canvas.SetTop(Base_TextBox, this.EndPoint.Y);
965
             
1008
            System.Diagnostics.Debug.WriteLine($"TextBox Set {this.EndPoint.X},{this.EndPoint.Y}");
1009
            
1010

  
966 1011
            List<Point> ps = new List<Point>();
967 1012
            ps.Add(new Point(Canvas.GetLeft(Base_TextBox) + this.BoxWidth / 2, Canvas.GetTop(Base_TextBox))); //상단
968 1013
            ps.Add(new Point(Canvas.GetLeft(Base_TextBox) + this.BoxWidth / 2, Canvas.GetTop(Base_TextBox) + this.BoxHeight)); // 하단
......
971 1016

  
972 1017
            if (isTrans)
973 1018
            {
974
                switch (Math.Abs(this.Angle).ToString())
1019
                switch (Math.Abs(this.PageAngle).ToString())
975 1020
                {
976 1021
                    case "90":
977 1022
                        {
......
1013 1058

  
1014 1059
                //20180911 LJY 꺾이는 부분 수정
1015 1060
                Point testP = endP;                
1016
                switch (Math.Abs(this.Angle).ToString())
1061
                switch (Math.Abs(this.PageAngle).ToString())
1017 1062
                {
1018 1063
                    case "90":
1019 1064
                        testP = new Point(endP.X + 50, endP.Y);
......
1024 1069
                }                
1025 1070

  
1026 1071
                //20180910 LJY 각도에 따라.
1027
                switch (Math.Abs(this.Angle).ToString())
1072
                switch (Math.Abs(this.PageAngle).ToString())
1028 1073
                {
1029 1074
                    case "90":
1030 1075
                        if (isFixed)
......
1115 1160
            }
1116 1161
            else
1117 1162
            {
1118
                switch (Math.Abs(this.Angle).ToString())
1163
                switch (Math.Abs(this.PageAngle).ToString())
1119 1164
                {
1120 1165
                    case "90":
1121 1166
                        {
......
1150 1195
                            ps.Add(new Point(Canvas.GetLeft(Base_TextBox) - this.BoxHeight / 2, Canvas.GetTop(Base_TextBox) + this.BoxWidth)); //오른쪽 중간 
1151 1196
                        }
1152 1197
                        break;
1198
                    //case "180":
1199
                    //    {
1200
                    //        ps.Clear();
1201

  
1202
                    //        ps.Add(new Point(Canvas.GetLeft(Base_TextBox), Canvas.GetTop(Base_TextBox))); //위 왼쪽
1203
                    //        ps.Add(new Point(Canvas.GetLeft(Base_TextBox), Canvas.GetTop(Base_TextBox) + this.BoxWidth / 2)); // 위 중간
1204
                    //        ps.Add(new Point(Canvas.GetLeft(Base_TextBox), Canvas.GetTop(Base_TextBox) + this.BoxWidth)); // 위 오른쪽
1205

  
1206
                    //        ps.Add(new Point(Canvas.GetLeft(Base_TextBox) + this.BoxHeight / 2, Canvas.GetTop(Base_TextBox))); //왼쪽 중간
1207
                    //        ps.Add(new Point(Canvas.GetLeft(Base_TextBox) + this.BoxHeight, Canvas.GetTop(Base_TextBox))); //왼쪽 하단
1208

  
1209
                    //        ps.Add(new Point(Canvas.GetLeft(Base_TextBox) + this.BoxHeight, Canvas.GetTop(Base_TextBox) + this.BoxWidth / 2)); //중간 하단
1210
                    //        ps.Add(new Point(Canvas.GetLeft(Base_TextBox) + this.BoxHeight, Canvas.GetTop(Base_TextBox) + this.BoxWidth)); //오른쪽 하단
1211

  
1212
                    //        ps.Add(new Point(Canvas.GetLeft(Base_TextBox) + this.BoxHeight / 2, Canvas.GetTop(Base_TextBox) + this.BoxWidth)); //오른쪽 중간 
1213
                    //    }
1214
                    //    break;
1153 1215
                    default:
1154 1216
                        break;
1155 1217
                }
......
1163 1225
                Point testP = endP;
1164 1226

  
1165 1227
                //20180910 LJY 각도에 따라.
1166
                switch (Math.Abs(this.Angle).ToString())
1228
                switch (Math.Abs(this.PageAngle).ToString())
1167 1229
                {
1168 1230
                    case "90":
1169 1231
                        if (isFixed)
......
1294 1356
            OverViewEndPoint = connectorMEGeometry.EndPoint;
1295 1357
            OverViewStartPoint = connectorSMGeometry.StartPoint;
1296 1358

  
1297
            var tempAngle = Math.Abs(this.Angle);
1359
            var tempAngle = Math.Abs(this.PageAngle);
1298 1360

  
1299 1361
            if (tempAngle == Convert.ToDouble(90) || tempAngle == Convert.ToDouble(270))
1300 1362
            {
......
1306 1368
                BaseTextbox_Caret.RenderTransformOrigin = new Point(0, 0);
1307 1369
            }
1308 1370

  
1371
            Base_TextBox.RenderTransform = new RotateTransform
1372
            {
1373
                Angle = this.VisualPageAngle,
1374
                CenterX = this.CenterX,
1375
                CenterY = this.CenterY,
1376
            };
1377

  
1378
            System.Diagnostics.Debug.WriteLine($"base TextBox center X : {this.CenterX} Y : {this.CenterY} ");
1379

  
1380
            
1381

  
1309 1382
            Base_ArrowSubPath.RenderTransform = new RotateTransform
1310 1383
            {
1311
                Angle = this.Angle,
1384
                Angle = this.VisualPageAngle,
1312 1385
                CenterX = this.EndPoint.X,
1313 1386
                CenterY = this.EndPoint.Y,
1314 1387
            };
1315
            MoveCustomCaret();
1388

  
1389
            if (BaseTextbox_Caret.Visibility == Visibility.Visible)
1390
            {
1391
                BaseTextbox_Caret.RenderTransform = new RotateTransform
1392
                {
1393
                    Angle = this.VisualPageAngle,
1394
                    CenterX = this.CenterX,
1395
                    CenterY = this.CenterY,
1396
                };
1397

  
1398
                MoveCustomCaret();
1399
            }
1316 1400
        }
1317 1401

  
1318 1402
        private void DrawingCloud()
1319 1403
        {
1320 1404
            //20180906 LJY Textbox guide
1321
            string angle = Math.Abs(this.Angle).ToString();
1405
            string angle = Math.Abs(this.PageAngle).ToString();
... 이 차이점은 표시할 수 있는 최대 줄수를 초과해서 이 차이점은 잘렸습니다.

내보내기 Unified diff

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