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

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

Dialogs now say 'VISTA' instead of 'RPMS'.
Updated AssemblyInfo.cs

File size: 9.5 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 " VISTA 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 //
123 // txtAccess
124 //
125 this.txtAccess.Location = new System.Drawing.Point(160, 24);
126 this.txtAccess.Name = "txtAccess";
127 this.txtAccess.PasswordChar = '*';
128 this.txtAccess.Size = new System.Drawing.Size(160, 20);
129 this.txtAccess.TabIndex = 1;
130 //
131 // label2
132 //
133 this.label2.Location = new System.Drawing.Point(24, 56);
134 this.label2.Name = "label2";
135 this.label2.Size = new System.Drawing.Size(128, 16);
136 this.label2.TabIndex = 12;
137 this.label2.Text = "VISTA Verify Code:";
138 //
139 // label1
140 //
141 this.label1.Location = new System.Drawing.Point(24, 24);
142 this.label1.Name = "label1";
143 this.label1.Size = new System.Drawing.Size(128, 16);
144 this.label1.TabIndex = 11;
145 this.label1.Text = "VISTA Access Code:";
146 //
147 // DLoginInfo
148 //
149 this.AcceptButton = this.cmdOK;
150 this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
151 this.ClientSize = new System.Drawing.Size(448, 214);
152 this.Controls.Add(this.txtVerify);
153 this.Controls.Add(this.txtAccess);
154 this.Controls.Add(this.label2);
155 this.Controls.Add(this.label1);
156 this.Controls.Add(this.pnlDescription);
157 this.Controls.Add(this.pnlPageBottom);
158 this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
159 this.Name = "DLoginInfo";
160 this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
161 this.Text = "VISTA Login";
162 this.Load += new System.EventHandler(this.DLoginInfo_Load);
163 this.Activated += new System.EventHandler(this.DLoginInfo_Activated);
164 this.pnlPageBottom.ResumeLayout(false);
165 this.pnlDescription.ResumeLayout(false);
166 this.grpDescriptionResourceGroup.ResumeLayout(false);
167 this.ResumeLayout(false);
168 this.PerformLayout();
169
170 }
171 #endregion
172
173 #region Fields
174 string m_sAccess;
175 string m_sVerify;
176 #endregion Fields
177
178 #region Methods
179
180 /// <summary>
181 /// Clean up any resources being used.
182 /// </summary>
183 protected override void Dispose( bool disposing )
184 {
185 if( disposing )
186 {
187 if(components != null)
188 {
189 components.Dispose();
190 }
191 }
192 base.Dispose( disposing );
193 }
194
195 public void InitializePage(string sAccess, string sVerify)
196 {
197 m_sAccess = sAccess;
198 m_sVerify = sVerify;
199 UpdateDialogData(true);
200 }
201
202 /// <summary>
203 /// If b is true, moves member vars into control data
204 /// otherwise, moves control data into member vars
205 /// </summary>
206 /// <param name="b"></param>
207 private void UpdateDialogData(bool b)
208 {
209 if (b == true) //move member vars into controls
210 {
211 txtAccess.Text = m_sAccess;
212 txtVerify.Text = m_sVerify;
213
214 }
215 else //move control data into member vars
216 {
217 m_sVerify = txtVerify.Text;
218 m_sAccess = txtAccess.Text;
219 }
220 }
221
222 private void cmdOK_Click(object sender, System.EventArgs e)
223 {
224 this.UpdateDialogData(false);
225 return;
226 }
227
228 #endregion Methods
229
230 private void DLoginInfo_Activated(object sender, System.EventArgs e)
231 {
232 txtAccess.Focus();
233 }
234
235 private void DLoginInfo_Load(object sender, System.EventArgs e)
236 {
237 this.Activate();
238 }
239
240
241 #region Properties
242
243 /// <summary>
244 /// Gets the access code entered by the user.
245 /// </summary>
246 public string AccessCode
247 {
248 get
249 {
250 return m_sAccess;
251 }
252 }
253
254 /// <summary>
255 /// Gets the verify code entered by the user.
256 /// </summary>
257 public string VerifyCode
258 {
259 get
260 {
261 return m_sVerify;
262 }
263 }
264 #endregion Properties
265
266
267 }
268}
Note: See TracBrowser for help on using the repository browser.