Ignore:
Timestamp:
Jan 19, 2011, 9:02:59 AM (13 years ago)
Author:
Sam Habiel
Message:

CGDocument:

  • Better constructor to set default values.
  • Removed OnNewDocument and used constructor plus extra arguments instead.
  • Added IsRefreshNeeded method to see if we need to get data from server.

CGDocumentManager:

  • Refactored OnNewDocument out (was going to use Application.Run with the CGView form as argument, that didn't work for re-logging in)
  • Refactored all ChangeServer and ChangeLogin handlers b/c they got broken with previous work.

CGView:

  • this.Activate now in Load to show the form if you use Application.Run(view)
  • Added shortcuts for chaning Server, Login, Division
  • Position the Grid when doing OpenSelectedSchedule to start at the right day.
  • Used IsRefreshNeeded to selectively load the splash screen and contact the database for refresh then close splash screen in RequestRefreshGrid.
File:
1 edited

Legend:

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

    r1070 r1071  
    347347            //
    348348            this.mnuRPMSServer.Index = 3;
     349            this.mnuRPMSServer.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftS;
    349350            this.mnuRPMSServer.Text = "Change VistA &Server";
    350351            this.mnuRPMSServer.Click += new System.EventHandler(this.mnuRPMSServer_Click);
     
    353354            //
    354355            this.mnuRPMSLogin.Index = 4;
     356            this.mnuRPMSLogin.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftL;
    355357            this.mnuRPMSLogin.Text = "Change VistA &Login";
    356358            this.mnuRPMSLogin.Click += new System.EventHandler(this.mnuRPMSLogin_Click);
     
    359361            //
    360362            this.mnuRPMSDivision.Index = 5;
     363            this.mnuRPMSDivision.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftD;
    361364            this.mnuRPMSDivision.Text = "Change VistA &Division";
    362365            this.mnuRPMSDivision.Click += new System.EventHandler(this.mnuRPMSDivision_Click);
     
    15441547            //We are doing this--Again?
    15451548                        v =this.DocManager.GetViewByResource(sSelectedTreeResourceArray);
    1546                         v.dateTimePicker1.Value = dDate;
     1549                       
     1550            //Position the Grid
     1551            //XXX: This must be a better way to do this.
     1552            v.dateTimePicker1.Value = dDate;
     1553            v.StartDate = doc.StartDate;
    15471554
    15481555                        //Get preferred time scale from resource info
     
    23762383
    23772384                        this.SetDesktopLocation(this.DesktopLocation.X + 10, this.DesktopLocation.Y + 10);
     2385
     2386            //Show the Form
     2387            this.Activate();
    23782388                }
    23792389
     
    30943104            // Change Date on Document
    30953105            this.Document.SelectedDate = dDate;
    3096            
     3106
     3107            // Do we need to update?
     3108            bool isRefreshNeeded = this.Document.IsRefreshNeeded();
     3109
    30973110            //Splash when loading and change Cursor
    3098             this.Cursor = Cursors.WaitCursor;
    3099             LoadSplash();
    3100 
    3101             this.Cursor = Cursors.Default;
    3102             this.Document.RefreshDocument();
    3103            
     3111            if (isRefreshNeeded)
     3112            {
     3113                this.Cursor = Cursors.WaitCursor;
     3114                LoadSplash();
     3115                this.Document.RefreshDocument();
     3116                StopSplash();
     3117                this.Cursor = Cursors.Default;
     3118            }
     3119
     3120
    31043121            if (this.Document.Resources.Count == 1)
    31053122            {
     
    31233140            //XXX: Need to investigate
    31243141            this.Document.UpdateAllViews();
    3125 
    3126             StopSplash();
    3127             this.Cursor = Cursors.Default;
    31283142        }
    31293143
Note: See TracChangeset for help on using the changeset viewer.