0:   // NamespaceSummariesForm.cs - GUI interface to DOC.NET
1:   // Copyright (C) 2001  Kral Ferch
2:   //
3:   // This program is free software; you can redistribute it and/or modify
4:   // it under the terms of the GNU General Public License as published by
5:   // the Free Software Foundation; either version 2 of the License, or
6:   // (at your option) any later version.
7:   //
8:   // This program is distributed in the hope that it will be useful,
9:   // but WITHOUT ANY WARRANTY; without even the implied warranty of
10:   // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11:   // GNU General Public License for more details.
12:   //
13:   // You should have received a copy of the GNU General Public License
14:   // along with this program; if not, write to the Free Software
15:   // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16:  
17:   namespace SharpDevelop.Gui.HelpFileGenerator
18:   {
19:       using System;
20:       using System.Drawing;
21:       using System.Collections;
22:       using System.ComponentModel;
23:       using System.Windows.Forms;
24:  
25:       /// <summary>
26:       ///    Summary description for NamespaceSummariesForm.
27:       /// </summary>
28:       public class NamespaceSummariesForm : System.Windows.Forms.Form
29:       {
30:           /// <summary>
31:           ///    Required designer variable.
32:           /// </summary>
33:           private System.Windows.Forms.Button cancelButton;
34:           private System.Windows.Forms.Button okButton;
35:           private System.Windows.Forms.TextBox summaryTextBox;
36:           private System.Windows.Forms.Label label2;
37:           private System.Windows.Forms.Label label1;
38:           private System.Windows.Forms.ComboBox namespaceComboBox;
39:           private Hashtable editNamespaceSummaries;
40:           private string selectedText;
41:  
42:           public NamespaceSummariesForm(Hashtable namespaceSummaries)
43:           {
44:               //
45:               // Required for Windows Form Designer support
46:               //
47:               InitializeComponent();
48:  
49:               editNamespaceSummaries namespaceSummaries;
50:  
51:               foreach(string namespaceName in namespaceSummaries.Keys)
52:               {
53:                   namespaceComboBox.Items.Add(namespaceName);
54:               }
55:  
56:               namespaceComboBox.SelectedIndex 0;
57:           }
58:  
59:           /// <summary>
60:           /// Clean up any resources being used.
61:           /// </summary>
62:           protected override void Dispose(bool disposing)
63:           {
64:               base.Dispose(disposing);
65:           }
66:  
67:           /// <summary>
68:           ///    Required method for Designer support - do not modify
69:           ///    the contents of this method with the code editor.
70:           /// </summary>
71:           private void InitializeComponent()
72:           {
73:               this.okButton new System.Windows.Forms.Button();
74:               this.cancelButton new System.Windows.Forms.Button();
75:               this.summaryTextBox new System.Windows.Forms.TextBox();
76:               this.namespaceComboBox new System.Windows.Forms.ComboBox();
77:               this.label1 new System.Windows.Forms.Label();
78:               this.label2 new System.Windows.Forms.Label();
79:               this.SuspendLayout();
80:               // 
81:               // okButton
82:               // 
83:               this.okButton.Anchor = (System.Windows.Forms.AnchorStyles.Top System.Windows.Forms.AnchorStyles.Right);
84:               this.okButton.DialogResult System.Windows.Forms.DialogResult.OK;
85:               this.okButton.Location new System.Drawing.Point(39216);
86:               this.okButton.Name "okButton";
87:               this.okButton.TabIndex 4;
88:               this.okButton.Text "Ok";
89:               this.okButton.Click += new System.EventHandler(this.okButton_Click);
90:               // 
91:               // cancelButton
92:               // 
93:               this.cancelButton.Anchor = (System.Windows.Forms.AnchorStyles.Top System.Windows.Forms.AnchorStyles.Right);
94:               this.cancelButton.DialogResult System.Windows.Forms.DialogResult.Cancel;
95:               this.cancelButton.Location new System.Drawing.Point(39248);
96:               this.cancelButton.Name "cancelButton";
97:               this.cancelButton.TabIndex 5;
98:               this.cancelButton.Text "Cancel";
99:               // 
100:               // summaryTextBox
101:               // 
102:               this.summaryTextBox.Anchor = (((System.Windows.Forms.AnchorStyles.Top System.Windows.Forms.AnchorStyles.Bottom
103:                   System.Windows.Forms.AnchorStyles.Left
104:                   System.Windows.Forms.AnchorStyles.Right);
105:               this.summaryTextBox.Location new System.Drawing.Point(864);
106:               this.summaryTextBox.Multiline true;
107:               this.summaryTextBox.Name "summaryTextBox";
108:               this.summaryTextBox.Size new System.Drawing.Size(368104);
109:               this.summaryTextBox.TabIndex 3;
110:               this.summaryTextBox.Text "";
111:               // 
112:               // namespaceComboBox
113:               // 
114:               this.namespaceComboBox.Anchor = ((System.Windows.Forms.AnchorStyles.Top System.Windows.Forms.AnchorStyles.Left
115:                   System.Windows.Forms.AnchorStyles.Right);
116:               this.namespaceComboBox.DropDownWidth 272;
117:               this.namespaceComboBox.Location new System.Drawing.Point(10416);
118:               this.namespaceComboBox.Name "namespaceComboBox";
119:               this.namespaceComboBox.Size new System.Drawing.Size(27221);
120:               this.namespaceComboBox.TabIndex 0;
121:               this.namespaceComboBox.SelectedIndexChanged += new System.EventHandler(this.namespaceComboBox_SelectedIndexChanged);
122:               // 
123:               // label1
124:               // 
125:               this.label1.Location new System.Drawing.Point(2416);
126:               this.label1.Name "label1";
127:               this.label1.Size new System.Drawing.Size(7216);
128:               this.label1.TabIndex 1;
129:               this.label1.Text "Namespace:";
130:               this.label1.TextAlign System.Drawing.ContentAlignment.TopRight;
131:               // 
132:               // label2
133:               // 
134:               this.label2.Location new System.Drawing.Point(848);
135:               this.label2.Name "label2";
136:               this.label2.Size new System.Drawing.Size(5616);
137:               this.label2.TabIndex 2;
138:               this.label2.Text "Summary:";
139:               // 
140:               // NamespaceSummariesForm
141:               // 
142:               this.AcceptButton this.okButton;
143:               this.AutoScaleBaseSize new System.Drawing.Size(513);
144:               this.AutoScroll true;
145:               this.CancelButton this.cancelButton;
146:               this.ClientSize new System.Drawing.Size(480181);
147:               this.Controls.AddRange(new System.Windows.Forms.Control[] {
148:                                                                             this.cancelButton,
149:                                                                             this.okButton,
150:                                                                             this.summaryTextBox,
151:                                                                             this.label2,
152:                                                                             this.label1,
153:                                                                             this.namespaceComboBox});
154:               this.Name "NamespaceSummariesForm";
155:               this.Text "Namespace Summaries";
156:               this.ResumeLayout(false);
157:  
158:           }
159:  
160:           protected void okButton_Click (object senderSystem.EventArgs e)
161:           {
162:               editNamespaceSummaries[selectedText] = summaryTextBox.Text;
163:           }
164:  
165:           protected void namespaceComboBox_SelectedIndexChanged (object senderSystem.EventArgs e)
166:           {
167:               if (selectedText != null)
168:               {
169:                   editNamespaceSummaries[selectedText] = summaryTextBox.Text;
170:               }
171:  
172:               summaryTextBox.Text = (string)editNamespaceSummaries[namespaceComboBox.Text];
173:               summaryTextBox.Focus();
174:  
175:               selectedText namespaceComboBox.Text;
176:           }
177:       }
178:   }

This page was automatically generated by SharpDevelop.