source: BMXNET_RPMS_dotNET_UTILITIES-BMX/branch/BMX41000/IHS BMX Framework/IndianHealthService.BMXNet.Tools.SchemaBuilder/DSaveSchema.cs@ 1582

Last change on this file since 1582 was 1146, checked in by Sam Habiel, 14 years ago

Initial Import of BMX4

File size: 8.6 KB
Line 
1using System;
2using System.Drawing;
3using System.Collections;
4using System.ComponentModel;
5using System.Windows.Forms;
6
7namespace IndianHealthService.BMXNet.Tools.SchemaBuilder
8{
9 /// <summary>
10 /// Summary description for DSaveSchema.
11 /// </summary>
12 public class DSaveSchema : System.Windows.Forms.Form
13 {
14 private System.Windows.Forms.Panel pnlPageBottom;
15 private System.Windows.Forms.Button cmdCancel;
16 private System.Windows.Forms.Button cmdOK;
17 private System.Windows.Forms.Panel pnlDescription;
18 private System.Windows.Forms.GroupBox grpDescriptionResourceGroup;
19 private System.Windows.Forms.Label lblDescriptionResourceGroup;
20 private System.Windows.Forms.Label label1;
21 private System.Windows.Forms.TextBox txtSchemaName;
22 private System.Windows.Forms.CheckBox chkReadOnly;
23 /// <summary>
24 /// Required designer variable.
25 /// </summary>
26 private System.ComponentModel.Container components = null;
27
28 public DSaveSchema()
29 {
30 InitializeComponent();
31 }
32
33 #region Methods
34 /// <summary>
35 /// Clean up any resources being used.
36 /// </summary>
37 protected override void Dispose( bool disposing )
38 {
39 if( disposing )
40 {
41 if(components != null)
42 {
43 components.Dispose();
44 }
45 }
46 base.Dispose( disposing );
47 }
48
49 public void InitializePage()
50 {
51 UpdateDialogData(true);
52 }
53
54 private void UpdateDialogData(bool b)
55 {
56 if (b == true) //Move data from member variables to dialog controls
57 {
58 this.txtSchemaName.Text = m_sSchemaName;
59 this.chkReadOnly.Checked = m_bReadOnly;
60 }
61 else //Move data to member variables from dialog controls
62 {
63 m_sSchemaName = this.txtSchemaName.Text;
64 m_bReadOnly = this.chkReadOnly.Checked;
65 }
66 }
67
68 private void cmdOK_Click(object sender, System.EventArgs e)
69 {
70 UpdateDialogData(false);
71 }
72 #endregion Methods
73
74 #region Windows Form Designer generated code
75 /// <summary>
76 /// Required method for Designer support - do not modify
77 /// the contents of this method with the code editor.
78 /// </summary>
79 private void InitializeComponent()
80 {
81 this.pnlPageBottom = new System.Windows.Forms.Panel();
82 this.cmdCancel = new System.Windows.Forms.Button();
83 this.cmdOK = new System.Windows.Forms.Button();
84 this.pnlDescription = new System.Windows.Forms.Panel();
85 this.grpDescriptionResourceGroup = new System.Windows.Forms.GroupBox();
86 this.lblDescriptionResourceGroup = new System.Windows.Forms.Label();
87 this.label1 = new System.Windows.Forms.Label();
88 this.txtSchemaName = new System.Windows.Forms.TextBox();
89 this.chkReadOnly = new System.Windows.Forms.CheckBox();
90 this.pnlPageBottom.SuspendLayout();
91 this.pnlDescription.SuspendLayout();
92 this.grpDescriptionResourceGroup.SuspendLayout();
93 this.SuspendLayout();
94 //
95 // pnlPageBottom
96 //
97 this.pnlPageBottom.Controls.Add(this.cmdCancel);
98 this.pnlPageBottom.Controls.Add(this.cmdOK);
99 this.pnlPageBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
100 this.pnlPageBottom.Location = new System.Drawing.Point(0, 155);
101 this.pnlPageBottom.Name = "pnlPageBottom";
102 this.pnlPageBottom.Size = new System.Drawing.Size(418, 40);
103 this.pnlPageBottom.TabIndex = 7;
104 //
105 // cmdCancel
106 //
107 this.cmdCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
108 this.cmdCancel.Location = new System.Drawing.Point(340, 8);
109 this.cmdCancel.Name = "cmdCancel";
110 this.cmdCancel.Size = new System.Drawing.Size(66, 24);
111 this.cmdCancel.TabIndex = 2;
112 this.cmdCancel.Text = "Cancel";
113 //
114 // cmdOK
115 //
116 this.cmdOK.DialogResult = System.Windows.Forms.DialogResult.OK;
117 this.cmdOK.Location = new System.Drawing.Point(263, 8);
118 this.cmdOK.Name = "cmdOK";
119 this.cmdOK.Size = new System.Drawing.Size(71, 24);
120 this.cmdOK.TabIndex = 1;
121 this.cmdOK.Text = "OK";
122 this.cmdOK.Click += new System.EventHandler(this.cmdOK_Click);
123 //
124 // pnlDescription
125 //
126 this.pnlDescription.Controls.Add(this.grpDescriptionResourceGroup);
127 this.pnlDescription.Dock = System.Windows.Forms.DockStyle.Bottom;
128 this.pnlDescription.Location = new System.Drawing.Point(0, 83);
129 this.pnlDescription.Name = "pnlDescription";
130 this.pnlDescription.Size = new System.Drawing.Size(418, 72);
131 this.pnlDescription.TabIndex = 8;
132 //
133 // grpDescriptionResourceGroup
134 //
135 this.grpDescriptionResourceGroup.Controls.Add(this.lblDescriptionResourceGroup);
136 this.grpDescriptionResourceGroup.Dock = System.Windows.Forms.DockStyle.Fill;
137 this.grpDescriptionResourceGroup.Location = new System.Drawing.Point(0, 0);
138 this.grpDescriptionResourceGroup.Name = "grpDescriptionResourceGroup";
139 this.grpDescriptionResourceGroup.Size = new System.Drawing.Size(418, 72);
140 this.grpDescriptionResourceGroup.TabIndex = 1;
141 this.grpDescriptionResourceGroup.TabStop = false;
142 this.grpDescriptionResourceGroup.Text = "Description";
143 //
144 // lblDescriptionResourceGroup
145 //
146 this.lblDescriptionResourceGroup.Dock = System.Windows.Forms.DockStyle.Fill;
147 this.lblDescriptionResourceGroup.Location = new System.Drawing.Point(3, 16);
148 this.lblDescriptionResourceGroup.Name = "lblDescriptionResourceGroup";
149 this.lblDescriptionResourceGroup.Size = new System.Drawing.Size(412, 53);
150 this.lblDescriptionResourceGroup.TabIndex = 0;
151 this.lblDescriptionResourceGroup.Text = "Use this panel to save a schema. The schema must have a unique name. If the sch" +
152 "ema will not be used to update data, then check the \'DataSet is Read-Only\' box.";
153 //
154 // label1
155 //
156 this.label1.Location = new System.Drawing.Point(12, 13);
157 this.label1.Name = "label1";
158 this.label1.Size = new System.Drawing.Size(104, 16);
159 this.label1.TabIndex = 9;
160 this.label1.Text = "Schema Name:";
161 //
162 // txtSchemaName
163 //
164 this.txtSchemaName.Location = new System.Drawing.Point(93, 10);
165 this.txtSchemaName.Name = "txtSchemaName";
166 this.txtSchemaName.Size = new System.Drawing.Size(272, 20);
167 this.txtSchemaName.TabIndex = 10;
168 //
169 // chkReadOnly
170 //
171 this.chkReadOnly.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
172 this.chkReadOnly.Location = new System.Drawing.Point(93, 32);
173 this.chkReadOnly.Name = "chkReadOnly";
174 this.chkReadOnly.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
175 this.chkReadOnly.Size = new System.Drawing.Size(136, 24);
176 this.chkReadOnly.TabIndex = 11;
177 this.chkReadOnly.Text = "DataSet is Read-Only";
178 //
179 // DSaveSchema
180 //
181 this.AcceptButton = this.cmdOK;
182 this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
183 this.CancelButton = this.cmdCancel;
184 this.ClientSize = new System.Drawing.Size(418, 195);
185 this.ControlBox = false;
186 this.Controls.Add(this.chkReadOnly);
187 this.Controls.Add(this.txtSchemaName);
188 this.Controls.Add(this.label1);
189 this.Controls.Add(this.pnlDescription);
190 this.Controls.Add(this.pnlPageBottom);
191 this.Name = "DSaveSchema";
192 this.Text = "Save Schema";
193 this.pnlPageBottom.ResumeLayout(false);
194 this.pnlDescription.ResumeLayout(false);
195 this.grpDescriptionResourceGroup.ResumeLayout(false);
196 this.ResumeLayout(false);
197 this.PerformLayout();
198
199 }
200 #endregion
201
202 #region Fields
203 private string m_sSchemaName = "";
204 private bool m_bReadOnly = false;
205
206 #endregion Fields
207
208 #region Properties
209
210 public string SchemaName
211 {
212 get
213 {
214 return m_sSchemaName;
215 }
216 set
217 {
218 m_sSchemaName = value;
219 }
220 }
221
222 public bool ReadOnly
223 {
224 get
225 {
226 return m_bReadOnly;
227 }
228 set
229 {
230 m_bReadOnly = value;
231 }
232 }
233 #endregion Properties
234
235 }
236}
Note: See TracBrowser for help on using the repository browser.