2 // ToolStripManagerTest.cs
\r
4 // Permission is hereby granted, free of charge, to any person obtaining
\r
5 // a copy of this software and associated documentation files (the
\r
6 // "Software"), to deal in the Software without restriction, including
\r
7 // without limitation the rights to use, copy, modify, merge, publish,
\r
8 // distribute, sublicense, and/or sell copies of the Software, and to
\r
9 // permit persons to whom the Software is furnished to do so, subject to
\r
10 // the following conditions:
\r
12 // The above copyright notice and this permission notice shall be
\r
13 // included in all copies or substantial portions of the Software.
\r
15 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\r
16 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\r
17 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
\r
18 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
\r
19 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
\r
20 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
\r
21 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\r
23 // Copyright (c) 2006 Jonathan Pobst
\r
26 // Jonathan Pobst (monkey@jpobst.com)
\r
30 using System.Collections.Generic;
\r
32 using NUnit.Framework;
\r
33 using System.Drawing;
\r
34 using System.Windows.Forms;
\r
36 namespace MonoTests.System.Windows.Forms
\r
39 public class ToolStripManagerTest : TestHelper
\r
42 [Ignore ("This has to run all by itself. Toolstrips in other tests register themselves and mess this up.")]
\r
43 public void BehaviorFindToolStrip ()
\r
46 Assert.AreEqual (null, ToolStripManager.FindToolStrip (string.Empty), "A1");
\r
47 Assert.AreEqual (null, ToolStripManager.FindToolStrip ("MyStrip"), "A2");
\r
49 ToolStrip ts = new ToolStrip ();
\r
50 ts.Name = "MyStrip";
\r
53 Assert.AreSame (ts, ToolStripManager.FindToolStrip ("MyStrip"), "A3");
\r
55 // Dispose removes them
\r
57 Assert.AreEqual (null, ToolStripManager.FindToolStrip ("MyStrip"), "A4");
\r
59 ts = new ToolStrip ();
\r
60 ts.Name = "MyStrip1";
\r
61 MenuStrip ms = new MenuStrip ();
\r
62 ms.Name = "MyStrip2";
\r
65 Assert.AreSame (ts, ToolStripManager.FindToolStrip ("MyStrip1"), "A5");
\r
66 Assert.AreSame (ms, ToolStripManager.FindToolStrip ("MyStrip2"), "A6");
\r
68 // Find unnamed strip
\r
69 StatusStrip ss = new StatusStrip ();
\r
70 Assert.AreEqual (ss, ToolStripManager.FindToolStrip (string.Empty), "A7");
\r
72 // Always return first unnamed strip
\r
73 ContextMenuStrip cms = new ContextMenuStrip ();
\r
74 Assert.AreEqual (ss, ToolStripManager.FindToolStrip (string.Empty), "A8");
\r
76 // Remove first unnamed strip, returns second one
\r
78 Assert.AreEqual (cms, ToolStripManager.FindToolStrip (string.Empty), "A9");
\r
80 // ContextMenuStrips are included
\r
81 cms.Name = "Context";
\r
82 Assert.AreEqual (cms, ToolStripManager.FindToolStrip ("Context"), "A10");
\r
86 public void MethodIsShortcutValid ()
\r
88 Assert.AreEqual (true, ToolStripManager.IsValidShortcut (Keys.F1), "A1");
\r
89 Assert.AreEqual (true, ToolStripManager.IsValidShortcut (Keys.F7), "A1");
\r
90 Assert.AreEqual (true, ToolStripManager.IsValidShortcut (Keys.Shift | Keys.F1), "A1");
\r
91 Assert.AreEqual (true, ToolStripManager.IsValidShortcut (Keys.Control | Keys.F1), "A1");
\r
92 Assert.AreEqual (false, ToolStripManager.IsValidShortcut (Keys.Shift), "A1");
\r
93 Assert.AreEqual (false, ToolStripManager.IsValidShortcut (Keys.Alt), "A1");
\r
94 Assert.AreEqual (false, ToolStripManager.IsValidShortcut (Keys.D6), "A1");
\r
95 Assert.AreEqual (true, ToolStripManager.IsValidShortcut (Keys.Control | Keys.S), "A1");
\r
96 Assert.AreEqual (false, ToolStripManager.IsValidShortcut (Keys.L), "A1");
\r
100 public void BehaviorTwoShortcuts ()
\r
102 ToolStripMenuItem tsmi = new ToolStripMenuItem ();
\r
103 tsmi.ShortcutKeys = Keys.Control | Keys.D;
\r
104 ToolStripMenuItem tsmi2 = new ToolStripMenuItem ();
\r
105 tsmi2.ShortcutKeys = Keys.Control | Keys.D;
\r
107 Assert.AreEqual (Keys.Control | Keys.D, tsmi.ShortcutKeys, "A1");
\r
108 Assert.AreEqual (Keys.Control | Keys.D, tsmi2.ShortcutKeys, "A2");
\r
110 ToolStrip ts = new ToolStrip ();
\r
111 ts.Items.Add (tsmi);
\r
112 ts.Items.Add (tsmi2);
\r
114 Assert.AreEqual (Keys.Control | Keys.D, tsmi.ShortcutKeys, "A3");
\r
115 Assert.AreEqual (Keys.Control | Keys.D, tsmi2.ShortcutKeys, "A4");
\r
119 public void MethodMergeToolStripsAppend ()
\r
121 // MergeAction = Append
\r
122 ToolStrip ts1 = new ToolStrip ();
\r
123 ToolStrip ts2 = new ToolStrip ();
\r
125 ts1.Items.Add ("ts1-A");
\r
126 ts1.Items.Add ("ts1-B");
\r
127 ts1.Items.Add ("ts1-C");
\r
128 ts1.Items.Add ("ts1-D");
\r
130 ts2.Items.Add ("ts2-A");
\r
131 ts2.Items.Add ("ts2-B");
\r
132 ts2.Items.Add ("ts2-C");
\r
133 ts2.Items.Add ("ts2-D");
\r
135 ToolStripManager.Merge (ts2, ts1);
\r
137 Assert.AreEqual (8, ts1.Items.Count, "M1");
\r
138 Assert.AreEqual (0, ts2.Items.Count, "M2");
\r
140 Assert.AreEqual ("ts1-A", ts1.Items[0].Text, "M3-1");
\r
141 Assert.AreEqual ("ts1-B", ts1.Items[1].Text, "M3-2");
\r
142 Assert.AreEqual ("ts1-C", ts1.Items[2].Text, "M3-3");
\r
143 Assert.AreEqual ("ts1-D", ts1.Items[3].Text, "M3-4");
\r
144 Assert.AreEqual ("ts2-A", ts1.Items[4].Text, "M3-5");
\r
145 Assert.AreEqual ("ts2-B", ts1.Items[5].Text, "M3-6");
\r
146 Assert.AreEqual ("ts2-C", ts1.Items[6].Text, "M3-7");
\r
147 Assert.AreEqual ("ts2-D", ts1.Items[7].Text, "M3-8");
\r
149 ToolStripManager.RevertMerge (ts1, ts2);
\r
151 Assert.AreEqual (4, ts1.Items.Count, "M4");
\r
152 Assert.AreEqual (4, ts2.Items.Count, "M5");
\r
154 Assert.AreEqual ("ts1-A", ts1.Items[0].Text, "M6-1");
\r
155 Assert.AreEqual ("ts1-B", ts1.Items[1].Text, "M6-2");
\r
156 Assert.AreEqual ("ts1-C", ts1.Items[2].Text, "M6-3");
\r
157 Assert.AreEqual ("ts1-D", ts1.Items[3].Text, "M6-4");
\r
158 Assert.AreEqual ("ts2-A", ts2.Items[0].Text, "M6-5");
\r
159 Assert.AreEqual ("ts2-B", ts2.Items[1].Text, "M6-6");
\r
160 Assert.AreEqual ("ts2-C", ts2.Items[2].Text, "M6-7");
\r
161 Assert.AreEqual ("ts2-D", ts2.Items[3].Text, "M6-8");
\r
163 // Do merge twice, as it helps verify things got back
\r
164 // to the proper state in the unmerge
\r
165 ToolStripManager.Merge (ts2, ts1);
\r
167 Assert.AreEqual (8, ts1.Items.Count, "M7");
\r
168 Assert.AreEqual (0, ts2.Items.Count, "M8");
\r
170 Assert.AreEqual ("ts1-A", ts1.Items[0].Text, "M9-1");
\r
171 Assert.AreEqual ("ts1-B", ts1.Items[1].Text, "M9-2");
\r
172 Assert.AreEqual ("ts1-C", ts1.Items[2].Text, "M9-3");
\r
173 Assert.AreEqual ("ts1-D", ts1.Items[3].Text, "M9-4");
\r
174 Assert.AreEqual ("ts2-A", ts1.Items[4].Text, "M9-5");
\r
175 Assert.AreEqual ("ts2-B", ts1.Items[5].Text, "M9-6");
\r
176 Assert.AreEqual ("ts2-C", ts1.Items[6].Text, "M9-7");
\r
177 Assert.AreEqual ("ts2-D", ts1.Items[7].Text, "M9-8");
\r
179 ToolStripManager.RevertMerge (ts1, ts2);
\r
181 Assert.AreEqual (4, ts1.Items.Count, "M10");
\r
182 Assert.AreEqual (4, ts2.Items.Count, "M11");
\r
184 Assert.AreEqual ("ts1-A", ts1.Items[0].Text, "M12-1");
\r
185 Assert.AreEqual ("ts1-B", ts1.Items[1].Text, "M12-2");
\r
186 Assert.AreEqual ("ts1-C", ts1.Items[2].Text, "M12-3");
\r
187 Assert.AreEqual ("ts1-D", ts1.Items[3].Text, "M12-4");
\r
188 Assert.AreEqual ("ts2-A", ts2.Items[0].Text, "M12-5");
\r
189 Assert.AreEqual ("ts2-B", ts2.Items[1].Text, "M12-6");
\r
190 Assert.AreEqual ("ts2-C", ts2.Items[2].Text, "M12-7");
\r
191 Assert.AreEqual ("ts2-D", ts2.Items[3].Text, "M12-8");
\r
195 public void MethodMergeToolStripsInsert ()
\r
197 // MergeAction = Insert
\r
198 ToolStrip ts1 = new ToolStrip ();
\r
199 ToolStrip ts2 = new ToolStrip ();
\r
201 ts1.Items.Add ("ts1-A");
\r
202 ts1.Items.Add ("ts1-B");
\r
203 ts1.Items.Add ("ts1-C");
\r
204 ts1.Items.Add ("ts1-D");
\r
206 ts2.Items.Add ("ts2-A");
\r
207 ts2.Items.Add ("ts2-B");
\r
208 ts2.Items.Add ("ts2-C");
\r
209 ts2.Items.Add ("ts2-D");
\r
211 ts2.Items[0].MergeAction = MergeAction.Insert;
\r
212 ts2.Items[0].MergeIndex = 2;
\r
213 ts2.Items[1].MergeAction = MergeAction.Insert;
\r
214 ts2.Items[2].MergeAction = MergeAction.Insert;
\r
215 ts2.Items[2].MergeIndex = 12;
\r
216 ts2.Items[3].MergeAction = MergeAction.Insert;
\r
217 ts2.Items[3].MergeIndex = 0;
\r
219 ToolStripManager.Merge (ts2, ts1);
\r
221 Assert.AreEqual (7, ts1.Items.Count, "M1");
\r
222 Assert.AreEqual (1, ts2.Items.Count, "M2");
\r
224 Assert.AreEqual ("ts2-D", ts1.Items[0].Text, "M3-1");
\r
225 Assert.AreEqual ("ts1-A", ts1.Items[1].Text, "M3-2");
\r
226 Assert.AreEqual ("ts1-B", ts1.Items[2].Text, "M3-3");
\r
227 Assert.AreEqual ("ts2-A", ts1.Items[3].Text, "M3-4");
\r
228 Assert.AreEqual ("ts1-C", ts1.Items[4].Text, "M3-5");
\r
229 Assert.AreEqual ("ts1-D", ts1.Items[5].Text, "M3-6");
\r
230 Assert.AreEqual ("ts2-C", ts1.Items[6].Text, "M3-7");
\r
231 Assert.AreEqual ("ts2-B", ts2.Items[0].Text, "M3-8");
\r
233 ToolStripManager.RevertMerge (ts1, ts2);
\r
235 Assert.AreEqual (4, ts1.Items.Count, "M4");
\r
236 Assert.AreEqual (4, ts2.Items.Count, "M5");
\r
238 Assert.AreEqual ("ts1-A", ts1.Items[0].Text, "M6-1");
\r
239 Assert.AreEqual ("ts1-B", ts1.Items[1].Text, "M6-2");
\r
240 Assert.AreEqual ("ts1-C", ts1.Items[2].Text, "M6-3");
\r
241 Assert.AreEqual ("ts1-D", ts1.Items[3].Text, "M6-4");
\r
242 Assert.AreEqual ("ts2-A", ts2.Items[0].Text, "M6-5");
\r
243 Assert.AreEqual ("ts2-B", ts2.Items[1].Text, "M6-6");
\r
244 Assert.AreEqual ("ts2-C", ts2.Items[2].Text, "M6-7");
\r
245 Assert.AreEqual ("ts2-D", ts2.Items[3].Text, "M6-8");
\r
247 // Do merge twice, as it helps verify things got back
\r
248 // to the proper state in the unmerge
\r
249 ToolStripManager.Merge (ts2, ts1);
\r
251 Assert.AreEqual (7, ts1.Items.Count, "M7");
\r
252 Assert.AreEqual (1, ts2.Items.Count, "M8");
\r
254 Assert.AreEqual ("ts2-D", ts1.Items[0].Text, "M9-1");
\r
255 Assert.AreEqual ("ts1-A", ts1.Items[1].Text, "M9-2");
\r
256 Assert.AreEqual ("ts1-B", ts1.Items[2].Text, "M9-3");
\r
257 Assert.AreEqual ("ts2-A", ts1.Items[3].Text, "M9-4");
\r
258 Assert.AreEqual ("ts1-C", ts1.Items[4].Text, "M9-5");
\r
259 Assert.AreEqual ("ts1-D", ts1.Items[5].Text, "M9-6");
\r
260 Assert.AreEqual ("ts2-C", ts1.Items[6].Text, "M9-7");
\r
261 Assert.AreEqual ("ts2-B", ts2.Items[0].Text, "M9-8");
\r
263 ToolStripManager.RevertMerge (ts1, ts2);
\r
265 Assert.AreEqual (4, ts1.Items.Count, "M10");
\r
266 Assert.AreEqual (4, ts2.Items.Count, "M11");
\r
268 Assert.AreEqual ("ts1-A", ts1.Items[0].Text, "M12-1");
\r
269 Assert.AreEqual ("ts1-B", ts1.Items[1].Text, "M12-2");
\r
270 Assert.AreEqual ("ts1-C", ts1.Items[2].Text, "M12-3");
\r
271 Assert.AreEqual ("ts1-D", ts1.Items[3].Text, "M12-4");
\r
272 Assert.AreEqual ("ts2-A", ts2.Items[0].Text, "M12-5");
\r
273 Assert.AreEqual ("ts2-B", ts2.Items[1].Text, "M12-6");
\r
274 Assert.AreEqual ("ts2-C", ts2.Items[2].Text, "M12-7");
\r
275 Assert.AreEqual ("ts2-D", ts2.Items[3].Text, "M12-8");
\r
279 public void MethodMergeToolStripsRemove ()
\r
281 // MergeAction = Remove
\r
282 ToolStrip ts1 = new ToolStrip ();
\r
283 ToolStrip ts2 = new ToolStrip ();
\r
285 ts1.Items.Add ("ts1-A");
\r
286 ts1.Items.Add ("ts1-B");
\r
287 ts1.Items.Add ("ts1-C");
\r
288 ts1.Items.Add ("ts1-D");
\r
290 ts2.Items.Add ("ts1-A");
\r
291 ts2.Items.Add ("ts1-B");
\r
292 ts2.Items.Add ("ts1-C");
\r
293 ts2.Items.Add ("ts1-D");
\r
295 ts2.Items[0].MergeAction = MergeAction.Remove;
\r
296 ts2.Items[1].MergeAction = MergeAction.Remove;
\r
297 ts2.Items[2].MergeAction = MergeAction.Remove;
\r
298 ts2.Items[3].MergeAction = MergeAction.Remove;
\r
300 // Both the item from ts1 and ts2 must have the same Text for Remove to work,
\r
301 // so I need to give these a Name so I can differentiate them later.
\r
302 ts1.Items[0].Name = "ts1-A";
\r
303 ts1.Items[1].Name = "ts1-B";
\r
304 ts1.Items[2].Name = "ts1-C";
\r
305 ts1.Items[3].Name = "ts1-D";
\r
306 ts2.Items[0].Name = "ts2-A";
\r
307 ts2.Items[1].Name = "ts2-B";
\r
308 ts2.Items[2].Name = "ts2-C";
\r
309 ts2.Items[3].Name = "ts2-D";
\r
311 ToolStripManager.Merge (ts2, ts1);
\r
313 Assert.AreEqual (0, ts1.Items.Count, "M1");
\r
314 Assert.AreEqual (4, ts2.Items.Count, "M2");
\r
316 Assert.AreEqual ("ts2-A", ts2.Items[0].Name, "M3-5");
\r
317 Assert.AreEqual ("ts2-B", ts2.Items[1].Name, "M3-6");
\r
318 Assert.AreEqual ("ts2-C", ts2.Items[2].Name, "M3-7");
\r
319 Assert.AreEqual ("ts2-D", ts2.Items[3].Name, "M3-8");
\r
321 ToolStripManager.RevertMerge (ts1, ts2);
\r
323 Assert.AreEqual (4, ts1.Items.Count, "M4");
\r
324 Assert.AreEqual (4, ts2.Items.Count, "M5");
\r
326 Assert.AreEqual ("ts1-A", ts1.Items[0].Name, "M6-1");
\r
327 Assert.AreEqual ("ts1-B", ts1.Items[1].Name, "M6-2");
\r
328 Assert.AreEqual ("ts1-C", ts1.Items[2].Name, "M6-3");
\r
329 Assert.AreEqual ("ts1-D", ts1.Items[3].Name, "M6-4");
\r
330 Assert.AreEqual ("ts2-A", ts2.Items[0].Name, "M6-5");
\r
331 Assert.AreEqual ("ts2-B", ts2.Items[1].Name, "M6-6");
\r
332 Assert.AreEqual ("ts2-C", ts2.Items[2].Name, "M6-7");
\r
333 Assert.AreEqual ("ts2-D", ts2.Items[3].Name, "M6-8");
\r
335 // Do merge twice, as it helps verify things got back
\r
336 // to the proper state in the unmerge
\r
337 ToolStripManager.Merge (ts2, ts1);
\r
339 Assert.AreEqual (0, ts1.Items.Count, "M7");
\r
340 Assert.AreEqual (4, ts2.Items.Count, "M8");
\r
342 Assert.AreEqual ("ts2-A", ts2.Items[0].Name, "M9-5");
\r
343 Assert.AreEqual ("ts2-B", ts2.Items[1].Name, "M9-6");
\r
344 Assert.AreEqual ("ts2-C", ts2.Items[2].Name, "M9-7");
\r
345 Assert.AreEqual ("ts2-D", ts2.Items[3].Name, "M9-8");
\r
347 ToolStripManager.RevertMerge (ts1, ts2);
\r
349 Assert.AreEqual (4, ts1.Items.Count, "M10");
\r
350 Assert.AreEqual (4, ts2.Items.Count, "M11");
\r
352 Assert.AreEqual ("ts1-A", ts1.Items[0].Name, "M12-1");
\r
353 Assert.AreEqual ("ts1-B", ts1.Items[1].Name, "M12-2");
\r
354 Assert.AreEqual ("ts1-C", ts1.Items[2].Name, "M12-3");
\r
355 Assert.AreEqual ("ts1-D", ts1.Items[3].Name, "M12-4");
\r
356 Assert.AreEqual ("ts2-A", ts2.Items[0].Name, "M12-5");
\r
357 Assert.AreEqual ("ts2-B", ts2.Items[1].Name, "M12-6");
\r
358 Assert.AreEqual ("ts2-C", ts2.Items[2].Name, "M12-7");
\r
359 Assert.AreEqual ("ts2-D", ts2.Items[3].Name, "M12-8");
\r
363 public void MethodMergeToolStripsReplace ()
\r
365 // MergeAction = Replace
\r
366 ToolStrip ts1 = new ToolStrip ();
\r
367 ToolStrip ts2 = new ToolStrip ();
\r
369 ts1.Items.Add ("ts1-A");
\r
370 ts1.Items.Add ("ts1-B");
\r
371 ts1.Items.Add ("ts1-C");
\r
372 ts1.Items.Add ("ts1-D");
\r
374 ts2.Items.Add ("ts1-A");
\r
375 ts2.Items.Add ("ts1-B");
\r
376 ts2.Items.Add ("ts1-C");
\r
377 ts2.Items.Add ("ts1-D");
\r
379 ts2.Items[0].MergeAction = MergeAction.Replace;
\r
380 ts2.Items[1].MergeAction = MergeAction.Replace;
\r
381 ts2.Items[2].MergeAction = MergeAction.Replace;
\r
382 ts2.Items[3].MergeAction = MergeAction.Replace;
\r
384 // Both the item from ts1 and ts2 must have the same Text for Replace to work,
\r
385 // so I need to give these a Name so I can differentiate them later.
\r
386 ts1.Items[0].Name = "ts1-A";
\r
387 ts1.Items[1].Name = "ts1-B";
\r
388 ts1.Items[2].Name = "ts1-C";
\r
389 ts1.Items[3].Name = "ts1-D";
\r
390 ts2.Items[0].Name = "ts2-A";
\r
391 ts2.Items[1].Name = "ts2-B";
\r
392 ts2.Items[2].Name = "ts2-C";
\r
393 ts2.Items[3].Name = "ts2-D";
\r
395 ToolStripManager.Merge (ts2, ts1);
\r
397 Assert.AreEqual (4, ts1.Items.Count, "M1");
\r
398 Assert.AreEqual (0, ts2.Items.Count, "M2");
\r
400 Assert.AreEqual ("ts2-A", ts1.Items[0].Name, "M3-5");
\r
401 Assert.AreEqual ("ts2-B", ts1.Items[1].Name, "M3-6");
\r
402 Assert.AreEqual ("ts2-C", ts1.Items[2].Name, "M3-7");
\r
403 Assert.AreEqual ("ts2-D", ts1.Items[3].Name, "M3-8");
\r
405 ToolStripManager.RevertMerge (ts1, ts2);
\r
407 Assert.AreEqual (4, ts1.Items.Count, "M4");
\r
408 Assert.AreEqual (4, ts2.Items.Count, "M5");
\r
410 Assert.AreEqual ("ts1-A", ts1.Items[0].Name, "M6-1");
\r
411 Assert.AreEqual ("ts1-B", ts1.Items[1].Name, "M6-2");
\r
412 Assert.AreEqual ("ts1-C", ts1.Items[2].Name, "M6-3");
\r
413 Assert.AreEqual ("ts1-D", ts1.Items[3].Name, "M6-4");
\r
414 Assert.AreEqual ("ts2-A", ts2.Items[0].Name, "M6-5");
\r
415 Assert.AreEqual ("ts2-B", ts2.Items[1].Name, "M6-6");
\r
416 Assert.AreEqual ("ts2-C", ts2.Items[2].Name, "M6-7");
\r
417 Assert.AreEqual ("ts2-D", ts2.Items[3].Name, "M6-8");
\r
419 // Do merge twice, as it helps verify things got back
\r
420 // to the proper state in the unmerge
\r
421 ToolStripManager.Merge (ts2, ts1);
\r
423 Assert.AreEqual (4, ts1.Items.Count, "M7");
\r
424 Assert.AreEqual (0, ts2.Items.Count, "M8");
\r
426 Assert.AreEqual ("ts2-A", ts1.Items[0].Name, "M9-5");
\r
427 Assert.AreEqual ("ts2-B", ts1.Items[1].Name, "M9-6");
\r
428 Assert.AreEqual ("ts2-C", ts1.Items[2].Name, "M9-7");
\r
429 Assert.AreEqual ("ts2-D", ts1.Items[3].Name, "M9-8");
\r
431 ToolStripManager.RevertMerge (ts1, ts2);
\r
433 Assert.AreEqual (4, ts1.Items.Count, "M10");
\r
434 Assert.AreEqual (4, ts2.Items.Count, "M11");
\r
436 Assert.AreEqual ("ts1-A", ts1.Items[0].Name, "M12-1");
\r
437 Assert.AreEqual ("ts1-B", ts1.Items[1].Name, "M12-2");
\r
438 Assert.AreEqual ("ts1-C", ts1.Items[2].Name, "M12-3");
\r
439 Assert.AreEqual ("ts1-D", ts1.Items[3].Name, "M12-4");
\r
440 Assert.AreEqual ("ts2-A", ts2.Items[0].Name, "M12-5");
\r
441 Assert.AreEqual ("ts2-B", ts2.Items[1].Name, "M12-6");
\r
442 Assert.AreEqual ("ts2-C", ts2.Items[2].Name, "M12-7");
\r
443 Assert.AreEqual ("ts2-D", ts2.Items[3].Name, "M12-8");
\r
447 public void MethodMergeToolStripsMatchOnly ()
\r
449 MenuStrip ms1 = new MenuStrip ();
\r
450 MenuStrip ms2 = new MenuStrip ();
\r
452 ToolStripMenuItem tsmi1 = (ToolStripMenuItem)ms1.Items.Add ("File");
\r
453 ToolStripMenuItem tsmi2 = (ToolStripMenuItem)ms2.Items.Add ("File");
\r
455 tsmi1.DropDownItems.Add ("New 1");
\r
456 tsmi1.DropDownItems.Add ("Open 1");
\r
458 tsmi2.DropDownItems.Add ("New 2");
\r
459 tsmi2.DropDownItems.Add ("Open 2");
\r
461 tsmi2.MergeAction = MergeAction.MatchOnly;
\r
463 ToolStripManager.Merge (ms2, ms1);
\r
465 Assert.AreEqual (4, tsmi1.DropDownItems.Count, "M1");
\r
466 Assert.AreEqual (0, tsmi2.DropDownItems.Count, "M2");
\r
468 Assert.AreEqual ("New 1", tsmi1.DropDownItems[0].Text, "M3-1");
\r
469 Assert.AreEqual ("Open 1", tsmi1.DropDownItems[1].Text, "M3-2");
\r
470 Assert.AreEqual ("New 2", tsmi1.DropDownItems[2].Text, "M3-3");
\r
471 Assert.AreEqual ("Open 2", tsmi1.DropDownItems[3].Text, "M3-4");
\r
473 ToolStripManager.RevertMerge (ms1, ms2);
\r
475 Assert.AreEqual (2, tsmi1.DropDownItems.Count, "M4");
\r
476 Assert.AreEqual (2, tsmi2.DropDownItems.Count, "M5");
\r
478 Assert.AreEqual ("New 1", tsmi1.DropDownItems[0].Text, "M6-1");
\r
479 Assert.AreEqual ("Open 1", tsmi1.DropDownItems[1].Text, "M6-2");
\r
480 Assert.AreEqual ("New 2", tsmi2.DropDownItems[0].Text, "M6-3");
\r
481 Assert.AreEqual ("Open 2", tsmi2.DropDownItems[1].Text, "M6-4");
\r
483 // Do merge twice, as it helps verify things got back
\r
484 // to the proper state in the unmerge
\r
485 ToolStripManager.Merge (ms2, ms1);
\r
487 Assert.AreEqual (4, tsmi1.DropDownItems.Count, "M7");
\r
488 Assert.AreEqual (0, tsmi2.DropDownItems.Count, "M8");
\r
490 Assert.AreEqual ("New 1", tsmi1.DropDownItems[0].Text, "M9-1");
\r
491 Assert.AreEqual ("Open 1", tsmi1.DropDownItems[1].Text, "M9-2");
\r
492 Assert.AreEqual ("New 2", tsmi1.DropDownItems[2].Text, "M9-3");
\r
493 Assert.AreEqual ("Open 2", tsmi1.DropDownItems[3].Text, "M9-4");
\r
495 ToolStripManager.RevertMerge (ms1, ms2);
\r
497 Assert.AreEqual (2, tsmi1.DropDownItems.Count, "M10");
\r
498 Assert.AreEqual (2, tsmi2.DropDownItems.Count, "M11");
\r
500 Assert.AreEqual ("New 1", tsmi1.DropDownItems[0].Text, "M12-1");
\r
501 Assert.AreEqual ("Open 1", tsmi1.DropDownItems[1].Text, "M12-2");
\r
502 Assert.AreEqual ("New 2", tsmi2.DropDownItems[0].Text, "M12-3");
\r
503 Assert.AreEqual ("Open 2", tsmi2.DropDownItems[1].Text, "M12-4");
\r
506 [Test] // For bug #81477
\r
507 public void MethodMergeRecursive ()
\r
509 MenuStrip ms1 = new MenuStrip ();
\r
510 MenuStrip ms2 = new MenuStrip ();
\r
512 ToolStripMenuItem tsmi1 = (ToolStripMenuItem)ms1.Items.Add ("File");
\r
513 ToolStripMenuItem tsmi2 = (ToolStripMenuItem)ms2.Items.Add ("File");
\r
515 tsmi1.DropDownItems.Add ("New 1");
\r
516 tsmi1.DropDownItems.Add ("Open 1");
\r
518 tsmi2.DropDownItems.Add ("New 2");
\r
519 tsmi2.DropDownItems.Add ("Open 2");
\r
521 tsmi2.DropDownItems[0].MergeAction = MergeAction.Insert;
\r
522 tsmi2.DropDownItems[0].MergeIndex = 0;
\r
524 tsmi2.MergeAction = MergeAction.MatchOnly;
\r
526 ToolStripManager.Merge (ms2, ms1);
\r
528 Assert.AreEqual ("New 2", tsmi1.DropDownItems[0].Text, "M13");
\r
532 [ExpectedException (typeof (ArgumentNullException))]
\r
533 public void MethodMergeANE1 ()
\r
535 ToolStrip ts = new ToolStrip ();
\r
537 ToolStripManager.Merge (null, "moose");
\r
541 [ExpectedException (typeof (ArgumentNullException))]
\r
542 public void MethodMergeANE2 ()
\r
544 ToolStrip ts = new ToolStrip ();
\r
545 ToolStripManager.Merge (ts, (string)null);
\r
549 [ExpectedException (typeof (ArgumentException))]
\r
550 public void MethodMergeAE ()
\r
552 ToolStrip ts = new ToolStrip ();
\r
553 ts.Name = "mergeae";
\r
554 ToolStripManager.Merge (ts, "mergeae");
\r
558 [ExpectedException (typeof (ArgumentNullException))]
\r
559 public void MethodMergeANE3 ()
\r
561 ToolStrip ts = new ToolStrip ();
\r
562 ToolStripManager.Merge (null, ts);
\r
566 [ExpectedException (typeof (ArgumentNullException))]
\r
567 public void MethodMergeANE4 ()
\r
569 ToolStrip ts = new ToolStrip ();
\r
570 ToolStripManager.Merge (ts, (ToolStrip)null);
\r
574 [ExpectedException (typeof (ArgumentException))]
\r
575 public void MethodMergeAE2 ()
\r
577 ToolStrip ts = new ToolStrip ();
\r
578 ToolStripManager.Merge (ts, ts);
\r
582 [ExpectedException (typeof (ArgumentNullException))]
\r
583 public void MethodRevertMergeANE ()
\r
585 ToolStrip ts = new ToolStrip ();
\r
587 ToolStripManager.RevertMerge (ts, null);
\r
591 public void MethodMergeNothing ()
\r
593 // Merge returns false if it can't successfully merge anything
\r
594 ToolStrip ts1 = new ToolStrip ();
\r
595 ToolStrip ts2 = new ToolStrip ();
\r
597 Assert.AreEqual (false, ToolStripManager.Merge (ts1, ts2), "K1");
\r
600 [Test] // Should not throw AOORE
\r
601 public void Bug347669 ()
\r
603 Form main = new MainForm ();
\r
605 Form frm = new Childform ();
\r
606 frm.MdiParent = main;
\r
611 private class MainForm : Form
\r
616 mainMenuStrip1 = new MenuStrip ();
\r
617 File = new ToolStripMenuItem ();
\r
618 openToolStripMenuItem = new ToolStripMenuItem ();
\r
619 toolStripSeparator2 = new ToolStripSeparator ();
\r
620 Dokument = new ToolStripMenuItem ();
\r
621 arveToolStripMenuItem = new ToolStripMenuItem ();
\r
623 WareHouse = new ToolStripMenuItem ();
\r
624 Personnel = new ToolStripMenuItem ();
\r
625 Payroll = new ToolStripMenuItem ();
\r
626 FixedAssets = new ToolStripMenuItem ();
\r
627 Supplies = new ToolStripMenuItem ();
\r
628 GeneralLedger = new ToolStripMenuItem ();
\r
629 Manufacturing = new ToolStripMenuItem ();
\r
630 PointOfSale = new ToolStripMenuItem ();
\r
631 CardTerminal = new ToolStripMenuItem ();
\r
632 Rent = new ToolStripMenuItem ();
\r
633 WayBill = new ToolStripMenuItem ();
\r
634 CustomerRelationManagement = new ToolStripMenuItem ();
\r
635 toolStripSeparator8 = new ToolStripSeparator ();
\r
636 NewUserToolStripMenuItem = new ToolStripMenuItem ();
\r
637 exitToolStripMenuItem = new ToolStripMenuItem ();
\r
639 mainMenuStrip1.Items.AddRange (new ToolStripItem[] {
\r
642 mainMenuStrip1.Location = new Point (0, 0);
\r
643 mainMenuStrip1.Name = "mainMenuStrip1";
\r
644 mainMenuStrip1.Size = new Size (644, 24);
\r
645 mainMenuStrip1.TabIndex = 3;
\r
646 mainMenuStrip1.Text = "menuStrip1";
\r
647 File.DropDownItems.AddRange (new ToolStripItem[] {
\r
648 openToolStripMenuItem,
\r
649 toolStripSeparator2,
\r
662 CustomerRelationManagement,
\r
663 toolStripSeparator8,
\r
664 NewUserToolStripMenuItem,
\r
665 exitToolStripMenuItem});
\r
666 File.MergeAction = MergeAction.Insert;
\r
667 File.MergeIndex = 1;
\r
668 File.Name = "File";
\r
669 File.Size = new Size (35, 20);
\r
670 File.Text = "&File";
\r
671 openToolStripMenuItem.MergeIndex = 1;
\r
672 openToolStripMenuItem.Name = "openToolStripMenuItem";
\r
673 openToolStripMenuItem.Size = new Size (196, 22);
\r
674 openToolStripMenuItem.Text = "Open";
\r
675 toolStripSeparator2.MergeIndex = 2;
\r
676 toolStripSeparator2.Name = "toolStripSeparator2";
\r
677 toolStripSeparator2.Size = new Size (193, 6);
\r
678 Dokument.DropDownItems.AddRange (new ToolStripItem[] {
\r
679 arveToolStripMenuItem
\r
681 Dokument.MergeIndex = 3;
\r
682 Dokument.Name = "Dokument";
\r
683 Dokument.Size = new Size (196, 22);
\r
684 Dokument.Text = "&Dokument";
\r
685 arveToolStripMenuItem.Name = "arveToolStripMenuItem";
\r
686 arveToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+E";
\r
687 arveToolStripMenuItem.ShortcutKeys = ((Keys)((Keys.Control | Keys.E)));
\r
688 arveToolStripMenuItem.Size = new Size (146, 22);
\r
689 arveToolStripMenuItem.Text = "Arve";
\r
690 WareHouse.MergeIndex = 4;
\r
691 WareHouse.Name = "WareHouse";
\r
692 WareHouse.Size = new Size (196, 22);
\r
693 WareHouse.Text = "&Ladu";
\r
694 Personnel.MergeIndex = 5;
\r
695 Personnel.Name = "Personnel";
\r
696 Personnel.Size = new Size (196, 22);
\r
697 Personnel.Text = "&Kaader";
\r
698 Payroll.MergeIndex = 6;
\r
699 Payroll.Name = "Payroll";
\r
700 Payroll.Size = new Size (196, 22);
\r
701 Payroll.Text = "&Palk";
\r
702 FixedAssets.MergeIndex = 7;
\r
703 FixedAssets.Name = "FixedAssets";
\r
704 FixedAssets.Size = new Size (196, 22);
\r
705 FixedAssets.Text = "Test";
\r
706 Supplies.MergeIndex = 8;
\r
707 Supplies.Name = "Supplies";
\r
708 Supplies.Size = new Size (196, 22);
\r
709 Supplies.Text = "Sample";
\r
710 GeneralLedger.MergeIndex = 9;
\r
711 GeneralLedger.Name = "GeneralLedger";
\r
712 GeneralLedger.Size = new Size (196, 22);
\r
713 GeneralLedger.Text = "Blah";
\r
714 Manufacturing.MergeIndex = 10;
\r
715 Manufacturing.Name = "Manufacturing";
\r
716 Manufacturing.Size = new Size (196, 22);
\r
717 Manufacturing.Text = "&Tootmine";
\r
718 PointOfSale.MergeIndex = 11;
\r
719 PointOfSale.Name = "PointOfSale";
\r
720 PointOfSale.Size = new Size (196, 22);
\r
721 PointOfSale.Text = "IceCream";
\r
722 CardTerminal.MergeIndex = 12;
\r
723 CardTerminal.Name = "CardTerminal";
\r
724 CardTerminal.Size = new Size (196, 22);
\r
725 CardTerminal.Text = "Terminal";
\r
726 Rent.MergeIndex = 13;
\r
727 Rent.Name = "Rent";
\r
728 Rent.Size = new Size (196, 22);
\r
729 Rent.Text = "Rent";
\r
730 WayBill.MergeIndex = 14;
\r
731 WayBill.Name = "WayBill";
\r
732 WayBill.Size = new Size (196, 22);
\r
733 WayBill.Text = "WayBill";
\r
734 CustomerRelationManagement.MergeIndex = 15;
\r
735 CustomerRelationManagement.Name = "CustomerRelationManagement";
\r
736 CustomerRelationManagement.Size = new Size (196, 22);
\r
737 CustomerRelationManagement.Text = "CustomerRelationManagement";
\r
738 toolStripSeparator8.MergeAction = MergeAction.Insert;
\r
739 toolStripSeparator8.MergeIndex = 20;
\r
740 toolStripSeparator8.Name = "toolStripSeparator8";
\r
741 toolStripSeparator8.Size = new Size (193, 6);
\r
742 NewUserToolStripMenuItem.MergeIndex = 21;
\r
743 NewUserToolStripMenuItem.Name = "NewUserToolStripMenuItem";
\r
744 NewUserToolStripMenuItem.ShortcutKeys = ((Keys)((Keys.Shift |
\r
746 NewUserToolStripMenuItem.Size = new Size (196, 22);
\r
747 NewUserToolStripMenuItem.Text = "Uus kasutaja";
\r
748 exitToolStripMenuItem.MergeIndex = 22;
\r
749 exitToolStripMenuItem.Name = "exitToolStripMenuItem";
\r
750 exitToolStripMenuItem.Size = new Size (196, 22);
\r
751 exitToolStripMenuItem.Text = "Exit";
\r
753 AutoScaleDimensions = new SizeF (6F, 13F);
\r
754 AutoScaleMode = AutoScaleMode.Font;
\r
755 BackgroundImageLayout = ImageLayout.Center;
\r
756 ClientSize = new Size (644, 396);
\r
757 Controls.Add (mainMenuStrip1);
\r
758 IsMdiContainer = true;
\r
759 KeyPreview = false;
\r
760 MainMenuStrip = mainMenuStrip1;
\r
764 MenuStrip mainMenuStrip1;
\r
765 ToolStripMenuItem File;
\r
766 ToolStripMenuItem openToolStripMenuItem;
\r
767 ToolStripSeparator toolStripSeparator2;
\r
768 ToolStripMenuItem exitToolStripMenuItem;
\r
769 ToolStripMenuItem Dokument;
\r
770 ToolStripMenuItem arveToolStripMenuItem;
\r
771 ToolStripMenuItem WareHouse;
\r
772 ToolStripMenuItem Personnel;
\r
773 ToolStripMenuItem Payroll;
\r
774 ToolStripMenuItem FixedAssets;
\r
775 ToolStripMenuItem Supplies;
\r
776 ToolStripMenuItem GeneralLedger;
\r
777 ToolStripMenuItem Manufacturing;
\r
778 ToolStripMenuItem PointOfSale;
\r
779 ToolStripMenuItem CardTerminal;
\r
780 ToolStripMenuItem Rent;
\r
781 ToolStripMenuItem WayBill;
\r
782 ToolStripMenuItem CustomerRelationManagement;
\r
783 ToolStripSeparator toolStripSeparator8;
\r
784 ToolStripMenuItem NewUserToolStripMenuItem;
\r
787 private class Childform : Form
\r
789 public Childform ()
\r
792 menuStrip1 = new MenuStrip ();
\r
793 fileToolStripMenuItem = new ToolStripMenuItem ();
\r
794 toolStripSeparator = new ToolStripSeparator ();
\r
795 printToolStripMenuItem = new ToolStripMenuItem ();
\r
796 editToolStripMenuItem = new ToolStripMenuItem ();
\r
797 toolStripSeparator3 = new ToolStripSeparator ();
\r
798 copyToolStripMenuItem = new ToolStripMenuItem ();
\r
799 toolStripSeparator4 = new ToolStripSeparator ();
\r
800 selectAllToolStripMenuItem = new ToolStripMenuItem ();
\r
801 toolsToolStripMenuItem = new ToolStripMenuItem ();
\r
802 addToolStripMenuItem = new ToolStripMenuItem ();
\r
803 deleteToolStripMenuItem = new ToolStripMenuItem ();
\r
804 filterToolStripMenuItem = new ToolStripMenuItem ();
\r
805 helpToolStripMenuItem = new ToolStripMenuItem ();
\r
806 searchToolStripMenuItem = new ToolStripMenuItem ();
\r
807 menuStrip1.SuspendLayout ();
\r
810 menuStrip1.Items.AddRange (new ToolStripItem[] {
\r
811 fileToolStripMenuItem,
\r
812 editToolStripMenuItem,
\r
813 toolsToolStripMenuItem,
\r
814 helpToolStripMenuItem});
\r
815 menuStrip1.Location = new Point (0, 0);
\r
816 menuStrip1.Name = "menuStrip1";
\r
817 menuStrip1.RenderMode = ToolStripRenderMode.System;
\r
818 menuStrip1.Size = new Size (337, 24);
\r
819 menuStrip1.TabIndex = 2;
\r
820 menuStrip1.Text = "menuStrip1";
\r
821 menuStrip1.Visible = false;
\r
823 fileToolStripMenuItem.DropDownItems.AddRange (new ToolStripItem[] {
\r
824 toolStripSeparator,
\r
825 printToolStripMenuItem});
\r
826 fileToolStripMenuItem.MergeAction = MergeAction.MatchOnly;
\r
827 fileToolStripMenuItem.Name = "fileToolStripMenuItem";
\r
828 fileToolStripMenuItem.Size = new Size (35, 20);
\r
829 fileToolStripMenuItem.Text = "&File";
\r
830 toolStripSeparator.MergeAction = MergeAction.Insert;
\r
831 toolStripSeparator.MergeIndex = 3;
\r
832 toolStripSeparator.Name = "toolStripSeparator";
\r
833 toolStripSeparator.Size = new Size (149, 6);
\r
834 printToolStripMenuItem.MergeAction = MergeAction.Insert;
\r
835 printToolStripMenuItem.MergeIndex = 2;
\r
836 printToolStripMenuItem.Name = "printToolStripMenuItem";
\r
837 printToolStripMenuItem.ShortcutKeys = ((Keys)((Keys.Control |
\r
839 printToolStripMenuItem.Size = new Size (152, 22);
\r
840 printToolStripMenuItem.Text = "&Print";
\r
841 editToolStripMenuItem.DropDownItems.AddRange (new ToolStripItem[] {
\r
842 toolStripSeparator3,
\r
843 copyToolStripMenuItem,
\r
844 toolStripSeparator4,
\r
845 selectAllToolStripMenuItem});
\r
846 editToolStripMenuItem.MergeAction = MergeAction.Insert;
\r
847 editToolStripMenuItem.MergeIndex = 1;
\r
848 editToolStripMenuItem.Name = "editToolStripMenuItem";
\r
849 editToolStripMenuItem.Size = new Size (59, 20);
\r
850 editToolStripMenuItem.Text = "&Paranda";
\r
851 toolStripSeparator3.Name = "toolStripSeparator3";
\r
852 toolStripSeparator3.Size = new Size (157, 6);
\r
853 copyToolStripMenuItem.Name = "copyToolStripMenuItem";
\r
854 copyToolStripMenuItem.ShortcutKeys = ((Keys)((Keys.Control | Keys.C)));
\r
855 copyToolStripMenuItem.Size = new Size (160, 22);
\r
856 copyToolStripMenuItem.Text = "Kopeeri";
\r
857 toolStripSeparator4.Name = "toolStripSeparator4";
\r
858 toolStripSeparator4.Size = new Size (157, 6);
\r
859 selectAllToolStripMenuItem.Name = "selectAllToolStripMenuItem";
\r
860 selectAllToolStripMenuItem.Size = new Size (160, 22);
\r
861 selectAllToolStripMenuItem.Text = "selectAllToolStripMenuItem";
\r
862 toolsToolStripMenuItem.DropDownItems.AddRange (new ToolStripItem[] {
\r
863 addToolStripMenuItem,
\r
864 deleteToolStripMenuItem,
\r
865 filterToolStripMenuItem});
\r
866 toolsToolStripMenuItem.MergeAction = MergeAction.Insert;
\r
867 toolsToolStripMenuItem.MergeIndex = 2;
\r
868 toolsToolStripMenuItem.Name = "toolsToolStripMenuItem";
\r
869 toolsToolStripMenuItem.Size = new Size (60, 20);
\r
870 toolsToolStripMenuItem.Text = "&Tegevus";
\r
871 addToolStripMenuItem.Name = "addToolStripMenuItem";
\r
872 addToolStripMenuItem.ShortcutKeys = ((Keys)((Keys.Control | Keys.N)));
\r
873 addToolStripMenuItem.Size = new Size (160, 22);
\r
874 addToolStripMenuItem.Text = "Lisa";
\r
875 deleteToolStripMenuItem.Name = "deleteToolStripMenuItem";
\r
876 deleteToolStripMenuItem.ShortcutKeys = ((Keys)((Keys.Control |
\r
878 deleteToolStripMenuItem.Size = new Size (160, 22);
\r
879 deleteToolStripMenuItem.Text = "Kustuta";
\r
880 filterToolStripMenuItem.ImageTransparentColor =
\r
882 filterToolStripMenuItem.Name = "filterToolStripMenuItem";
\r
883 filterToolStripMenuItem.ShortcutKeys = Keys.F11;
\r
884 filterToolStripMenuItem.Size = new Size (160, 22);
\r
885 filterToolStripMenuItem.Text = "Tingimus";
\r
886 helpToolStripMenuItem.DropDownItems.AddRange (new ToolStripItem[] {
\r
887 searchToolStripMenuItem});
\r
888 helpToolStripMenuItem.MergeAction = MergeAction.MatchOnly;
\r
889 helpToolStripMenuItem.Name = "helpToolStripMenuItem";
\r
890 helpToolStripMenuItem.Size = new Size (34, 20);
\r
891 helpToolStripMenuItem.Text = "&Abi";
\r
892 searchToolStripMenuItem.MergeAction = MergeAction.Insert;
\r
893 searchToolStripMenuItem.MergeIndex = 1;
\r
894 searchToolStripMenuItem.Name = "searchToolStripMenuItem";
\r
895 searchToolStripMenuItem.ShortcutKeys = Keys.F1;
\r
896 searchToolStripMenuItem.Size = new Size (160, 22);
\r
897 searchToolStripMenuItem.Text = "&Otsi teemat";
\r
899 AutoScaleDimensions = new SizeF (6F, 13F);
\r
900 ClientSize = new Size (337, 272);
\r
901 Controls.Add (menuStrip1);
\r
904 MenuStrip menuStrip1;
\r
905 ToolStripMenuItem fileToolStripMenuItem;
\r
906 ToolStripSeparator toolStripSeparator;
\r
907 ToolStripMenuItem printToolStripMenuItem;
\r
908 ToolStripMenuItem editToolStripMenuItem;
\r
909 ToolStripSeparator toolStripSeparator3;
\r
910 ToolStripMenuItem copyToolStripMenuItem;
\r
911 ToolStripSeparator toolStripSeparator4;
\r
912 ToolStripMenuItem selectAllToolStripMenuItem;
\r
913 ToolStripMenuItem toolsToolStripMenuItem;
\r
914 ToolStripMenuItem addToolStripMenuItem;
\r
915 ToolStripMenuItem deleteToolStripMenuItem;
\r
916 ToolStripMenuItem filterToolStripMenuItem;
\r
917 ToolStripMenuItem helpToolStripMenuItem;
\r
918 ToolStripMenuItem searchToolStripMenuItem;
\r