source: BMXNET_RPMS_dotNET_UTILITIES-BMX/trunk/cs/bmx_0200scr/BMX2/BMXNet/DLoginInfo.cs@ 815

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

Initial commit of C# Source Code. Now to try to get it to compile.

File size: 8.4 KB
Line 
1using System;
2using System.Drawing;
3using System.Collections;
4using System.ComponentModel;
5using System.Windows.Forms;
6
7namespace IndianHealthService.BMXNet
8{
9 /// <summary>
10 /// Summary description for DLoginInfo.
11 /// </summary>
12 public class DLoginInfo : 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 label2;
21 private System.Windows.Forms.Label label1;
22 private System.Windows.Forms.TextBox txtVerify;
23 private System.Windows.Forms.TextBox txtAccess;
24 /// <summary>
25 /// Required designer variable.
26 /// </summary>
27 private System.ComponentModel.Container components = null;
28
29 public DLoginInfo()
30 {
31 InitializeComponent();
32 }
33
34 #region Windows Form Designer generated code
35 /// <summary>
36 /// Required method for Designer support - do not modify
37 /// the contents of this method with the code editor.
38 /// </summary>
39 private void InitializeComponent()
40 {
41 this.pnlPageBottom = new System.Windows.Forms.Panel();
42 this.cmdCancel = new System.Windows.Forms.Button();
43 this.cmdOK = new System.Windows.Forms.Button();
44 this.pnlDescription = new System.Windows.Forms.Panel();
45 this.grpDescriptionResourceGroup = new System.Windows.Forms.GroupBox();
46 this.lblDescriptionResourceGroup = new System.Windows.Forms.Label();
47 this.txtVerify = new System.Windows.Forms.TextBox();
48 this.txtAccess = new System.Windows.Forms.TextBox();
49 this.label2 = new System.Windows.Forms.Label();
50 this.label1 = new System.Windows.Forms.Label();
51 this.pnlPageBottom.SuspendLayout();
52 this.pnlDescription.SuspendLayout();
53 this.grpDescriptionResourceGroup.SuspendLayout();
54 this.SuspendLayout();
55 //
56 // pnlPageBottom
57 //
58 this.pnlPageBottom.Controls.Add(this.cmdCancel);
59 this.pnlPageBottom.Controls.Add(this.cmdOK);
60 this.pnlPageBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
61 this.pnlPageBottom.Location = new System.Drawing.Point(0, 174);
62 this.pnlPageBottom.Name = "pnlPageBottom";
63 this.pnlPageBottom.Size = new System.Drawing.Size(448, 40);
64 this.pnlPageBottom.TabIndex = 6;
65 //
66 // cmdCancel
67 //
68 this.cmdCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
69 this.cmdCancel.Location = new System.Drawing.Point(376, 8);
70 this.cmdCancel.Name = "cmdCancel";
71 this.cmdCancel.Size = new System.Drawing.Size(56, 24);
72 this.cmdCancel.TabIndex = 4;
73 this.cmdCancel.Text = "Cancel";
74 //
75 // cmdOK
76 //
77 this.cmdOK.DialogResult = System.Windows.Forms.DialogResult.OK;
78 this.cmdOK.Location = new System.Drawing.Point(296, 8);
79 this.cmdOK.Name = "cmdOK";
80 this.cmdOK.Size = new System.Drawing.Size(64, 24);
81 this.cmdOK.TabIndex = 3;
82 this.cmdOK.Text = "OK";
83 this.cmdOK.Click += new System.EventHandler(this.cmdOK_Click);
84 //
85 // pnlDescription
86 //
87 this.pnlDescription.Controls.Add(this.grpDescriptionResourceGroup);
88 this.pnlDescription.Dock = System.Windows.Forms.DockStyle.Bottom;
89 this.pnlDescription.Location = new System.Drawing.Point(0, 102);
90 this.pnlDescription.Name = "pnlDescription";
91 this.pnlDescription.Size = new System.Drawing.Size(448, 72);
92 this.pnlDescription.TabIndex = 7;
93 //
94 // grpDescriptionResourceGroup
95 //
96 this.grpDescriptionResourceGroup.Controls.Add(this.lblDescriptionResourceGroup);
97 this.grpDescriptionResourceGroup.Dock = System.Windows.Forms.DockStyle.Fill;
98 this.grpDescriptionResourceGroup.Location = new System.Drawing.Point(0, 0);
99 this.grpDescriptionResourceGroup.Name = "grpDescriptionResourceGroup";
100 this.grpDescriptionResourceGroup.Size = new System.Drawing.Size(448, 72);
101 this.grpDescriptionResourceGroup.TabIndex = 1;
102 this.grpDescriptionResourceGroup.TabStop = false;
103 this.grpDescriptionResourceGroup.Text = "Description";
104 //
105 // lblDescriptionResourceGroup
106 //
107 this.lblDescriptionResourceGroup.Dock = System.Windows.Forms.DockStyle.Fill;
108 this.lblDescriptionResourceGroup.Location = new System.Drawing.Point(3, 16);
109 this.lblDescriptionResourceGroup.Name = "lblDescriptionResourceGroup";
110 this.lblDescriptionResourceGroup.Size = new System.Drawing.Size(442, 53);
111 this.lblDescriptionResourceGroup.TabIndex = 0;
112 this.lblDescriptionResourceGroup.Text = "Use this panel to enter the Access and Verify codes that you use to log in to the" +
113 " RPMS server. ";
114 //
115 // txtVerify
116 //
117 this.txtVerify.Location = new System.Drawing.Point(160, 56);
118 this.txtVerify.Name = "txtVerify";
119 this.txtVerify.PasswordChar = '*';
120 this.txtVerify.Size = new System.Drawing.Size(160, 20);
121 this.txtVerify.TabIndex = 2;
122 this.txtVerify.Text = "";
123 //
124 // txtAccess
125 //
126 this.txtAccess.Location = new System.Drawing.Point(160, 24);
127 this.txtAccess.Name = "txtAccess";
128 this.txtAccess.PasswordChar = '*';
129 this.txtAccess.Size = new System.Drawing.Size(160, 20);
130 this.txtAccess.TabIndex = 1;
131 this.txtAccess.Text = "";
132 //
133 // label2
134 //
135 this.label2.Location = new System.Drawing.Point(24, 56);
136 this.label2.Name = "label2";
137 this.label2.Size = new System.Drawing.Size(128, 16);
138 this.label2.TabIndex = 12;
139 this.label2.Text = "RPMS Verify Code:";
140 //
141 // label1
142 //
143 this.label1.Location = new System.Drawing.Point(24, 24);
144 this.label1.Name = "label1";
145 this.label1.Size = new System.Drawing.Size(128, 16);
146 this.label1.TabIndex = 11;
147 this.label1.Text = "RPMS Access Code:";
148 //
149 // DLoginInfo
150 //
151 this.AcceptButton = this.cmdOK;
152 this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
153 this.ClientSize = new System.Drawing.Size(448, 214);
154 this.Controls.Add(this.txtVerify);
155 this.Controls.Add(this.txtAccess);
156 this.Controls.Add(this.label2);
157 this.Controls.Add(this.label1);
158 this.Controls.Add(this.pnlDescription);
159 this.Controls.Add(this.pnlPageBottom);
160 this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
161 this.Name = "DLoginInfo";
162 this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
163 this.Text = "RPMS Login";
164 this.Load += new System.EventHandler(this.DLoginInfo_Load);
165 this.Activated += new System.EventHandler(this.DLoginInfo_Activated);
166 this.pnlPageBottom.ResumeLayout(false);
167 this.pnlDescription.ResumeLayout(false);
168 this.grpDescriptionResourceGroup.ResumeLayout(false);
169 this.ResumeLayout(false);
170
171 }
172 #endregion
173
174 #region Fields
175 string m_sAccess;
176 string m_sVerify;
177 #endregion Fields
178
179 #region Methods
180
181 /// <summary>
182 /// Clean up any resources being used.
183 /// </summary>
184 protected override void Dispose( bool disposing )
185 {
186 if( disposing )
187 {
188 if(components != null)
189 {
190 components.Dispose();
191 }
192 }
193 base.Dispose( disposing );
194 }
195
196 public void InitializePage(string sAccess, string sVerify)
197 {
198 m_sAccess = sAccess;
199 m_sVerify = sVerify;
200 UpdateDialogData(true);
201 }
202
203 /// <summary>
204 /// If b is true, moves member vars into control data
205 /// otherwise, moves control data into member vars
206 /// </summary>
207 /// <param name="b"></param>
208 private void UpdateDialogData(bool b)
209 {
210 if (b == true) //move member vars into controls
211 {
212 txtAccess.Text = m_sAccess;
213 txtVerify.Text = m_sVerify;
214
215 }
216 else //move control data into member vars
217 {
218 m_sVerify = txtVerify.Text;
219 m_sAccess = txtAccess.Text;
220 }
221 }
222
223 private void cmdOK_Click(object sender, System.EventArgs e)
224 {
225 this.UpdateDialogData(false);
226 return;
227 }
228
229 #endregion Methods
230
231 private void DLoginInfo_Activated(object sender, System.EventArgs e)
232 {
233 txtAccess.Focus();
234 }
235
236 private void DLoginInfo_Load(object sender, System.EventArgs e)
237 {
238 this.Activate();
239 }
240
241
242 #region Properties
243
244 /// <summary>
245 /// Gets the access code entered by the user.
246 /// </summary>
247 public string AccessCode
248 {
249 get
250 {
251 return m_sAccess;
252 }
253 }
254
255 /// <summary>
256 /// Gets the verify code entered by the user.
257 /// </summary>
258 public string VerifyCode
259 {
260 get
261 {
262 return m_sVerify;
263 }
264 }
265 #endregion Properties
266
267
268 }
269}
Note: See TracBrowser for help on using the repository browser.