Changeset 1143 for Scheduling/trunk/cs/bsdx0200GUISourceCode
- Timestamp:
- Apr 14, 2011, 8:33:14 AM (14 years ago)
- Location:
- Scheduling/trunk/cs/bsdx0200GUISourceCode
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
Scheduling/trunk/cs/bsdx0200GUISourceCode/CGDocument.cs
r1128 r1143 1016 1016 if (sErrorID == "-1") 1017 1017 pAppt.Note = sNote; 1018 1019 if (this.m_appointments.AppointmentTable.ContainsKey(nApptID))1020 {1021 bool bRet = RefreshAvailabilitySchedule();1022 UpdateAllViews();1023 }1024 1018 } 1025 1019 catch (Exception ex) -
Scheduling/trunk/cs/bsdx0200GUISourceCode/CGDocumentManager.cs
r1131 r1143 400 400 catch (System.Net.Sockets.SocketException) 401 401 { 402 MessageBox.Show("Cannot connect to VistA.Network Error");402 m_ds.RemoteMsgBox("Can't connect to server! Network Error"); 403 403 return false; 404 404 } … … 438 438 catch (System.Net.Sockets.SocketException) 439 439 { 440 MessageBox.Show("Cannot connect to VistA. Network Error");440 m_ds.RemoteMsgBox("Cannot connect to VistA. Network Error"); 441 441 } 442 442 catch (BMXNetException ex) 443 443 { 444 if ( MessageBox.Show("Unable to connect to VistA. " + ex.Message, "Clinical Scheduling", MessageBoxButtons.RetryCancel) == DialogResult.Retry)444 if (m_ds.RemoteMsgBox("Unable to connect to VistA. " + ex.Message, "Clinical Scheduling", MessageBoxButtons.RetryCancel) == DialogResult.Retry) 445 445 { 446 446 bRetry = true; -
Scheduling/trunk/cs/bsdx0200GUISourceCode/CGView.cs
r1131 r1143 428 428 // 429 429 this.mnuNewAppointment.Index = 0; 430 this.mnuNewAppointment.Shortcut = System.Windows.Forms.Shortcut.Ins; 430 431 this.mnuNewAppointment.Text = "&New Appointment"; 431 432 this.mnuNewAppointment.Click += new System.EventHandler(this.mnuNewAppointment_Click); … … 434 435 // 435 436 this.mnuEditAppointment.Index = 1; 437 this.mnuEditAppointment.Shortcut = System.Windows.Forms.Shortcut.F2; 436 438 this.mnuEditAppointment.Text = "&Edit Appointment"; 437 439 this.mnuEditAppointment.Click += new System.EventHandler(this.mnuEditAppointment_Click); … … 440 442 // 441 443 this.mnuDeleteAppointment.Index = 2; 444 this.mnuDeleteAppointment.Shortcut = System.Windows.Forms.Shortcut.Del; 442 445 this.mnuDeleteAppointment.Text = "Cance&l Appointment"; 443 446 this.mnuDeleteAppointment.Click += new System.EventHandler(this.mnuDeleteAppointment_Click); … … 481 484 this.mnuFindAppt.Index = 9; 482 485 this.mnuFindAppt.Shortcut = System.Windows.Forms.Shortcut.CtrlF; 483 this.mnuFindAppt.Text = "&Find Available Appointment";486 this.mnuFindAppt.Text = "&Find Empty Slots"; 484 487 this.mnuFindAppt.Click += new System.EventHandler(this.mnuFindAppt_Click); 485 488 // … … 647 650 this.tvSchedules.Location = new System.Drawing.Point(0, 0); 648 651 this.tvSchedules.Name = "tvSchedules"; 649 this.tvSchedules.Size = new System.Drawing.Size(128, 3 59);652 this.tvSchedules.Size = new System.Drawing.Size(128, 317); 650 653 this.tvSchedules.Sorted = true; 651 654 this.tvSchedules.TabIndex = 1; … … 689 692 // 690 693 this.ctxFindAppt.Index = 3; 691 this.ctxFindAppt.Text = "&Find Available Appointment";694 this.ctxFindAppt.Text = "&Find Empty Slots"; 692 695 this.ctxFindAppt.Click += new System.EventHandler(this.ctxFindAppt_Click); 693 696 // … … 716 719 this.panelRight.Location = new System.Drawing.Point(996, 0); 717 720 this.panelRight.Name = "panelRight"; 718 this.panelRight.Size = new System.Drawing.Size(128, 3 59);721 this.panelRight.Size = new System.Drawing.Size(128, 317); 719 722 this.panelRight.TabIndex = 3; 720 723 this.panelRight.Visible = false; … … 812 815 this.panelCenter.Location = new System.Drawing.Point(136, 24); 813 816 this.panelCenter.Name = "panelCenter"; 814 this.panelCenter.Size = new System.Drawing.Size(857, 311);817 this.panelCenter.Size = new System.Drawing.Size(857, 269); 815 818 this.panelCenter.TabIndex = 7; 816 819 // … … 905 908 this.panelBottom.Controls.Add(this.statusBar1); 906 909 this.panelBottom.Dock = System.Windows.Forms.DockStyle.Bottom; 907 this.panelBottom.Location = new System.Drawing.Point(136, 335);910 this.panelBottom.Location = new System.Drawing.Point(136, 293); 908 911 this.panelBottom.Name = "panelBottom"; 909 912 this.panelBottom.Size = new System.Drawing.Size(857, 24); … … 923 926 this.splitter1.Location = new System.Drawing.Point(128, 24); 924 927 this.splitter1.Name = "splitter1"; 925 this.splitter1.Size = new System.Drawing.Size(8, 335);928 this.splitter1.Size = new System.Drawing.Size(8, 293); 926 929 this.splitter1.TabIndex = 9; 927 930 this.splitter1.TabStop = false; … … 932 935 this.splitter2.Location = new System.Drawing.Point(993, 24); 933 936 this.splitter2.Name = "splitter2"; 934 this.splitter2.Size = new System.Drawing.Size(3, 335);937 this.splitter2.Size = new System.Drawing.Size(3, 293); 935 938 this.splitter2.TabIndex = 10; 936 939 this.splitter2.TabStop = false; … … 955 958 this.calendarGrid1.Resources = ((System.Collections.ArrayList)(resources.GetObject("calendarGrid1.Resources"))); 956 959 this.calendarGrid1.SelectedAppointment = 0; 957 this.calendarGrid1.Size = new System.Drawing.Size(857, 311);960 this.calendarGrid1.Size = new System.Drawing.Size(857, 269); 958 961 this.calendarGrid1.StartDate = new System.DateTime(2003, 1, 27, 0, 0, 0, 0); 959 962 this.calendarGrid1.TabIndex = 0; … … 968 971 // 969 972 this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); 970 this.ClientSize = new System.Drawing.Size(1124, 3 59);973 this.ClientSize = new System.Drawing.Size(1124, 317); 971 974 this.Controls.Add(this.panelCenter); 972 975 this.Controls.Add(this.panelBottom); … … 1817 1820 this.Document.EditAppointment(a, sNote); 1818 1821 1822 if (dAppt.PrintAppointmentSlip) 1823 { 1824 PrintAppointmentSlip(a); 1825 } 1826 1827 //Redraw appointments 1828 this.UpdateArrays(); 1829 1830 //Then tell RPMS that we are updated 1831 RaiseRPMSEvent("BSDX SCHEDULE", a.Resource); 1819 1832 } 1820 1833 catch (Exception ex) … … 2684 2697 this.calendarGrid1.Columns = 5; 2685 2698 this.Document.m_nColumnCount = 5; // MJL 1/17/2007 2686 //this.Document.UpdateAllViews();2687 //TODO: Is there a way to just reuse the existing arrays? How far in the future do they go?2688 2699 RequestRefreshGrid(); 2689 2700 } … … 2693 2704 this.calendarGrid1.Columns = 7; 2694 2705 this.Document.m_nColumnCount = 7; // MJL 1/17/2007 2695 //TODO: Is there a way to just reuse the existing arrays? How far in the future do they go?2696 2706 RequestRefreshGrid(); 2697 2707 } … … 2953 2963 appt.HealthRecordNumber = e.Appointment.HealthRecordNumber; 2954 2964 appt.AccessTypeID = e.AccessTypeID; 2965 appt.Patient = e.Appointment.Patient; 2966 2955 2967 this.Document.CreateAppointment(appt); 2956 2968 … … 3508 3520 } 3509 3521 3510 LoadingSplash _loadingSplash; // Splash object a data point in class 3522 //private delegate DialogResult dLoadingSplash(IWin32Window owner); 3523 string _tempStatusBartext; 3511 3524 3512 3525 /// <summary> 3513 /// Loads a splash that says "Loading" 3526 /// Loads a splash that says "Loading" -- removed it april 13 2010 3514 3527 /// </summary> 3515 3528 private void LoadSplash() 3516 3529 { 3517 _loadingSplash = new LoadingSplash(); 3518 _loadingSplash.StartPosition = FormStartPosition.CenterScreen; //XXX: Don't like this, but will do for now. 3519 _loadingSplash.UseWaitCursor = true; // tell user we are working 3520 Thread threadSplash = new Thread(new ThreadStart(() => _loadingSplash.ShowDialog())); // lambda 3521 threadSplash.IsBackground = true; //expendable thread -- exit even if still running. 3522 threadSplash.Name = "Loading Thread"; 3523 threadSplash.Start(); 3530 _tempStatusBartext = this.statusBar1.Text; 3531 this.statusBar1.Text = "Refreshing Schedule..."; 3532 //_loadingSplash = new LoadingSplash(); 3533 //_loadingSplash.StartPosition = FormStartPosition.CenterScreen; //XXX: Don't like this, but will do for now. 3534 //_loadingSplash.UseWaitCursor = true; // tell user we are working 3535 //_loadingSplash.Show(this); 3536 //Thread threadSplash = new Thread(tstart); 3537 //threadSplash.IsBackground = true; 3538 //threadSplash.Name = "Loading Thread"; 3539 //threadSplash.Start(this); 3540 3541 //Thread threadSplash = new Thread(new ThreadStart(() => _loadingSplash.ShowDialog())); // lambda 3542 //threadSplash.IsBackground = true; //expendable thread -- exit even if still running. 3543 //threadSplash.Name = "Loading Thread"; 3544 //threadSplash.Start(); 3524 3545 } 3525 3546 3526 3547 private void StopSplash() 3527 3548 { 3528 _loadingSplash.RemoteClose();3549 this.statusBar1.Text = _tempStatusBartext; 3529 3550 } 3530 3551 -
Scheduling/trunk/cs/bsdx0200GUISourceCode/CalendarGrid.cs
r1123 r1143 9 9 using System.Runtime.InteropServices; 10 10 using System.Windows.Forms; 11 using System.Linq; 11 12 12 13 /// <summary> … … 125 126 try 126 127 { 128 //calculate each cell's height 127 129 SizeF ef = g.MeasureString("Test", this.m_fCell); 128 130 this.m_cellHeight = ((int) ef.Height) + 4; 129 int nColumns = this.m_nColumns; 130 int num2 = 60 / this.m_nTimeScale; 131 int num3 = 24 * num2; 132 nColumns++; 133 num3++; 134 this.m_cellWidth = 600 / nColumns; 131 132 int nColumns = this.m_nColumns; // columns set via property 133 int slotsPerHour = 60 / this.m_nTimeScale; //time scale set via property 134 int slotsPerDay = 24 * slotsPerHour; 135 nColumns++; // add extra column for time display 136 slotsPerDay++; // not sure here why that's don't 137 138 //calculate each cell's height 139 this.m_cellWidth = 600 / nColumns; // base size is 600 pixels 140 // if larger: 135 141 if (base.ClientRectangle.Width > 600) 136 142 { 137 143 this.m_cellWidth = (base.ClientRectangle.Width - this.m_col0Width) / (nColumns - 1); 138 144 } 145 // if only one column 139 146 if (this.m_nColumns == 1) 140 147 { 141 148 this.m_cellWidth = base.ClientRectangle.Width - this.m_col0Width; 142 149 } 150 //next line seems to be useless (we don't use X and Y below) 143 151 g.TranslateTransform((float) base.AutoScrollPosition.X, (float) base.AutoScrollPosition.Y); 144 for (int i = num3; i > -1; i--) 152 153 //now, build the grid cells 154 for (int i = slotsPerDay; i > -1; i--) 145 155 { 146 156 for (int j = 1; j < nColumns; j++) … … 233 243 } 234 244 245 void CalendarGrid_DragOver(object sender, DragEventArgs e) 246 { 247 //Translate point to client point 248 Point pt = this.PointToClient(new Point(e.X, e.Y)); 249 250 //clear selections 251 foreach (DictionaryEntry entry in this.m_gridCells.CellHashTable) 252 { 253 CGCell cell = (CGCell)entry.Value; 254 cell.IsSelected = false; 255 } 256 this.m_selectedRange.Cells.ClearAllCells(); 257 258 //select a cell based on current drag position to visually assist the user 259 int nRow = -1; 260 int nCol = -1; 261 if (this.HitTest(pt.X, pt.Y, ref nRow, ref nCol)) 262 { 263 CGCell cellFromRowCol = this.m_gridCells.GetCellFromRowCol(nRow, nCol); 264 if (cellFromRowCol != null) 265 { 266 this.m_currentCell = cellFromRowCol; 267 this.m_selectedRange.StartCell = null; 268 this.m_selectedRange.EndCell = null; 269 this.m_selectedRange.CreateRange(this.m_gridCells, cellFromRowCol, cellFromRowCol); 270 271 cellFromRowCol.IsSelected = true; 272 } 273 274 base.Invalidate(); 275 } 276 277 //if Y axis is outside the top or bottom 278 279 if ((pt.Y + 40 >= this.ClientRectangle.Bottom) || (pt.Y - 40 <= this.ClientRectangle.Top)) 280 { 281 //start auto scrolling. m_bScrollDown decides whether we scroll up or down. 282 this.m_bScrollDown = (pt.Y + 40) >= this.ClientRectangle.Bottom; 283 AutoDragStart(); 284 } 285 286 //if Y axis within client rectagle, stop dragging (whether you started or not) 287 if ((pt.Y + 40 < this.ClientRectangle.Bottom) && (pt.Y - 40 > this.ClientRectangle.Top)) 288 { 289 AutoDragStop(); 290 } 291 } 292 235 293 private void CalendarGrid_MouseDown(object sender, MouseEventArgs e) 236 294 { … … 247 305 this.OnLButtonDown(e.X, e.Y, true); 248 306 } 307 //new code!!! smh 4/13/2011 -- refactor later 308 309 else if (e.Button == MouseButtons.Right) 310 { 311 // clear all selected cells, but ONLY if the the pointer is NOT over one of the cells in 312 // the selected range 313 314 int nRow = -1; 315 int nCol = -1; 316 CGCell cellFromRowCol = null; 317 bool _isCellInRange = false; 318 if (this.HitTest(e.X, e.Y, ref nRow, ref nCol)) 319 { 320 cellFromRowCol = this.m_gridCells.GetCellFromRowCol(nRow, nCol); 321 } 322 323 if (cellFromRowCol != null) 324 _isCellInRange = this.m_selectedRange.CellIsInRange(cellFromRowCol); 325 326 if (!_isCellInRange) 327 { 328 foreach (DictionaryEntry entry in this.m_gridCells.CellHashTable) 329 { 330 CGCell cell = (CGCell)entry.Value; 331 cell.IsSelected = false; 332 } 333 this.m_selectedRange.Cells.ClearAllCells(); 334 } 335 336 // clear all selected appointments 337 this.m_SelectedAppointments.ClearAllAppointments(); 338 foreach (CGAppointment a in this.m_Appointments.AppointmentTable.Values) a.Selected = false; 339 this.m_nSelectID = 0; 340 341 OnRButtonDown(e.X, e.Y, _isCellInRange); 342 } 343 344 //end new code!!! /smh 4/13/2011 249 345 } 250 346 251 347 private void CalendarGrid_MouseMove(object Sender, MouseEventArgs e) 252 348 { 253 //test254 //System.Diagnostics.Debug.Write(watch.ElapsedMilliseconds + "\n");255 //test256 349 257 350 //if the left mouse button is down and we are moving the mouse... … … 288 381 this.m_bDragDropStart = true; 289 382 } 290 383 } 291 384 } 292 385 else 293 386 { 294 //test 295 AutoDragStop(); //is this needed? 296 //test 387 388 AutoDragStop(); //is this needed? //just in case maybe 389 390 //this code below displays the tooltip if we are moving the mouse over an appointment 297 391 int y = e.Y - base.AutoScrollPosition.Y; 298 392 int x = e.X - base.AutoScrollPosition.X; … … 307 401 } 308 402 this.m_toolTip.RemoveAll(); 309 310 ////smh new code -- select cell311 //int nRow = -1;312 //int nCol = -1;313 314 ////Is the mouse over a known cell? If so, highlight cell315 //if (this.HitTest(x, y, ref nRow, ref nCol))316 //{317 // CGCell cellFromRowCol = this.m_gridCells.GetCellFromRowCol(nRow, nCol);318 // if (cellFromRowCol != null)319 // {320 // this.m_currentCell = cellFromRowCol;321 // this.m_selectedRange.StartCell = null;322 // this.m_selectedRange.EndCell = null;323 // this.m_selectedRange.CreateRange(this.m_gridCells, cellFromRowCol, cellFromRowCol);324 // this.m_bSelectingRange = true;325 // cellFromRowCol.IsSelected = true;326 // base.Invalidate(this.m_currentCell.CellRectangle);327 // //base.Invalidate();328 // }329 //}330 331 332 403 } 333 404 } … … 515 586 // flag is true only if there are no cells what so ever in the screen 516 587 // Only true when no resource is selected. 517 bool flag = this.m_gridCells.CellCount == 0;588 bool noCellsFlag = this.m_gridCells.CellCount == 0; 518 589 519 590 // Move the base point from the client screen to the scrolling region top-left corner. … … 600 671 num12 = this.m_col0Width; 601 672 } 602 if (k > 1) // 673 if (k > 1) // if we are subsequent columns, adjust accordingly 603 674 { 604 675 num12 = this.m_col0Width + (this.m_cellWidth * (k - 1)); 605 676 } 677 //make a rectangle for the cell 606 678 Point point4 = new Point(num12, j * this.m_cellHeight); 607 679 Rectangle r = new Rectangle(point4.X, point4.Y, this.m_cellWidth, this.m_cellHeight); 608 if (j != 0) 609 { 610 CGCell cellFromRowCol = null; 611 if ( flag)680 if (j != 0) // if we are not at the top (we are starting from the bottom) 681 { 682 CGCell cellFromRowCol = null; 683 if (noCellsFlag) //if there are no cells, create the cell 612 684 { 613 685 cellFromRowCol = new CGCell(r, j, k); 614 686 this.m_gridCells.AddCell(cellFromRowCol); 615 687 } 616 else 688 else // otherwise, get the cell from the m_gridCells array 617 689 { 618 690 cellFromRowCol = this.m_gridCells.GetCellFromRowCol(j, k); 619 691 cellFromRowCol.CellRectangle = r; 620 692 } 621 if (this.m_sResourcesArray.Count > 0) 693 if (this.m_sResourcesArray.Count > 0) // if we have any resources open 622 694 { 623 695 //IMP 624 696 //this is the place where we the selected cells are drawn in Light Light Blue. 625 697 //IMP 698 // if cell is selected, draw it in Aquamarine (light light blue) 626 699 if (this.m_selectedRange.CellIsInRange(cellFromRowCol)) 627 700 { … … 629 702 //g.FillRectangle(Brushes.AntiqueWhite, r); 630 703 } 704 // otherwise, draw it from Appointment Type Color set by BuildGridCellsArray() 631 705 else 632 706 { 633 707 g.FillRectangle(cellFromRowCol.AppointmentTypeColor, r); 634 708 } 709 // finally the drawing 635 710 g.DrawRectangle(pen, r.X, r.Y, r.Width, r.Height); 711 // once done with availabilities, draw the appointments 636 712 if (j == 1) 637 713 { … … 641 717 continue; 642 718 } 719 720 //Below draws the top column either containing the dates or resources 643 721 if (!this.m_bScroll) 644 722 { … … 922 1000 this.MouseUp += new System.Windows.Forms.MouseEventHandler(this.CalendarGrid_MouseUp); 923 1001 this.DragEnter += new System.Windows.Forms.DragEventHandler(this.CalendarGrid_DragEnter); 1002 this.DragOver += new DragEventHandler(CalendarGrid_DragOver); 924 1003 this.ResumeLayout(false); 925 1004 926 1005 } 927 1006 1007 928 1008 private static int MinSince80(DateTime d) 929 1009 { … … 931 1011 TimeSpan span = (TimeSpan) (d - time); 932 1012 return (int) span.TotalMinutes; 1013 } 1014 1015 //new code1!! smh 4/14/2011 1016 private void OnRButtonDown(int X, int Y, bool RangeAlreadySelected) 1017 { 1018 //if right mouse button is clicked, select an appointment if mouse hovers over one 1019 foreach (CGAppointment appointment3 in this.m_Appointments.AppointmentTable.Values) 1020 { 1021 int y = Y - base.AutoScrollPosition.Y; 1022 int x = X - base.AutoScrollPosition.X; 1023 Point pt = new Point(x, y); 1024 1025 if (!appointment3.GridRectangle.Contains(pt)) 1026 { 1027 continue; 1028 } 1029 this.m_bMouseDown = false; 1030 1031 this.m_SelectedAppointments.AddAppointment(appointment3); 1032 appointment3.Selected = true; 1033 this.m_nSelectID = appointment3.AppointmentKey; 1034 //this.m_bGridEnter = true; 1035 } 1036 1037 // if we find an appointment, redraw the grid 1038 if (this.m_SelectedAppointments.AppointmentCount > 0) 1039 { 1040 base.Invalidate(); 1041 return; 1042 } 1043 1044 // Otherwise, select a cell, but only if we don't don't have an existing range 1045 if (RangeAlreadySelected) return; 1046 1047 // Ok, select cell here 1048 int nRow = -1; 1049 int nCol = -1; 1050 if (this.HitTest(X, Y, ref nRow, ref nCol)) 1051 { 1052 CGCell cellFromRowCol = this.m_gridCells.GetCellFromRowCol(nRow, nCol); 1053 if (cellFromRowCol != null) 1054 { 1055 this.m_currentCell = cellFromRowCol; 1056 this.m_selectedRange.StartCell = null; 1057 this.m_selectedRange.EndCell = null; 1058 this.m_selectedRange.CreateRange(this.m_gridCells, cellFromRowCol, cellFromRowCol); 1059 1060 cellFromRowCol.IsSelected = true; 1061 } 1062 1063 base.Invalidate(); 1064 return; 1065 } 933 1066 } 934 1067 … … 1067 1200 if (this.m_gridCells.CellCount != 0) 1068 1201 { 1202 // this happens for the CGAVView Grid 1069 1203 foreach (DictionaryEntry entry in this.m_gridCells.CellHashTable) 1070 1204 { … … 1072 1206 cell.AppointmentTypeColor = (this.m_GridBackColor == "blue") ? Brushes.CornflowerBlue : Brushes.Khaki; 1073 1207 } 1208 // won't happen for CGAVView Grid b/c it has no availabilites 1209 // BUT, will happen for normal CGView Grid if there any availabilies 1074 1210 if ((this.m_pAvArray != null) && (this.m_pAvArray.Count != 0)) 1075 1211 { … … 1080 1216 int num3 = 0; 1081 1217 int num4 = 0; 1218 // pick the color from the availability 1082 1219 Brush brush = new SolidBrush(Color.FromArgb(availability.Red, availability.Green, availability.Blue)); 1220 // get starting and ending cell 1083 1221 this.GetCellFromTime(availability.StartTime, ref nRow, ref nCol, true, availability.ResourceList); 1084 1222 this.GetCellFromTime(availability.EndTime, ref num3, ref num4, false, availability.ResourceList); 1223 // for each of the range cells between starting and ending, change their color 1085 1224 for (int i = nCol; i <= num4; i++) 1086 1225 { … … 1328 1467 { 1329 1468 this.m_nColumns = value; 1330 this.m_gridCells.ClearAllCells(); 1331 this.m_selectedRange.Cells.ClearAllCells(); 1469 //new line 1470 this.SetColumnInfo(); // redoes the columns if we have multiple resources 1471 //end new line 1472 this.m_gridCells.ClearAllCells(); //remove all cells 1473 this.m_selectedRange.Cells.ClearAllCells(); //remove selected range 1332 1474 Graphics g = base.CreateGraphics(); 1333 this.BuildGridCellsArray(g); 1334 this.SetAppointmentTypes(); 1335 base.Invalidate(); 1475 this.BuildGridCellsArray(g); //rebuild the cells 1476 this.SetAppointmentTypes(); //set the colors on the cells for availabilities 1477 base.Invalidate(); //Fire paint to call DrawGrid 1336 1478 } 1337 1479 } -
Scheduling/trunk/cs/bsdx0200GUISourceCode/ClinicalScheduling.csproj.user
r1131 r1143 37 37 </RemoteDebugMachine> 38 38 <StartAction>Project</StartAction> 39 <StartArguments>/s=172.16.16.108 /p=9250 /a= BASMA.ALDWAIRI /v=SELEN.123</StartArguments>39 <StartArguments>/s=172.16.16.108 /p=9250 /a=s.habiel /v=catdog.66</StartArguments> 40 40 <StartPage> 41 41 </StartPage> -
Scheduling/trunk/cs/bsdx0200GUISourceCode/DApptSearch.cs
r1123 r1143 5 5 using System.Data; 6 6 using System.Linq; 7 //using System.Data.OleDb;8 7 9 8 namespace IndianHealthService.ClinicalScheduling … … 114 113 { 115 114 116 this.Text = "Searching for Appointments in: " + string.Join(" | ", alResources.Cast<string>());115 this.Text = "Searching for available slots in: " + string.Join(" | ", alResources.Cast<string>()); 117 116 118 117 this.m_DocManager = docManager; … … 275 274 { 276 275 this.panel1 = new System.Windows.Forms.Panel(); 276 this.lblMessage = new System.Windows.Forms.Label(); 277 277 this.cmdSearch = new System.Windows.Forms.Button(); 278 278 this.cmdCancel = new System.Windows.Forms.Button(); … … 313 313 this.colSlots = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 314 314 this.colAccessType = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 315 this.lblMessage = new System.Windows.Forms.Label();316 315 this.panel1.SuspendLayout(); 317 316 this.pnlDescription.SuspendLayout(); … … 335 334 this.panel1.TabIndex = 4; 336 335 // 336 // lblMessage 337 // 338 this.lblMessage.AutoSize = true; 339 this.lblMessage.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 340 this.lblMessage.ForeColor = System.Drawing.Color.Red; 341 this.lblMessage.Location = new System.Drawing.Point(337, 16); 342 this.lblMessage.Name = "lblMessage"; 343 this.lblMessage.Size = new System.Drawing.Size(0, 16); 344 this.lblMessage.TabIndex = 3; 345 // 337 346 // cmdSearch 338 347 // … … 390 399 this.lblDescription.Size = new System.Drawing.Size(917, 45); 391 400 this.lblDescription.TabIndex = 1; 392 this.lblDescription.Text = "Search for available appointment times using this panel. You may narrow your sea" +393 " rch by selecting an access type or by selecting specific days of the week or tim" +394 " es ofday.";401 this.lblDescription.Text = "Search for available slots times using this panel. You may narrow your search by" + 402 " selecting an access type or by selecting specific days of the week or times of " + 403 "day."; 395 404 // 396 405 // groupBox1 … … 676 685 this.colAccessType.Text = "Access Type"; 677 686 this.colAccessType.Width = 101; 678 //679 // lblMessage680 //681 this.lblMessage.AutoSize = true;682 this.lblMessage.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));683 this.lblMessage.ForeColor = System.Drawing.Color.Red;684 this.lblMessage.Location = new System.Drawing.Point(337, 16);685 this.lblMessage.Name = "lblMessage";686 this.lblMessage.Size = new System.Drawing.Size(0, 16);687 this.lblMessage.TabIndex = 3;688 687 // 689 688 // DApptSearch … … 899 898 900 899 if (items.Length > 0) lstResults.Items.AddRange(items); // add new data 901 else this.lblMessage.Text = "No available Appointment Slots Found!";900 else this.lblMessage.Text = "No available slots found!"; 902 901 903 902 lstResults.EndUpdate(); // ok done adding items, draw now. … … 944 943 { 945 944 this.DialogResult = DialogResult.None; 946 lblMessage.Text = "No Appointment Slot selected!";945 lblMessage.Text = "No slot selected!"; 947 946 return; 948 947 } 949 948 950 long availabilityKey = long.Parse(lstResults.SelectedItems[0].SubItems[0].Text);949 int availabilityKey = Int32.Parse(lstResults.SelectedItems[0].SubItems[0].Text); 951 950 _selectedAvailability = (from av in lstResultantAvailabilities 952 951 where av.AvailabilityType == availabilityKey -
Scheduling/trunk/cs/bsdx0200GUISourceCode/DSplash.cs
r1061 r1143 8 8 { 9 9 /// <summary> 10 /// Summary description for DSplash. 10 /// Program loading splash screen. Notice the numerous remote methods intended 11 /// to mickey mouse the form from another thread. 12 /// 13 /// I don't know of a better way of doing this right now. 11 14 /// </summary> 12 15 public class DSplash : System.Windows.Forms.Form … … 147 150 public delegate void dAny(); 148 151 public delegate void dProgressBarSet(int number); 152 public delegate DialogResult dMessageBox(IWin32Window owner, string message); 153 public delegate DialogResult dMessageBox2(IWin32Window owner, string message, string caption, MessageBoxButtons btns); 149 154 150 155 public void SetStatus(string sStatus) … … 165 170 } 166 171 172 public DialogResult RemoteMsgBox(string msg) 173 { 174 dMessageBox d = new dMessageBox(MessageBox.Show); 175 return (DialogResult)this.Invoke(d, this, msg); 176 } 177 178 public DialogResult RemoteMsgBox(string msg, string caption, MessageBoxButtons btns) 179 { 180 dMessageBox2 d = new dMessageBox2(MessageBox.Show); 181 return (DialogResult)this.Invoke(d, this, msg, caption, btns); 182 } 183 167 184 public void RemoteClose() 168 185 { 169 186 dAny d = new dAny(this.Close); 187 this.Invoke(d); 188 } 189 190 public void RemoteActivate() 191 { 192 dAny d = new dAny(this.Activate); 193 this.Invoke(d); 194 } 195 196 public void RemoteHide() 197 { 198 dAny d = new dAny(this.Hide); 170 199 this.Invoke(d); 171 200 }
Note:
See TracChangeset
for help on using the changeset viewer.