~halega/+junk/sharpdevelop

« back to all changes in this revision

Viewing changes to src/AddIns/Misc/RegExpTk/Project/Src/Dialogs/GroupForm.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.Text.RegularExpressions;
 
6
using System.Windows.Forms;
 
7
 
 
8
using ICSharpCode.SharpDevelop.Gui.XmlForms;
 
9
 
 
10
namespace Plugins.RegExpTk {
 
11
 
 
12
        public class GroupForm : BaseSharpDevelopForm
 
13
        {
 
14
                public GroupForm(Match match)
 
15
                {
 
16
                        SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("Resources.RegExpTkGroupForm.xfrm"));
 
17
                        
 
18
                        ListView groupsListView = (ListView)ControlDictionary["GroupsListView"];
 
19
                        ((Button)ControlDictionary["CloseButton"]).Click += new EventHandler(CloseButton_Click);
 
20
                        foreach(Group group in match.Groups)
 
21
                        {
 
22
                                ListViewItem groupItem = groupsListView.Items.Add(group.Value);
 
23
                                groupItem.SubItems.Add(group.Index.ToString());
 
24
                                groupItem.SubItems.Add((group.Index + group.Length).ToString());
 
25
                                groupItem.SubItems.Add(group.Length.ToString());
 
26
                        }
 
27
                }
 
28
                
 
29
                void CloseButton_Click(object sender, EventArgs e)
 
30
                {
 
31
                        Close();
 
32
                }
 
33
        }
 
34
 
 
35
}