Ignore:
Timestamp:
Aug 17, 2010, 8:50:19 AM (14 years ago)
Author:
Sam Habiel
Message:

CGAVDocument contains changes for start day of grid based on weekday locale and colummns
CGAVView: Shortcut keys; correct updating when number of columns is changed in grid
CGDocument: changes for start day of grid. Modified algorithm.
DAccessTemplate: Takes any weekday now for applying a template, not just Monday. Then calculation of start day is done in CGAVView based on locale in the same algorithm that the rest of the GUI uses.
DAppointPage: Now says Mobile/Cell instead of Cell Phone.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Scheduling/trunk/cs/bsdx0200GUISourceCode/DAccessTemplate.cs

    r614 r913  
    8080                private void cmdOK_Click(object sender, System.EventArgs e)
    8181                {
    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.");
    8886                                m_bCancelOK = true;
    8987                                return;
     
    118116                        sPath = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
    119117
    120                         openFileDialog1.InitialDirectory = "c:\\" ;
     118                        openFileDialog1.InitialDirectory = @"c:\" ;
    121119                        openFileDialog1.InitialDirectory = sPath ;
    122120                        openFileDialog1.Filter = "Schedule Template Files (*.bsdxa)|*.bsdxa|All files (*.*)|*.*" ;
     
    152150                private void InitializeComponent()
    153151                {
    154                         this.pnlPageBottom = new System.Windows.Forms.Panel();
    155                         this.cmdCancel = new System.Windows.Forms.Button();
    156                         this.cmdOK = new System.Windows.Forms.Button();
    157                         this.pnlDescription = new System.Windows.Forms.Panel();
    158                         this.grpDescriptionResourceGroup = new System.Windows.Forms.GroupBox();
    159                         this.lblDescriptionResourceGroup = new System.Windows.Forms.Label();
    160                         this.cmdSelectTemplate = new System.Windows.Forms.Button();
    161                         this.txtTemplate = new System.Windows.Forms.TextBox();
    162                         this.dtpStartDate = new System.Windows.Forms.DateTimePicker();
    163                         this.udWeeksToApply = new System.Windows.Forms.NumericUpDown();
    164                         this.label1 = new System.Windows.Forms.Label();
    165                         this.label2 = new System.Windows.Forms.Label();
    166                         this.pnlPageBottom.SuspendLayout();
    167                         this.pnlDescription.SuspendLayout();
    168                         this.grpDescriptionResourceGroup.SuspendLayout();
    169                         ((System.ComponentModel.ISupportInitialize)(this.udWeeksToApply)).BeginInit();
    170                         this.SuspendLayout();
    171                         //
    172                         // pnlPageBottom
    173                         //
    174                         this.pnlPageBottom.Controls.Add(this.cmdCancel);
    175                         this.pnlPageBottom.Controls.Add(this.cmdOK);
    176                         this.pnlPageBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
    177                         this.pnlPageBottom.Location = new System.Drawing.Point(0, 264);
    178                         this.pnlPageBottom.Name = "pnlPageBottom";
    179                         this.pnlPageBottom.Size = new System.Drawing.Size(440, 40);
    180                         this.pnlPageBottom.TabIndex = 7;
    181                         //
    182                         // cmdCancel
    183                         //
    184                         this.cmdCancel.CausesValidation = false;
    185                         this.cmdCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
    186                         this.cmdCancel.Location = new System.Drawing.Point(360, 8);
    187                         this.cmdCancel.Name = "cmdCancel";
    188                         this.cmdCancel.Size = new System.Drawing.Size(56, 24);
    189                         this.cmdCancel.TabIndex = 2;
    190                         this.cmdCancel.Text = "Cancel";
    191                         //
    192                         // cmdOK
    193                         //
    194                         this.cmdOK.DialogResult = System.Windows.Forms.DialogResult.OK;
    195                         this.cmdOK.Location = new System.Drawing.Point(280, 8);
    196                         this.cmdOK.Name = "cmdOK";
    197                         this.cmdOK.Size = new System.Drawing.Size(64, 24);
    198                         this.cmdOK.TabIndex = 1;
    199                         this.cmdOK.Text = "OK";
    200                         this.cmdOK.Click += new System.EventHandler(this.cmdOK_Click);
    201                         //
    202                         // pnlDescription
    203                         //
    204                         this.pnlDescription.Controls.Add(this.grpDescriptionResourceGroup);
    205                         this.pnlDescription.Dock = System.Windows.Forms.DockStyle.Bottom;
    206                         this.pnlDescription.Location = new System.Drawing.Point(0, 184);
    207                         this.pnlDescription.Name = "pnlDescription";
    208                         this.pnlDescription.Size = new System.Drawing.Size(440, 80);
    209                         this.pnlDescription.TabIndex = 8;
    210                         //
    211                         // grpDescriptionResourceGroup
    212                         //
    213                         this.grpDescriptionResourceGroup.Controls.Add(this.lblDescriptionResourceGroup);
    214                         this.grpDescriptionResourceGroup.Dock = System.Windows.Forms.DockStyle.Fill;
    215                         this.grpDescriptionResourceGroup.Location = new System.Drawing.Point(0, 0);
    216                         this.grpDescriptionResourceGroup.Name = "grpDescriptionResourceGroup";
    217                         this.grpDescriptionResourceGroup.Size = new System.Drawing.Size(440, 80);
    218                         this.grpDescriptionResourceGroup.TabIndex = 1;
    219                         this.grpDescriptionResourceGroup.TabStop = false;
    220                         this.grpDescriptionResourceGroup.Text = "Description";
    221                         //
    222                         // lblDescriptionResourceGroup
    223                         //
    224                         this.lblDescriptionResourceGroup.Dock = System.Windows.Forms.DockStyle.Fill;
    225                         this.lblDescriptionResourceGroup.Location = new System.Drawing.Point(3, 16);
    226                         this.lblDescriptionResourceGroup.Name = "lblDescriptionResourceGroup";
    227                         this.lblDescriptionResourceGroup.Size = new System.Drawing.Size(434, 61);
    228                         this.lblDescriptionResourceGroup.TabIndex = 0;
    229                         this.lblDescriptionResourceGroup.Text = "Use this panel to define an access pattern for future clinic availability.";
    230                         //
    231                         // cmdSelectTemplate
    232                         //
    233                         this.cmdSelectTemplate.Location = new System.Drawing.Point(24, 40);
    234                         this.cmdSelectTemplate.Name = "cmdSelectTemplate";
    235                         this.cmdSelectTemplate.Size = new System.Drawing.Size(136, 32);
    236                         this.cmdSelectTemplate.TabIndex = 9;
    237                         this.cmdSelectTemplate.Text = "Select Access Template";
    238                         this.cmdSelectTemplate.Click += new System.EventHandler(this.cmdSelectTemplate_Click);
    239                         //
    240                         // txtTemplate
    241                         //
    242                         this.txtTemplate.Location = new System.Drawing.Point(176, 32);
    243                         this.txtTemplate.Multiline = true;
    244                         this.txtTemplate.Name = "txtTemplate";
    245                         this.txtTemplate.ReadOnly = true;
    246                         this.txtTemplate.Size = new System.Drawing.Size(248, 48);
    247                         this.txtTemplate.TabIndex = 10;
    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                                                                                                                                                    0,
    265                                                                                                                                                    0,
    266                                                                                                                                                    0});
    267                         this.udWeeksToApply.Minimum = new System.Decimal(new int[] {
    268                                                                                                                                                    1,
    269                                                                                                                                                    0,
    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                                                                                                                                                 0,
    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();
    323321
    324322                }
Note: See TracChangeset for help on using the changeset viewer.