- Timestamp:
- Aug 17, 2010, 8:50:19 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Scheduling/trunk/cs/bsdx0200GUISourceCode/DAccessTemplate.cs
r614 r913 80 80 private void cmdOK_Click(object sender, System.EventArgs e) 81 81 { 82 //assure that it's a monday in the future 83 DateTime dtStart = dtpStartDate.Value; 84 if ((dtStart.DayOfWeek != System.DayOfWeek.Monday) || 85 (dtStart < DateTime.Today)) 86 { 87 MessageBox.Show("Please select a future Monday."); 82 DateTime dtStart = dtpStartDate.Value; 83 if (dtStart < DateTime.Today) 84 { 85 MessageBox.Show("Please select a future day."); 88 86 m_bCancelOK = true; 89 87 return; … … 118 116 sPath = Environment.GetFolderPath(Environment.SpecialFolder.Personal); 119 117 120 openFileDialog1.InitialDirectory = "c:\\" ;118 openFileDialog1.InitialDirectory = @"c:\" ; 121 119 openFileDialog1.InitialDirectory = sPath ; 122 120 openFileDialog1.Filter = "Schedule Template Files (*.bsdxa)|*.bsdxa|All files (*.*)|*.*" ; … … 152 150 private void InitializeComponent() 153 151 { 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 this.txtTemplate.Text = ""; 249 // 250 // dtpStartDate 251 // 252 this.dtpStartDate.AllowDrop = true;253 this.dtpStartDate.Checked = false;254 this.dtpStartDate.Location = new System.Drawing.Point(176, 104);255 this.dtpStartDate.Name = "dtpStartDate";256 this.dtpStartDate.Size = new System.Drawing.Size(184, 20);257 this.dtpStartDate.TabIndex = 11; 258 // 259 // udWeeksToApply 260 // 261 this.udWeeksToApply.Location = new System.Drawing.Point(176, 144); 262 this.udWeeksToApply.Maximum = new System.Decimal(new int[] { 263 52,264 265 0, 266 0}); 267 this.udWeeksToApply.Minimum = new System.Decimal(new int[] { 268 1,269 270 0, 271 0});272 this.udWeeksToApply.Name = "udWeeksToApply";273 this.udWeeksToApply.Size = new System.Drawing.Size(96, 20);274 this.udWeeksToApply.TabIndex = 12; 275 this.udWeeksToApply.Value = new System.Decimal(new int[] { 276 1,277 278 0, 279 0}); 280 // 281 // label1 282 // 283 this.label1.Location = new System.Drawing.Point(16, 104);284 this.label1.Name = "label1";285 this.label1.Size = new System.Drawing.Size(152, 16);286 this.label1.TabIndex = 13;287 this.label1.Text = "Starting Week (Monday):";288 this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight; 289 // 290 // label2 291 // 292 this.label2.Location = new System.Drawing.Point(16, 144);293 this.label2.Name = "label2";294 this.label2.Size = new System.Drawing.Size(152, 16);295 this.label2.TabIndex = 13;296 this.label2.Text = "Number of Weeks to Apply:";297 this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; 298 // 299 // DAccessTemplate 300 // 301 this.AcceptButton = this.cmdOK;302 this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);303 this.CancelButton = this.cmdCancel;304 this.ClientSize = new System.Drawing.Size(440, 304);305 this.Controls.Add(this.label1);306 this.Controls.Add(this.udWeeksToApply);307 this.Controls.Add(this.dtpStartDate);308 this.Controls.Add(this.txtTemplate);309 this.Controls.Add(this.cmdSelectTemplate);310 this.Controls.Add(this.pnlDescription);311 this.Controls.Add(this.pnlPageBottom);312 this.Controls.Add(this.label2);313 this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;314 this.Name = "DAccessTemplate";315 this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;316 this.Text = "Apply Access Template";317 this.Closing += new System.ComponentModel.CancelEventHandler(this.DAccessTemplate_Closing);318 this.pnlPageBottom.ResumeLayout(false);319 this.pnlDescription.ResumeLayout(false);320 this.grpDescriptionResourceGroup.ResumeLayout(false);321 ((System.ComponentModel.ISupportInitialize)(this.udWeeksToApply)).EndInit();322 this.ResumeLayout(false);152 this.pnlPageBottom = new System.Windows.Forms.Panel(); 153 this.cmdCancel = new System.Windows.Forms.Button(); 154 this.cmdOK = new System.Windows.Forms.Button(); 155 this.pnlDescription = new System.Windows.Forms.Panel(); 156 this.grpDescriptionResourceGroup = new System.Windows.Forms.GroupBox(); 157 this.lblDescriptionResourceGroup = new System.Windows.Forms.Label(); 158 this.cmdSelectTemplate = new System.Windows.Forms.Button(); 159 this.txtTemplate = new System.Windows.Forms.TextBox(); 160 this.dtpStartDate = new System.Windows.Forms.DateTimePicker(); 161 this.udWeeksToApply = new System.Windows.Forms.NumericUpDown(); 162 this.label1 = new System.Windows.Forms.Label(); 163 this.label2 = new System.Windows.Forms.Label(); 164 this.pnlPageBottom.SuspendLayout(); 165 this.pnlDescription.SuspendLayout(); 166 this.grpDescriptionResourceGroup.SuspendLayout(); 167 ((System.ComponentModel.ISupportInitialize)(this.udWeeksToApply)).BeginInit(); 168 this.SuspendLayout(); 169 // 170 // pnlPageBottom 171 // 172 this.pnlPageBottom.Controls.Add(this.cmdCancel); 173 this.pnlPageBottom.Controls.Add(this.cmdOK); 174 this.pnlPageBottom.Dock = System.Windows.Forms.DockStyle.Bottom; 175 this.pnlPageBottom.Location = new System.Drawing.Point(0, 264); 176 this.pnlPageBottom.Name = "pnlPageBottom"; 177 this.pnlPageBottom.Size = new System.Drawing.Size(440, 40); 178 this.pnlPageBottom.TabIndex = 7; 179 // 180 // cmdCancel 181 // 182 this.cmdCancel.CausesValidation = false; 183 this.cmdCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; 184 this.cmdCancel.Location = new System.Drawing.Point(360, 8); 185 this.cmdCancel.Name = "cmdCancel"; 186 this.cmdCancel.Size = new System.Drawing.Size(56, 24); 187 this.cmdCancel.TabIndex = 2; 188 this.cmdCancel.Text = "Cancel"; 189 // 190 // cmdOK 191 // 192 this.cmdOK.DialogResult = System.Windows.Forms.DialogResult.OK; 193 this.cmdOK.Location = new System.Drawing.Point(280, 8); 194 this.cmdOK.Name = "cmdOK"; 195 this.cmdOK.Size = new System.Drawing.Size(64, 24); 196 this.cmdOK.TabIndex = 1; 197 this.cmdOK.Text = "OK"; 198 this.cmdOK.Click += new System.EventHandler(this.cmdOK_Click); 199 // 200 // pnlDescription 201 // 202 this.pnlDescription.Controls.Add(this.grpDescriptionResourceGroup); 203 this.pnlDescription.Dock = System.Windows.Forms.DockStyle.Bottom; 204 this.pnlDescription.Location = new System.Drawing.Point(0, 184); 205 this.pnlDescription.Name = "pnlDescription"; 206 this.pnlDescription.Size = new System.Drawing.Size(440, 80); 207 this.pnlDescription.TabIndex = 8; 208 // 209 // grpDescriptionResourceGroup 210 // 211 this.grpDescriptionResourceGroup.Controls.Add(this.lblDescriptionResourceGroup); 212 this.grpDescriptionResourceGroup.Dock = System.Windows.Forms.DockStyle.Fill; 213 this.grpDescriptionResourceGroup.Location = new System.Drawing.Point(0, 0); 214 this.grpDescriptionResourceGroup.Name = "grpDescriptionResourceGroup"; 215 this.grpDescriptionResourceGroup.Size = new System.Drawing.Size(440, 80); 216 this.grpDescriptionResourceGroup.TabIndex = 1; 217 this.grpDescriptionResourceGroup.TabStop = false; 218 this.grpDescriptionResourceGroup.Text = "Description"; 219 // 220 // lblDescriptionResourceGroup 221 // 222 this.lblDescriptionResourceGroup.Dock = System.Windows.Forms.DockStyle.Fill; 223 this.lblDescriptionResourceGroup.Location = new System.Drawing.Point(3, 16); 224 this.lblDescriptionResourceGroup.Name = "lblDescriptionResourceGroup"; 225 this.lblDescriptionResourceGroup.Size = new System.Drawing.Size(434, 61); 226 this.lblDescriptionResourceGroup.TabIndex = 0; 227 this.lblDescriptionResourceGroup.Text = "Use this panel to define an access pattern for future clinic availability."; 228 // 229 // cmdSelectTemplate 230 // 231 this.cmdSelectTemplate.Location = new System.Drawing.Point(24, 40); 232 this.cmdSelectTemplate.Name = "cmdSelectTemplate"; 233 this.cmdSelectTemplate.Size = new System.Drawing.Size(136, 32); 234 this.cmdSelectTemplate.TabIndex = 9; 235 this.cmdSelectTemplate.Text = "Select Access Template"; 236 this.cmdSelectTemplate.Click += new System.EventHandler(this.cmdSelectTemplate_Click); 237 // 238 // txtTemplate 239 // 240 this.txtTemplate.Location = new System.Drawing.Point(176, 32); 241 this.txtTemplate.Multiline = true; 242 this.txtTemplate.Name = "txtTemplate"; 243 this.txtTemplate.ReadOnly = true; 244 this.txtTemplate.Size = new System.Drawing.Size(248, 48); 245 this.txtTemplate.TabIndex = 10; 246 // 247 // dtpStartDate 248 // 249 this.dtpStartDate.AllowDrop = true; 250 this.dtpStartDate.Checked = false; 251 this.dtpStartDate.Location = new System.Drawing.Point(176, 104); 252 this.dtpStartDate.Name = "dtpStartDate"; 253 this.dtpStartDate.Size = new System.Drawing.Size(184, 20); 254 this.dtpStartDate.TabIndex = 11; 255 // 256 // udWeeksToApply 257 // 258 this.udWeeksToApply.Location = new System.Drawing.Point(176, 144); 259 this.udWeeksToApply.Maximum = new decimal(new int[] { 260 52, 261 0, 262 0, 263 0}); 264 this.udWeeksToApply.Minimum = new decimal(new int[] { 265 1, 266 0, 267 0, 268 0}); 269 this.udWeeksToApply.Name = "udWeeksToApply"; 270 this.udWeeksToApply.Size = new System.Drawing.Size(96, 20); 271 this.udWeeksToApply.TabIndex = 12; 272 this.udWeeksToApply.Value = new decimal(new int[] { 273 1, 274 0, 275 0, 276 0}); 277 // 278 // label1 279 // 280 this.label1.Location = new System.Drawing.Point(16, 104); 281 this.label1.Name = "label1"; 282 this.label1.Size = new System.Drawing.Size(152, 16); 283 this.label1.TabIndex = 13; 284 this.label1.Text = "Starting Week:"; 285 this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight; 286 // 287 // label2 288 // 289 this.label2.Location = new System.Drawing.Point(16, 144); 290 this.label2.Name = "label2"; 291 this.label2.Size = new System.Drawing.Size(152, 16); 292 this.label2.TabIndex = 13; 293 this.label2.Text = "Number of Weeks to Apply:"; 294 this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; 295 // 296 // DAccessTemplate 297 // 298 this.AcceptButton = this.cmdOK; 299 this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); 300 this.CancelButton = this.cmdCancel; 301 this.ClientSize = new System.Drawing.Size(440, 304); 302 this.Controls.Add(this.label1); 303 this.Controls.Add(this.udWeeksToApply); 304 this.Controls.Add(this.dtpStartDate); 305 this.Controls.Add(this.txtTemplate); 306 this.Controls.Add(this.cmdSelectTemplate); 307 this.Controls.Add(this.pnlDescription); 308 this.Controls.Add(this.pnlPageBottom); 309 this.Controls.Add(this.label2); 310 this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; 311 this.Name = "DAccessTemplate"; 312 this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; 313 this.Text = "Apply Access Template"; 314 this.Closing += new System.ComponentModel.CancelEventHandler(this.DAccessTemplate_Closing); 315 this.pnlPageBottom.ResumeLayout(false); 316 this.pnlDescription.ResumeLayout(false); 317 this.grpDescriptionResourceGroup.ResumeLayout(false); 318 ((System.ComponentModel.ISupportInitialize)(this.udWeeksToApply)).EndInit(); 319 this.ResumeLayout(false); 320 this.PerformLayout(); 323 321 324 322 }
Note:
See TracChangeset
for help on using the changeset viewer.