프로젝트

일반

사용자정보

개정판 71d7e0bf

ID71d7e0bffabbd2909ed9ae5e0ec3bd48a6ab5501
상위 a715d06e
하위 eb4e5fba

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

issue #000 TextControl Gotfocus 받을 때 TextBox가 EditMode가 안되는 현상 해결.
ArrowTextControl과 TextControl에 있는 IsEditing 속성 및 의존속성을 제거 이유는 EnableEditing과 동일한 역할을 하고 있기 때문에 필요없다.

Change-Id: Ic4452154655c07eaf5730a0dcebdb255237851ee

차이점 보기:

KCOM/Views/MainMenu.xaml.cs
2953 2953
                {
2954 2954
                    (text_item_ as TextControl).Base_TextBlock.Visibility = Visibility.Visible;
2955 2955
                    (text_item_ as TextControl).Base_TextBox.Visibility = Visibility.Collapsed;
2956
                    (text_item_ as TextControl).IsEditing = false;
2957 2956
                    (text_item_ as TextControl).EnableEditing = false;
2958 2957
                    currentControl = null;
2959 2958
                }
......
3110 3109

  
3111 3110
                        if ((control as TextControl) != null)
3112 3111
                        {
3112
                            if(!((control as TextControl).EnableEditing)) {
3113
                                (control as TextControl).EnableEditing = true;
3114
                            }
3115

  
3113 3116
                            if ((control as TextControl).TextStyle == FontStyles.Italic)
3114 3117
                            {
3115 3118
                                ViewerDataModel.Instance.checkTextStyle = true;
......
3149 3152
                        }
3150 3153
                        else if ((control as ArrowTextControl) != null)
3151 3154
                        {
3155
                            if (!((control as ArrowTextControl).EnableEditing)){
3156
                                (control as ArrowTextControl).EnableEditing = true;
3157
                            }
3152 3158
                            if ((control as ArrowTextControl).TextStyle == FontStyles.Italic)
3153 3159
                            {
3154 3160
                                ViewerDataModel.Instance.checkTextStyle = true;
......
4218 4224
                                    CreateCommand.Instance.Execute(currentControl);
4219 4225

  
4220 4226
                                    (currentControl as ArrowTextControl).Base_TextBox.IsHitTestVisible = false;
4221
                                    (currentControl as ArrowTextControl).IsEditing = false;
4222 4227
                                    (currentControl as ArrowTextControl).EnableEditing = false;
4223 4228
                                    (currentControl as ArrowTextControl).IsNew = false;
4224 4229
                                    currentControl = null;
MarkupToPDF/Controls/Text/ArrowTextControl.cs
73 73
        void Base_TextBox_LostFocus(object sender, RoutedEventArgs e)
74 74
        {
75 75
            this.ArrowText = Base_TextBox.Text;
76

  
77 76
            this.IsEditingMode = false;
78

  
79 77
            ApplyOverViewData();
80 78
        }
81 79

  
......
542 540

  
543 541

  
544 542
        //강인구 추가 주석풀기
545
        public bool IsEditing
546
        {
547
            get { return (bool)GetValue(IsEditingProperty); }
548
            set
549
            {
550
                if (this.IsEditing != value)
551
                {
552
                    SetValue(IsEditingProperty, value);
553

  
554
                    OnPropertyChanged("IsEditing");
555

  
556
                }
557
            }
558
        }
543
       
559 544

  
560 545
        public bool EnableEditing
561 546
        {
......
700 685
        public static readonly DependencyProperty TextBlockVisibilityProperty = DependencyProperty.Register(
701 686
            "TextBlockVisibility", typeof(Visibility), typeof(ArrowTextControl), new PropertyMetadata((Visibility.Collapsed), OnTextBlockVisibilityChanged));
702 687

  
703
        public static readonly DependencyProperty IsEditingProperty = DependencyProperty.Register(
704
            "IsEditing", typeof(bool), typeof(ArrowTextControl), new PropertyMetadata((false), new PropertyChangedCallback(OnIsEditingChanged)));
705

  
706 688
        public static readonly DependencyProperty EnableEditingProperty = DependencyProperty.Register(
707
           "EnableEditing", typeof(bool), typeof(ArrowTextControl), new PropertyMetadata((true)));
689
           "EnableEditing", typeof(bool), typeof(ArrowTextControl), new PropertyMetadata((true), new PropertyChangedCallback(OnIsEditingChanged)));
708 690

  
709 691
        #endregion
710 692

  
......
723 705

  
724 706
                if (instance.EnableEditing)
725 707
                {
726
                    if (instance.IsEditing)
727
                    {
728
                        instance.EditingMode();
729
                    }
730
                    else
731
                    {
732
                        instance.UnEditingMode();
733
                    }
708
                    instance.EditingMode();
734 709
                }
735 710
                else
736 711
                {
MarkupToPDF/Controls/Text/TextControl.cs
139 139
        {
140 140
            if (EnableEditing)
141 141
            {
142
                IsEditing = true;
143 142
                EditingMode();
144 143
            }
145 144
            else
146 145
            {
147
                IsEditing = false;
148 146
                UnEditingMode();
149 147
            }
150 148
        }
151 149

  
152 150
        void TextControl_LostFocus(object sender, RoutedEventArgs e)
153 151
        {
154
            IsEditing = false;
155 152
            UnEditingMode();
156 153
            ApplyOverViewData();
157 154
        }
......
522 519
        public static readonly DependencyProperty AngleProperty = DependencyProperty.Register(
523 520
            "Angle", typeof(double), typeof(TextControl), new PropertyMetadata((double)0.0, new PropertyChangedCallback(AngleValueChanged)));
524 521

  
525
        public static readonly DependencyProperty IsEditingProperty = DependencyProperty.Register(
526
           "IsEditing", typeof(bool), typeof(TextControl), new PropertyMetadata((false), new PropertyChangedCallback(OnIsEditingChanged)));
527

  
528 522
        public static readonly DependencyProperty EnableEditingProperty = DependencyProperty.Register(
529
           "EnableEditing", typeof(bool), typeof(TextControl), new PropertyMetadata((true)));
523
           "EnableEditing", typeof(bool), typeof(TextControl), new PropertyMetadata((true), new PropertyChangedCallback(OnIsEditingChanged)));
530 524

  
531 525
        public static readonly DependencyProperty TextBoxVisibilityProperty = DependencyProperty.Register(
532 526
        "TextBoxVisibility", typeof(Visibility), typeof(TextControl), new PropertyMetadata((Visibility.Visible), OnTextBoxVisibilityChanged));
......
551 545
            }
552 546
        }
553 547

  
554
        public bool IsEditing
555
        {
556
            get { return (bool)GetValue(IsEditingProperty); }
557
            set
558
            {
559
                if (this.IsEditing != value)
560
                {
561
                    SetValue(IsEditingProperty, value);
562

  
563
                    OnPropertyChanged("IsEditing");
564

  
565
                }
566
            }
567
        }
548
      
568 549

  
569 550
        public bool EnableEditing
570 551
        {
......
1097 1078

  
1098 1079
                if (instance.EnableEditing)
1099 1080
                {
1100
                    if (instance.IsEditing)
1101
                    {
1102
                        instance.EditingMode();
1103
                    }
1104
                    else
1105
                    {
1106
                        instance.UnEditingMode();
1107
                    }
1081
                    instance.EditingMode();
1108 1082
                }
1109 1083
                else
1110 1084
                {

내보내기 Unified diff

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