프로젝트

일반

사용자정보

통계
| 브랜치(Branch): | 개정판:

markus / KCOM / Events / Property / EventProperty.cs @ 285635d3

이력 | 보기 | 이력해설 | 다운로드 (5.75 KB)

1 787a4489 KangIngu
using System;
2
using System.Collections.Generic;
3
using System.ComponentModel;
4
using System.Linq;
5
using System.Text;
6
using System.Windows.Controls;
7
using Telerik.Windows.Controls;
8
9
namespace KCOM.Views
10
{
11
    public partial class TopMenu : UserControl, INotifyPropertyChanged
12
    {
13
        public enum ControlType { None, Line, Arrow, Shape, Polygon, Arc, Text, Ink, Etc, ArrowText, ArrowMulti, Date, Symbol, Select };
14
        public event PropertyChangedEventHandler PropertyChanged;
15
        protected void RaisePropertyChanged(string propName)
16
        {
17
            if (PropertyChanged != null)
18
                PropertyChanged(this, new PropertyChangedEventArgs(propName));
19
        }
20
        public void HiddenControlHide()
21
        {
22
            //HiddenInterval.Visibility = Visibility.Collapsed;
23
            //HiddenAxisLock.Visibility = Visibility.Collapsed;
24
            //HiddenDimSize.Visibility = Visibility.Collapsed;
25
        }
26
27
        public void Release_ToggleButton(object sender)
28
        {
29
            var instanceCenter = this.ParentOfType<MainWindow>().dzMainMenu;
30
            HiddenControlHide();
31
32
            if (sender.GetType().Name == "RadToggleButton")
33
            {
34
35
                var instance = sender as RadToggleButton;
36
                var toggleList = this.Parent.ChildrenOfType<RadToggleButton>();
37
38
                var toggleList2 = this.Parent.ChildrenOfType<RadRibbonToggleButton>();
39
40
                //var instance = sender as RadToggleButton;
41
                //var toggleList = this.Parent.ChildrenOfType<RadToggleButton>();
42
                if (instance.IsChecked.Value)
43
                {
44
                    foreach (var item in toggleList)
45
                    {
46
                        if (item.Name == "btnSwing" || item.Name == "btnBold" || item.Name == "btnItalic" || item.Name == "btnUnderLine" || item.Name == "btnSmooth" || item.Name == "btnSpeed")
47
                        {
48
49
                        }
50
                        else
51
                        {
52
                            item.IsChecked = false;
53
                        }
54
                    }
55
56
                    foreach (var item in toggleList2)
57
                    {
58
                        item.IsChecked = false;
59
                    }
60
61
                    instance.IsChecked = true;
62
                    //instanceCenter.DeepLayer.Drawing = true;
63
                    Common.ViewerDataModel.Instance.ControlTag = instance.Tag.ToString();
64
                }
65
                else
66
                {
67
                    Common.ViewerDataModel.Instance.SelectedControl = "";
68
                    //Common.ViewerDataModel.Instance.Drawing = false;
69
                    //instanceCenter.DeepLayer.SelectedControl = null;
70
                    Common.ViewerDataModel.Instance.ControlTag = null;
71
                }
72
            }
73
            else if (sender.GetType().Name == "RadRibbonToggleButton")
74
            {
75
                var instance = sender as RadRibbonToggleButton;
76
                var toggleList = this.Parent.ChildrenOfType<RadRibbonToggleButton>();
77
78
                //var instance = sender as RadToggleButton;
79
                var toggleList2 = this.Parent.ChildrenOfType<RadToggleButton>();
80
                if (instance.IsChecked.Value)
81
                {
82
                    foreach (var item in toggleList)
83
                    {
84
                        if (item.Name == "btnSwing" || item.Name == "btnBold" || item.Name == "btnItalic" || item.Name == "btnUnderLine" || item.Name == "btnSmooth" || item.Name == "btnSpeed")
85
                        {
86
87
                        }
88
                        else
89
                        {
90
                            item.IsChecked = false;
91
                        }
92
                    }
93
94
                    foreach (var item in toggleList2)
95
                    {
96
                        item.IsChecked = false;
97
                    }
98
                    instance.IsChecked = true;
99
                    //instanceCenter.DeepLayer.Drawing = true;
100
                    Common.ViewerDataModel.Instance.ControlTag = instance.Tag.ToString();
101
                }
102
                else
103
                {
104
                    Common.ViewerDataModel.Instance.SelectedControl = "";
105
                    //instanceCenter.DeepLayer.Drawing = false;
106
                    //instanceCenter.DeepLayer.SelectedControl = null;
107
                    Common.ViewerDataModel.Instance.ControlTag = null;
108
                }
109
            }
110
        }
111
    }
112
113
    public partial class MainMenu : UserControl, INotifyPropertyChanged
114
    {
115
        protected void RaisePropertyChanged(string propName)
116
        {
117
            if (PropertyChanged != null)
118
                PropertyChanged(this, new PropertyChangedEventArgs(propName));
119
        }
120
121
        private bool _IsSwingMode { get; set; }
122
        public bool IsSwingMode
123
        {
124
            get
125
            {
126
                return _IsSwingMode;
127
            }
128
            set
129
            {
130
                _IsSwingMode = value;
131
                RaisePropertyChanged("IsSwingMode");
132
            }
133
        }
134
135
        //private List<DeepView.ServiceDeepView.ServiceDeepViewTextData> _SearchDataSet { get; set; }
136
        //public List<DeepView.ServiceDeepView.ServiceDeepViewTextData> SearchDataSet
137
        //{
138
        //    get
139
        //    {
140
        //        return _SearchDataSet;
141
        //    }
142
        //    set
143
        //    {
144
        //        _SearchDataSet = value;
145
        //        OnPropertyChanged("SearchDataSet");
146
        //    }
147
        //}
148
149
        private bool _IsFreeSelectionMode { get; set; }
150
        public bool IsFreeSelectionMode
151
        {
152
            get
153
            {
154
                return _IsFreeSelectionMode;
155
            }
156
            set
157
            {
158
                _IsFreeSelectionMode = value;
159
                RaisePropertyChanged("IsFreeSelectionMode");
160
            }
161
        }
162
    }
163
}
클립보드 이미지 추가 (최대 크기: 500 MB)