Changeset 1066
- Timestamp:
- Jan 16, 2011, 5:41:21 AM (14 years ago)
- Location:
- Scheduling/trunk/cs/bsdx0200GUISourceCode
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Scheduling/trunk/cs/bsdx0200GUISourceCode/CGView.cs
r1062 r1066 6 6 using System.Diagnostics; 7 7 using System.Data; 8 using System.Net;9 using System.Net.Sockets;10 8 using System.Threading; 11 using System.IO;12 9 using IndianHealthService.BMXNet; 13 using System.Reflection;14 10 15 11 … … 652 648 this.tvSchedules.Location = new System.Drawing.Point(0, 0); 653 649 this.tvSchedules.Name = "tvSchedules"; 654 this.tvSchedules.Size = new System.Drawing.Size(128, 4 79);650 this.tvSchedules.Size = new System.Drawing.Size(128, 437); 655 651 this.tvSchedules.Sorted = true; 656 652 this.tvSchedules.TabIndex = 1; … … 700 696 this.panelRight.Location = new System.Drawing.Point(941, 0); 701 697 this.panelRight.Name = "panelRight"; 702 this.panelRight.Size = new System.Drawing.Size(128, 4 79);698 this.panelRight.Size = new System.Drawing.Size(128, 437); 703 699 this.panelRight.TabIndex = 3; 704 700 this.panelRight.Visible = false; … … 778 774 this.dateTimePicker1.Size = new System.Drawing.Size(128, 20); 779 775 this.dateTimePicker1.TabIndex = 1; 780 this.dateTimePicker1.ValueChanged += new System.EventHandler(this.dateTimePicker1_ValueChanged); 776 this.dateTimePicker1.CloseUp += new System.EventHandler(this.dateTimePicker1_CloseUp); 777 this.dateTimePicker1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.dateTimePicker1_KeyPress); 778 this.dateTimePicker1.Leave += new System.EventHandler(this.dateTimePicker1_Leave); 781 779 // 782 780 // lblResource … … 796 794 this.panelCenter.Location = new System.Drawing.Point(136, 24); 797 795 this.panelCenter.Name = "panelCenter"; 798 this.panelCenter.Size = new System.Drawing.Size(802, 431);796 this.panelCenter.Size = new System.Drawing.Size(802, 389); 799 797 this.panelCenter.TabIndex = 7; 800 798 // … … 818 816 this.calendarGrid1.Resources = ((System.Collections.ArrayList)(resources.GetObject("calendarGrid1.Resources"))); 819 817 this.calendarGrid1.SelectedAppointment = 0; 820 this.calendarGrid1.Size = new System.Drawing.Size(802, 431);818 this.calendarGrid1.Size = new System.Drawing.Size(802, 389); 821 819 this.calendarGrid1.StartDate = new System.DateTime(2003, 1, 27, 0, 0, 0, 0); 822 820 this.calendarGrid1.TabIndex = 0; … … 910 908 this.panelBottom.Controls.Add(this.statusBar1); 911 909 this.panelBottom.Dock = System.Windows.Forms.DockStyle.Bottom; 912 this.panelBottom.Location = new System.Drawing.Point(136, 4 55);910 this.panelBottom.Location = new System.Drawing.Point(136, 413); 913 911 this.panelBottom.Name = "panelBottom"; 914 912 this.panelBottom.Size = new System.Drawing.Size(802, 24); … … 928 926 this.splitter1.Location = new System.Drawing.Point(128, 24); 929 927 this.splitter1.Name = "splitter1"; 930 this.splitter1.Size = new System.Drawing.Size(8, 4 55);928 this.splitter1.Size = new System.Drawing.Size(8, 413); 931 929 this.splitter1.TabIndex = 9; 932 930 this.splitter1.TabStop = false; … … 937 935 this.splitter2.Location = new System.Drawing.Point(938, 24); 938 936 this.splitter2.Name = "splitter2"; 939 this.splitter2.Size = new System.Drawing.Size(3, 4 55);937 this.splitter2.Size = new System.Drawing.Size(3, 413); 940 938 this.splitter2.TabIndex = 10; 941 939 this.splitter2.TabStop = false; … … 949 947 // 950 948 this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); 951 this.ClientSize = new System.Drawing.Size(1069, 4 79);949 this.ClientSize = new System.Drawing.Size(1069, 437); 952 950 this.Controls.Add(this.panelCenter); 953 951 this.Controls.Add(this.panelBottom); … … 1496 1494 } 1497 1495 1496 1498 1497 private void OpenSelectedSchedule(ArrayList sSelectedTreeResourceArray, DateTime dDate) 1499 1498 { 1500 1499 //If resource already open, then navigate to its window 1500 //XXX: Why is this doc definition here? Should be under else scope 1501 //XXX: Use Bananna peeling instead of if/else 1501 1502 CGDocument doc; 1502 1503 CGView v =this.DocManager.GetViewByResource(sSelectedTreeResourceArray); … … 1523 1524 for (int j=0; j < sSelectedTreeResourceArray.Count; j++) 1524 1525 { 1526 // Investigate this. This draws the grid when there is nothing to draw!!! 1525 1527 doc.AddResource((string) sSelectedTreeResourceArray[j]); 1526 1528 } 1529 1527 1530 doc.DocName = this.m_sDocName; 1528 try 1531 1532 try 1529 1533 { 1530 1534 doc.OnOpenDocument(); 1531 1535 } 1532 catch (Exception ex) 1536 1537 catch (Exception ex) 1533 1538 { 1534 1539 MessageBox.Show("Unable to open " + m_sDocName + " schedule. " + ex.Message, "Clinical Scheduling"); … … 2246 2251 public void UpdateArrays() 2247 2252 { 2253 // Make sure that we are called synchronously 2248 2254 Debug.Assert(this.InvokeRequired == false,"CGView.UpdateArrays InvokeRequired"); 2249 2255 // This is where you set how the grid will look … … 2377 2383 //Register the view 2378 2384 CGDocumentManager.Current.RegisterDocumentView(this.Document, this); 2379 this.mnu5Day.Click += new System.EventHandler(this.dateTimePicker1_ValueChanged); // MJL 1/17/20072380 this.mnu7Day.Click += new System.EventHandler(this.dateTimePicker1_ValueChanged);2381 2385 2382 2386 //Load the Group-Resource treeview … … 2409 2413 this.Document.m_nColumnCount = 5; // MJL 1/17/2007 2410 2414 //this.Document.UpdateAllViews(); 2415 //TODO: Is there a way to just reuse the existing arrays? How far in the future do they go? 2416 RequestRefreshGrid(); 2411 2417 } 2412 2418 … … 2415 2421 this.calendarGrid1.Columns = 7; 2416 2422 this.Document.m_nColumnCount = 7; // MJL 1/17/2007 2423 //TODO: Is there a way to just reuse the existing arrays? How far in the future do they go? 2424 RequestRefreshGrid(); 2417 2425 } 2418 2426 … … 2580 2588 } 2581 2589 2582 private void dateTimePicker1_ValueChanged(object sender, System.EventArgs e)2583 {2584 DateTime dDate = dateTimePicker1.Value;2585 dDate = dDate.Date;2586 this.Document.SelectedDate = dDate;2587 if (this.Document.Resources.Count == 1)2588 {2589 if (this.calendarGrid1.Columns > 1)2590 {2591 this.StartDate = this.Document.StartDate;2592 }2593 else2594 {2595 this.StartDate = this.Document.SelectedDate;2596 }2597 }2598 else2599 {2600 this.StartDate = this.Document.SelectedDate;2601 }2602 this.Document.UpdateAllViews();2603 this.calendarGrid1.Invalidate();2604 }2605 2590 2606 2591 private void calendarGrid1_CGSelectionChanged(object sender, IndianHealthService.ClinicalScheduling.CGSelectionChangedArgs e) … … 3078 3063 } 3079 3064 3065 3066 3067 private void dateTimePicker1_Leave(object sender, EventArgs e) 3068 { 3069 if (this.Document.SelectedDate != dateTimePicker1.Value.Date) 3070 RequestRefreshGrid(); 3071 } 3072 3073 private void dateTimePicker1_CloseUp(object sender, EventArgs e) 3074 { 3075 if (this.Document.SelectedDate != dateTimePicker1.Value.Date) 3076 RequestRefreshGrid(); 3077 } 3078 3079 private void dateTimePicker1_KeyPress(object sender, KeyPressEventArgs e) 3080 { 3081 //if enter key is pressed: 3082 // Tell windows that we are handling this 3083 // Request a Refresh Grid if the date is different 3084 // Set-Focus to Calendar Grid 3085 if (e.KeyChar == (char)Keys.Enter) 3086 { 3087 e.Handled = true; 3088 3089 if (this.Document.SelectedDate != dateTimePicker1.Value.Date) 3090 RequestRefreshGrid(); 3091 3092 this.CGrid.Focus(); 3093 } 3094 3095 //if escape key is pressed: 3096 // Tell windows that we are handling this 3097 // Set-Focus to Calendar Grid 3098 if (e.KeyChar == (char)Keys.Escape) 3099 { 3100 e.Handled = true; 3101 this.CGrid.Focus(); 3102 } 3103 } 3104 3080 3105 3081 3106 #endregion events 3082 3107 3083 3084 3085 3086 3108 void RequestRefreshGrid() 3109 { 3110 DateTime dDate = dateTimePicker1.Value; 3111 dDate = dDate.Date; 3112 // This below is responsible for redrawing the grid when you change the date. 3113 this.Document.SelectedDate = dDate; 3114 3115 if (this.Document.Resources.Count == 1) 3116 { 3117 if (this.calendarGrid1.Columns > 1) 3118 { 3119 this.StartDate = this.Document.StartDate; 3120 } 3121 else 3122 { 3123 this.StartDate = this.Document.SelectedDate; 3124 } 3125 } 3126 else 3127 { 3128 this.StartDate = this.Document.SelectedDate; 3129 } 3130 //Is this needed? 3131 this.Document.UpdateAllViews(); 3132 //Is this needed? 3133 this.calendarGrid1.Invalidate(); 3134 } 3087 3135 3088 3136 }//End class -
Scheduling/trunk/cs/bsdx0200GUISourceCode/CGView.resx
r804 r1066 113 113 </resheader> 114 114 <resheader name="reader"> 115 <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version= 2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>115 <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 116 116 </resheader> 117 117 <resheader name="writer"> 118 <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version= 2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>118 <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 119 119 </resheader> 120 <metadata name="mainMenu1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version= 2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">120 <metadata name="mainMenu1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 121 121 <value>17, 17</value> 122 122 </metadata> 123 <metadata name="contextMenu1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version= 2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">123 <metadata name="contextMenu1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 124 124 <value>126, 17</value> 125 125 </metadata> 126 <metadata name="ctxApptClipMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version= 2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">126 <metadata name="ctxApptClipMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 127 127 <value>248, 17</value> 128 128 </metadata> 129 <metadata name="ctxCalendarGrid.TrayLocation" type="System.Drawing.Point, System.Drawing, Version= 2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">129 <metadata name="ctxCalendarGrid.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 130 130 <value>382, 17</value> 131 131 </metadata> … … 136 136 </value> 137 137 </data> 138 <metadata name="printRoutingSlip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version= 2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">138 <metadata name="printRoutingSlip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 139 139 <value>512, 17</value> 140 140 </metadata> 141 <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version= 2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">141 <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 142 142 <value>75</value> 143 143 </metadata> 144 <assembly alias="System.Drawing" name="System.Drawing, Version= 2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />144 <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> 145 145 <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> 146 146 <value>
Note:
See TracChangeset
for help on using the changeset viewer.