~halega/+junk/sharpdevelop

« back to all changes in this revision

Viewing changes to src/AddIns/BackendBindings/Scripting/Test/Utils/BarItemCollection.cs

  • Committer: sk
  • Date: 2011-09-10 05:17:57 UTC
  • Revision ID: halega@halega.com-20110910051757-qfouz1llya9m6boy
4.1.0.7915 Release Candidate 1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
 
2
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
 
3
 
 
4
using System;
 
5
using System.Collections.Generic;
 
6
using System.Collections.ObjectModel;
 
7
using System.ComponentModel;
 
8
using System.Windows.Forms;
 
9
 
 
10
namespace ICSharpCode.Scripting.Tests.Utils
 
11
{
 
12
        public class BarItem
 
13
        {
 
14
                string text = String.Empty;
 
15
                
 
16
                public BarItem()
 
17
                {
 
18
                }
 
19
                
 
20
                public BarItem(string text)
 
21
                {
 
22
                        this.text = text;
 
23
                }
 
24
                
 
25
                public string Text {
 
26
                        get { return text; }
 
27
                        set { text = value; }
 
28
                }
 
29
        }
 
30
        
 
31
        public class BarItemCollection : Collection<BarItem>
 
32
        {
 
33
                public BarItemCollection()
 
34
                {
 
35
                }
 
36
                
 
37
                public void AddRange(BarItem[] items)
 
38
                {
 
39
                        foreach (BarItem item in items) {
 
40
                                Add(item);
 
41
                        }
 
42
                }
 
43
        }
 
44
        
 
45
        public class BarItemCollectionParentComponent : Component
 
46
        {
 
47
                BarItemCollection barItems = new BarItemCollection();
 
48
                
 
49
                [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
 
50
                public BarItemCollection ParentBarItems {
 
51
                        get { return barItems; }
 
52
                }
 
53
        }
 
54
}