프로젝트

일반

사용자정보

개정판 55d4f382

ID55d4f382d250c7a472645c43aa5f5d0946b2f682
상위 ed3740c4
하위 56c8050e

송근호이(가) 5년 이상 전에 추가함

issue #923
1.TextControl, ArrowTextControl에 SetFontFamily 함수를 만들고, 선택된 아이템에 대해서 TopMenu에 Font가 바뀌면 SetFontFamily을 호출하여 각 컨트롤마다 폰트를 바뀌게한다.
2.TextControl, ArrowTextControl을 생성할 때 SetFontFamily 함수를 호출하여 컨트롤에 Font를 Apply한다.

Change-Id: I242c6ba4db930307f06890a82ebf272c7dbf0bdc

차이점 보기:

KCOM/Events/Implementation/TopMenuEvent.cs
1126 1126
                                        {
1127 1127
                                            //if ((InnerItem.DrawingData as MarkupToPDF.Controls.Text.TextControl).FontFamily == TextDecorations.Underline)
1128 1128
                                            //{
1129
                                            (InnerItem.DrawingData as MarkupToPDF.Controls.Text.TextControl).FontFamily = new FontFamily(comboFontFamily.Text);
1130
                                            (InnerItem.DrawingData as MarkupToPDF.Controls.Text.TextControl).Base_TextBlock.FontFamily = new FontFamily(comboFontFamily.Text);
1131
                                            (InnerItem.DrawingData as MarkupToPDF.Controls.Text.TextControl).Base_TextBox.FontFamily = new FontFamily(comboFontFamily.Text);
1129
                                            (InnerItem.DrawingData as MarkupToPDF.Controls.Text.TextControl).SetFontFamily(new FontFamily(comboFontFamily.Text));
1130
                                            //(InnerItem.DrawingData as MarkupToPDF.Controls.Text.TextControl).Base_TextBlock.FontFamily = new FontFamily(comboFontFamily.Text);
1131
                                            //(InnerItem.DrawingData as MarkupToPDF.Controls.Text.TextControl).Base_TextBox.FontFamily = new FontFamily(comboFontFamily.Text);
1132
                                            //(InnerItem.DrawingData as MarkupToPDF.Controls.Text.TextControl).TextFamily = new FontFamily(comboFontFamily.Text);
1132 1133
                                            //}
1133 1134
                                            //else
1134 1135
                                            //{
......
1138 1139
                                        break;
1139 1140
                                    case ("ArrowTextControl"):
1140 1141
                                        {
1142
                                            (InnerItem.DrawingData as MarkupToPDF.Controls.Text.ArrowTextControl).SetFontFamily(new FontFamily(comboFontFamily.Text));
1141 1143
                                            //if ((InnerItem.DrawingData as MarkupToPDF.Controls.Text.ArrowTextControl).UnderLine == TextDecorations.Underline)
1142 1144
                                            //{
1143 1145
                                            //    (InnerItem.DrawingData as MarkupToPDF.Controls.Text.ArrowTextControl).UnderLine = null;
KCOM/Views/MainMenu.xaml.cs
3265 3265
                                    (currentControl as TextControl).IsHighLight = ViewerDataModel.Instance.checkHighShape;
3266 3266
                                    (currentControl as TextControl).ApplyTemplate();
3267 3267
                                    (currentControl as TextControl).Base_TextBox.Focus();
3268

  
3268
                                    (currentControl as TextControl).SetFontFamily(new FontFamily(this.ParentOfType<MainWindow>().dzTopMenu.comboFontFamily.Text));
3269 3269
                                    CreateCommand.Instance.Execute(currentControl);
3270 3270
                                }
3271 3271
                            }
......
3296 3296
                                    (currentControl as TextControl).IsHighLight = ViewerDataModel.Instance.checkHighShape;
3297 3297
                                    (currentControl as TextControl).ApplyTemplate();
3298 3298
                                    (currentControl as TextControl).Base_TextBox.Focus();
3299
                                    (currentControl as TextControl).SetFontFamily(new FontFamily(this.ParentOfType<MainWindow>().dzTopMenu.comboFontFamily.Text));
3299 3300
                                    CreateCommand.Instance.Execute(currentControl);
3300 3301
                                }
3301 3302
                            }
......
3328 3329
                                    (currentControl as TextControl).ApplyTemplate();
3329 3330
                                    (currentControl as TextControl).Base_TextBox.Focus();
3330 3331
                                    CreateCommand.Instance.Execute(currentControl);
3332
                                    (currentControl as TextControl).SetFontFamily(new FontFamily(this.ParentOfType<MainWindow>().dzTopMenu.comboFontFamily.Text));
3331 3333
                                    //currentControl = null;
3332 3334
                                }
3333 3335
                            }
......
3373 3375

  
3374 3376
                                        (currentControl as ArrowTextControl).ApplyTemplate();
3375 3377
                                        (currentControl as ArrowTextControl).Base_TextBox.Focus();
3378
                                        (currentControl as ArrowTextControl).SetFontFamily(new FontFamily(this.ParentOfType<MainWindow>().dzTopMenu.comboFontFamily.Text));
3376 3379
                                        this.MainAngle.Visibility = Visibility.Visible;
3377 3380

  
3378 3381
                                    
......
3394 3397
                                    }
3395 3398

  
3396 3399
                                    CreateCommand.Instance.Execute(currentControl);
3400

  
3397 3401
                                    (currentControl as ArrowTextControl).Base_TextBox.IsHitTestVisible = false;
3402
                                    
3398 3403
                                    currentControl.IsNew = false;
3399 3404
                                    currentControl = null;
3400 3405
                                    this.MainAngle.Visibility = Visibility.Collapsed;
......
3424 3429
                                    (currentControl as ArrowTextControl).ApplyTemplate();
3425 3430
                                    (currentControl as ArrowTextControl).Base_TextBox.Focus();
3426 3431
                                    (currentControl as ArrowTextControl).isTrans = true;
3432
                                    (currentControl as ArrowTextControl).SetFontFamily(new FontFamily(this.ParentOfType<MainWindow>().dzTopMenu.comboFontFamily.Text));
3427 3433
                                }
3428 3434
                            }
3429 3435
                        }
......
3466 3472
                                        currentControl.SetValue(ArrowTextControl.EndPointProperty, canvasDrawingMouseDownPoint);
3467 3473
                                        (currentControl as ArrowTextControl).isHighLight = ViewerDataModel.Instance.checkHighShape;
3468 3474
                                        (currentControl as ArrowTextControl).TextSize = ViewerDataModel.Instance.TextSize;
3469

  
3475
                                        (currentControl as ArrowTextControl).SetFontFamily(new FontFamily(this.ParentOfType<MainWindow>().dzTopMenu.comboFontFamily.Text));
3470 3476
                                        //20180903 LJY 회전된 방향으로 화면에 출력되지 않는 문제 수정 
3471 3477
                                        (currentControl as ArrowTextControl).Angle -= rotate.Angle;
3472 3478
                                        (currentControl as ArrowTextControl).ApplyTemplate();
......
3492 3498
                                    (currentControl as ArrowTextControl).Base_TextBox.IsHitTestVisible = false;
3493 3499
                                    currentControl.IsNew = false;
3494 3500
                                    currentControl = null;
3501

  
3495 3502
                                    this.MainAngle.Visibility = Visibility.Collapsed;
3496 3503
                                }
3497 3504
                                else
......
3522 3529
                                        //20180903 LJY 회전된 방향으로 화면에 출력되지 않는 문제 수정  
3523 3530
                                        (currentControl as ArrowTextControl).Angle -= rotate.Angle;
3524 3531
                                        (currentControl as ArrowTextControl).ApplyTemplate();
3525

  
3532
                                        (currentControl as ArrowTextControl).SetFontFamily(new FontFamily(this.ParentOfType<MainWindow>().dzTopMenu.comboFontFamily.Text));
3526 3533
                                        (currentControl as ArrowTextControl).Base_TextBox.Focus();                                 
3527 3534
                                        this.MainAngle.Visibility = Visibility.Visible;
3528 3535
                                    
......
3570 3577
                                        currentControl.SetValue(ArrowTextControl.EndPointProperty, canvasDrawingMouseDownPoint);                                 
3571 3578
                                        (currentControl as ArrowTextControl).TextSize = ViewerDataModel.Instance.TextSize;
3572 3579
                                        (currentControl as ArrowTextControl).isHighLight = ViewerDataModel.Instance.checkHighShape;
3573

  
3580
                                        (currentControl as ArrowTextControl).SetFontFamily(new FontFamily(this.ParentOfType<MainWindow>().dzTopMenu.comboFontFamily.Text));
3574 3581
                                        //20180903 LJY 회전된 방향으로 화면에 출력되지 않는 문제 수정  
3575 3582
                                        (currentControl as ArrowTextControl).Angle -= rotate.Angle;
3576 3583
                                    
......
3623 3630

  
3624 3631
                                        //20180903 LJY 회전된 방향으로 화면에 출력되지 않는 문제 수정 
3625 3632
                                        (currentControl as ArrowTextControl).Angle -= rotate.Angle;
3626

  
3633
                                        (currentControl as ArrowTextControl).SetFontFamily(new FontFamily(this.ParentOfType<MainWindow>().dzTopMenu.comboFontFamily.Text));
3627 3634
                                        (currentControl as ArrowTextControl).ApplyTemplate();
3628 3635
                                        (currentControl as ArrowTextControl).Base_TextBox.Focus();
3629 3636
                                        this.MainAngle.Visibility = Visibility.Visible;  
MarkupToPDF/Controls/Text/ArrowTextControl.cs
81 81
            Base_TextBox.IsTabStop = true;
82 82
        }
83 83

  
84
        public void SetFontFamily(FontFamily fontFamily)
85
        {
86
            this.FontFamily = fontFamily;
87
            this.TextFamily = fontFamily;
88
        }
89

  
84 90
        /// <summary>
85 91
        /// Moves the custom caret on the canvas.
86 92
        /// </summary>
MarkupToPDF/Controls/Text/TextControl.cs
102 102
            
103 103
            SetText();
104 104
            DrawingCloud();
105

  
106

  
107

  
108 105
        }
109 106

  
110
        
107
        public void SetFontFamily(FontFamily fontFamily)
108
        {
109
            
110
            if (this.Base_TextBlock != null) {
111
                this.Base_TextBlock.FontFamily = fontFamily;
112
            }
111 113

  
114
            if (this.Base_TextBox != null) {
115
                this.Base_TextBox.FontFamily = fontFamily;
116
            }
117
            this.FontFamily = fontFamily;
118
            this.TextFamily = fontFamily;
119
        }
112 120

  
113 121

  
114 122
        /// <summary>
......
1286 1294
                    Angle = s.Angle,
1287 1295
                    PointSet = s.PointSet,
1288 1296
                    Opacity = s.Opac,
1297
                    
1289 1298
                    TextFamily = new FontFamily(s.fontConfig[0]),
1290 1299
                    //인구 추가(2018.04.17)
1291 1300
                    TextStyle = StringToFont.ConFontStyle(s.fontConfig[1]),

내보내기 Unified diff

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