-
Notifications
You must be signed in to change notification settings - Fork 2
/
Settings.cs
232 lines (216 loc) · 8.62 KB
/
Settings.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
using ASCompletion.Settings;
using NavigationBar.Localization;
using System;
using System.ComponentModel;
namespace NavigationBar
{
public delegate void SettingsChangesEvent();
[Serializable]
public class Settings
{
[field: NonSerialized]
public event SettingsChangesEvent OnSettingsChanged;
private const bool DEFAULT_SHOW_NAVIGATION_TOOLBAR = false;
private const bool DEFAULT_SHOW_IMPORTED_CLASSES = false;
private const bool DEFAULT_SHOW_SUPER_CLASSES = false;
private const bool DEFAULT_SHOW_INHERITED_MEMBERS = false;
private const bool DEFAULT_SHOW_QUALIFIED_CLASS_NAME = true;
private const bool DEFAULT_LABEL_PROPERTIES_LIKE_FUNCTIONS = false;
private const bool DEFAULT_IGNORE_UNDERSCORE = false;
private const OutlineSorting DEFAULT_MEMBER_SORT_METHOD = OutlineSorting.Sorted;
private const bool DEFAULT_DROPDOWN_MULTIKEY_SEARCH_ENABLED = true;
private const int DEFAULT_DROPDOWN_MULTIKEY_SEARCH_TIMER = 1000;
private const bool DEFAULT_DROPDOWN_FULLWORD_SEARCH_ENABLED = true;
private bool _showNavigationToolbar = DEFAULT_SHOW_NAVIGATION_TOOLBAR;
private bool _showImportedClasses = DEFAULT_SHOW_IMPORTED_CLASSES;
private bool _showSuperClasses = DEFAULT_SHOW_SUPER_CLASSES;
private bool _showInheritedMembers = DEFAULT_SHOW_INHERITED_MEMBERS;
private bool _showQualifiedClassName = DEFAULT_SHOW_QUALIFIED_CLASS_NAME;
private bool _labelPropertiesLikeFunctions = DEFAULT_LABEL_PROPERTIES_LIKE_FUNCTIONS;
private bool _ignoreUnderscore = DEFAULT_IGNORE_UNDERSCORE;
private OutlineSorting _memberSortMethod = DEFAULT_MEMBER_SORT_METHOD;
private bool _dropDownMultiKeySearchEnabled = false;
private int _dropDownMultiKeySearchTimer = 0;
private bool _dropDownFullWordSearchEnabled = false;
[LocalizedCategory("NavigationBar.Category.Visibility")]
[LocalizedDisplayName("NavigationBar.Label.ShowNavigationToolbar")]
[LocalizedDescription("NavigationBar.Description.ShowNavigationToolbar")]
[DefaultValue(DEFAULT_SHOW_NAVIGATION_TOOLBAR)]
public bool ShowNavigationToolbar
{
get { return _showNavigationToolbar; }
set
{
if (_showNavigationToolbar != value)
{
_showNavigationToolbar = value;
FireChanged();
}
}
}
[LocalizedCategory("NavigationBar.Category.Visibility")]
[LocalizedDisplayName("NavigationBar.Label.ShowImportedClasses")]
[LocalizedDescription("NavigationBar.Description.ShowImportedClasses")]
[DefaultValue(DEFAULT_SHOW_IMPORTED_CLASSES)]
public bool ShowImportedClasses
{
get { return _showImportedClasses; }
set
{
if (_showImportedClasses != value)
{
_showImportedClasses = value;
FireChanged();
}
}
}
[LocalizedCategory("NavigationBar.Category.Visibility")]
[LocalizedDisplayName("NavigationBar.Label.ShowSuperClasses")]
[LocalizedDescription("NavigationBar.Description.ShowSuperClasses")]
[DefaultValue(DEFAULT_SHOW_SUPER_CLASSES)]
public bool ShowSuperClasses
{
get { return _showSuperClasses; }
set
{
if (_showSuperClasses != value)
{
_showSuperClasses = value;
FireChanged();
}
}
}
[LocalizedCategory("NavigationBar.Category.Visibility")]
[LocalizedDisplayName("NavigationBar.Label.ShowInheritedMembers")]
[LocalizedDescription("NavigationBar.Description.ShowInheritedMembers")]
[DefaultValue(DEFAULT_SHOW_INHERITED_MEMBERS)]
public bool ShowInheritedMembers
{
get { return _showInheritedMembers; }
set
{
if (_showInheritedMembers != value)
{
_showInheritedMembers = value;
FireChanged();
}
}
}
[LocalizedCategory("NavigationBar.Category.Labeling")]
[LocalizedDisplayName("NavigationBar.Label.ShowQualifiedClassNames")]
[LocalizedDescription("NavigationBar.Description.ShowQualifiedClassNames")]
[DefaultValue(DEFAULT_SHOW_QUALIFIED_CLASS_NAME)]
public bool ShowQualifiedClassName
{
get { return _showQualifiedClassName; }
set
{
if (_showQualifiedClassName != value)
{
_showQualifiedClassName = value;
FireChanged();
}
}
}
[LocalizedCategory("NavigationBar.Category.Labeling")]
[LocalizedDisplayName("NavigationBar.Label.LabelPropertiesLikeFunctions")]
[LocalizedDescription("NavigationBar.Description.LabelPropertiesLikeFunctions")]
[DefaultValue(DEFAULT_LABEL_PROPERTIES_LIKE_FUNCTIONS)]
public bool LabelPropertiesLikeFunctions
{
get { return _labelPropertiesLikeFunctions; }
set
{
if (_labelPropertiesLikeFunctions != value)
{
_labelPropertiesLikeFunctions = value;
FireChanged();
}
}
}
[LocalizedCategory("NavigationBar.Category.Navigation")]
[LocalizedDisplayName("NavigationBar.Label.IgnoreUnderscore")]
[LocalizedDescription("NavigationBar.Description.IgnoreUnderscore")]
[DefaultValue(DEFAULT_IGNORE_UNDERSCORE)]
public bool IgnoreUnderscore
{
get { return _ignoreUnderscore; }
set
{
if (_ignoreUnderscore != value)
{
_ignoreUnderscore = value;
FireChanged();
}
}
}
[LocalizedCategory("NavigationBar.Category.Navigation")]
[LocalizedDisplayName("NavigationBar.Label.SortingMethod")]
[LocalizedDescription("NavigationBar.Description.SortingMethod")]
[DefaultValue(DEFAULT_MEMBER_SORT_METHOD)]
public OutlineSorting MemberSortMethod
{
get { return _memberSortMethod; }
set
{
if (_memberSortMethod != value)
{
_memberSortMethod = value;
FireChanged();
}
}
}
[LocalizedCategory("NavigationBar.Category.Search")]
[LocalizedDisplayName("NavigationBar.Label.DropDownMultiKeyEnabled")]
[LocalizedDescription("NavigationBar.Description.DropDownMultiKeyEnabled")]
[DefaultValue(DEFAULT_DROPDOWN_MULTIKEY_SEARCH_ENABLED)]
public bool DropDownMultiKeyEnabled
{
get { return _dropDownMultiKeySearchEnabled; }
set
{
if (_dropDownMultiKeySearchEnabled != value)
{
_dropDownMultiKeySearchEnabled = value;
FireChanged();
}
}
}
[LocalizedCategory("NavigationBar.Category.Search")]
[LocalizedDisplayName("NavigationBar.Label.DropDownMultiKeyTimer")]
[LocalizedDescription("NavigationBar.Description.DropDownMultiKeyTimer")]
[DefaultValue(DEFAULT_DROPDOWN_MULTIKEY_SEARCH_TIMER)]
public int DropDownMultiKeyTimer
{
get { return _dropDownMultiKeySearchTimer; }
set
{
if (_dropDownMultiKeySearchTimer != value)
{
_dropDownMultiKeySearchTimer = value;
FireChanged();
}
}
}
[LocalizedCategory("NavigationBar.Category.Search")]
[LocalizedDisplayName("NavigationBar.Label.DropDownFullWordSearchEnabled")]
[LocalizedDescription("NavigationBar.Description.DropDownFullWordSearchEnabled")]
[DefaultValue(DEFAULT_DROPDOWN_FULLWORD_SEARCH_ENABLED)]
public bool DropDownFullWordSearchEnabled
{
get { return _dropDownFullWordSearchEnabled; }
set
{
if (_dropDownFullWordSearchEnabled != value)
{
_dropDownFullWordSearchEnabled = value;
FireChanged();
}
}
}
private void FireChanged()
{
if (OnSettingsChanged != null) OnSettingsChanged();
}
}
}