diff --git a/cs/bsdx0200GUISourceCode/CGDocument.cs b/cs/bsdx0200GUISourceCode/CGDocument.cs index 6540632..2f454d3 100644 --- a/cs/bsdx0200GUISourceCode/CGDocument.cs +++ b/cs/bsdx0200GUISourceCode/CGDocument.cs @@ -272,7 +272,7 @@ namespace IndianHealthService.ClinicalScheduling /* * TEST EXCEPTION -- REMOVE AFTER TESTING */ - //throw new Exception("Simulated Uncaught Exception"); + // throw new Exception("Simulated Uncaught Exception"); /* * TEST EXCEPTION -- REMOVE AFTER TESTING */ @@ -397,6 +397,10 @@ namespace IndianHealthService.ClinicalScheduling } } + /// + /// Refreshes Availablility and Schedules from RPMS. + /// + /// Success or Failure. Should be always Success. private bool RefreshSchedule() { try @@ -585,6 +589,7 @@ namespace IndianHealthService.ClinicalScheduling { //TODO: Test that resource is not currently in list, that it IS a resource, etc this.m_sResourcesArray.Add(sResource); + //UpdateAllViews: Redraws all the open views. But does not call server. this.UpdateAllViews(); } diff --git a/cs/bsdx0200GUISourceCode/CGDocumentManager.cs b/cs/bsdx0200GUISourceCode/CGDocumentManager.cs index 80e895d..b76f768 100644 --- a/cs/bsdx0200GUISourceCode/CGDocumentManager.cs +++ b/cs/bsdx0200GUISourceCode/CGDocumentManager.cs @@ -172,6 +172,11 @@ namespace IndianHealthService.ClinicalScheduling // Note: Imported From kernel32.dll AttachConsole(ATTACH_PARENT_PROCESS); #endif + +#if TRACE + DateTime startLoadTime = DateTime.Now; +#endif + //Store a class instance of manager. Actual constructor does nothing. _current = new CGDocumentManager(); @@ -196,11 +201,43 @@ namespace IndianHealthService.ClinicalScheduling doc.DocManager = _current; doc.OnNewDocument(); Application.DoEvents(); +#if TRACE + DateTime EndLoadTime = DateTime.Now; + TimeSpan LoadTime = EndLoadTime - startLoadTime; + Debug.Write("Load Time for GUI is " + LoadTime.Seconds + " s & " + LoadTime.Milliseconds + " ms\n"); +#endif + //Application wide error handler for unhandled errors + Application.ThreadException += new ThreadExceptionEventHandler(App_ThreadException); //Run the application + //Sam's Note: This is an unusual way to call this. Typically, it's run with + //the main form as an argument. Application.Run(); } + /// + /// Exception handler for application errors. TODO: Test + /// + /// + /// + static void App_ThreadException(object sender, ThreadExceptionEventArgs e) + { + if (e.Exception is System.Net.Sockets.SocketException) + { + MessageBox.Show("Looks like we lost our connection with the server\nClick OK to terminate the application."); + Application.Exit(); + } + + string msg = "A problem has occured in this applicaton. \r\n\r\n" + + "\t" + e.Exception.Message + "\r\n\r\n" + + "Would you like to continue the application?"; + + DialogResult res = MessageBox.Show(msg, "Unexpected Error", MessageBoxButtons.YesNo); + + if (res == DialogResult.Yes) return; + else Application.Exit(); + } + #region BMXNet Event Handler private void CDocMgrEventHandler(Object obj, BMXNet.BMXNetEventArgs e) diff --git a/cs/bsdx0200GUISourceCode/CalendarGrid.cs b/cs/bsdx0200GUISourceCode/CalendarGrid.cs index 7c0c7cf..b450276 100644 --- a/cs/bsdx0200GUISourceCode/CalendarGrid.cs +++ b/cs/bsdx0200GUISourceCode/CalendarGrid.cs @@ -87,6 +87,12 @@ this.m_sfHour.LineAlignment = StringAlignment.Center; this.m_sfHour.Alignment = StringAlignment.Far; this.m_bInitialUpdate = false; + this.MouseEnter += new EventHandler(CalendarGrid_MouseEnter); + } + + void CalendarGrid_MouseEnter(object sender, EventArgs e) + { + this.Focus(); } private Rectangle AdjustRectForOverlap() diff --git a/cs/bsdx0200GUISourceCode/ClinicalScheduling.csproj b/cs/bsdx0200GUISourceCode/ClinicalScheduling.csproj index fc8f3c8..267be73 100644 --- a/cs/bsdx0200GUISourceCode/ClinicalScheduling.csproj +++ b/cs/bsdx0200GUISourceCode/ClinicalScheduling.csproj @@ -34,7 +34,7 @@ 3.5 - v3.5 + v4.0 false 3202DD11CA9F64F7E52CF7BBED5F17D6E8A1B395 ClinicalScheduling_TemporaryKey.pfx diff --git a/cs/bsdx0200GUISourceCode/ClinicalScheduling.sln b/cs/bsdx0200GUISourceCode/ClinicalScheduling.sln index d56eac2..b7838e6 100644 --- a/cs/bsdx0200GUISourceCode/ClinicalScheduling.sln +++ b/cs/bsdx0200GUISourceCode/ClinicalScheduling.sln @@ -16,8 +16,8 @@ Global {8C05C4F7-FE81-479F-87A0-44E04C7F6E0F}.Release|Any CPU.Build.0 = Debug|Any CPU {DE8E4CC9-4F3A-4E32-8DFE-EE5692E8FC45}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DE8E4CC9-4F3A-4E32-8DFE-EE5692E8FC45}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DE8E4CC9-4F3A-4E32-8DFE-EE5692E8FC45}.Release|Any CPU.ActiveCfg = Debug|Any CPU - {DE8E4CC9-4F3A-4E32-8DFE-EE5692E8FC45}.Release|Any CPU.Build.0 = Debug|Any CPU + {DE8E4CC9-4F3A-4E32-8DFE-EE5692E8FC45}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DE8E4CC9-4F3A-4E32-8DFE-EE5692E8FC45}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/cs/bsdx0200GUISourceCode/ClinicalScheduling.suo b/cs/bsdx0200GUISourceCode/ClinicalScheduling.suo index 47584b9..5af5308 100644 Binary files a/cs/bsdx0200GUISourceCode/ClinicalScheduling.suo and b/cs/bsdx0200GUISourceCode/ClinicalScheduling.suo differ diff --git a/cs/bsdx0200GUISourceCode/bin/Release/BMXNet22.dll b/cs/bsdx0200GUISourceCode/bin/Release/BMXNet22.dll index 41a1004..0c79917 100644 Binary files a/cs/bsdx0200GUISourceCode/bin/Release/BMXNet22.dll and b/cs/bsdx0200GUISourceCode/bin/Release/BMXNet22.dll differ diff --git a/cs/bsdx0200GUISourceCode/bin/Release/ClinicalScheduling.exe b/cs/bsdx0200GUISourceCode/bin/Release/ClinicalScheduling.exe index 936de4c..b2b86db 100644 Binary files a/cs/bsdx0200GUISourceCode/bin/Release/ClinicalScheduling.exe and b/cs/bsdx0200GUISourceCode/bin/Release/ClinicalScheduling.exe differ