source: Scheduling/trunk/cs/bsdx0200GUISourceCode/CGRange.cs@ 1535

Last change on this file since 1535 was 622, checked in by Sam Habiel, 15 years ago

This update does the following:

File size: 3.1 KB
Line 
1namespace IndianHealthService.ClinicalScheduling
2{
3 using System;
4 /// <summary>
5 /// This class was regenerated from Calendargrid.dll using Reflector.exe
6 /// by Sam Habiel for WorldVista. The original source code is lost.
7 /// </summary>
8 public class CGRange
9 {
10 private CGCells m_Cells;
11 private CGCell m_gcEnd;
12 private CGCell m_gcStart;
13
14 public CGRange()
15 {
16 this.m_Cells = new CGCells();
17 }
18
19 public CGRange(CGCells gridCells, CGCell gcStart, CGCell gcEnd)
20 {
21 this.CreateRange(gridCells, gcStart, gcEnd);
22 }
23
24 public void AppendCell(CGCells gridCells, CGCell aCell)
25 {
26 if ((aCell != this.StartCell) && (aCell.CellColumn == this.StartCell.CellColumn))
27 {
28 CGCell startCell = this.StartCell;
29 this.m_Cells.ClearAllCells();
30 this.CreateRange(gridCells, startCell, aCell);
31 }
32 }
33
34 public bool CellIsInRange(CGCell cgCell)
35 {
36 return this.m_Cells.CellHashTable.ContainsKey(cgCell.Key);
37 }
38
39 public void CreateRange(CGCells gridCells, CGCell sCell, CGCell eCell)
40 {
41 this.m_Cells.ClearAllCells();
42 this.m_Cells.AddCell(sCell);
43 this.m_gcStart = sCell;
44 this.m_gcEnd = eCell;
45 if (sCell != eCell)
46 {
47 int num;
48 CGCell r = null;
49 if (sCell.CellRow < eCell.CellRow)
50 {
51 for (num = sCell.CellRow + 1; num <= eCell.CellRow; num++)
52 {
53 r = gridCells.GetCellFromRowCol(num, eCell.CellColumn);
54 this.m_Cells.AddCell(r);
55 }
56 }
57 else
58 {
59 for (num = sCell.CellRow - 1; num >= eCell.CellRow; num--)
60 {
61 r = gridCells.GetCellFromRowCol(num, eCell.CellColumn);
62 this.m_Cells.AddCell(r);
63 }
64 }
65 }
66 }
67
68 public void SubtractCell(CGCells gridCells, CGCell aCell, bool bUp)
69 {
70 int nRow = bUp ? (this.m_gcEnd.CellRow - 1) : (this.m_gcEnd.CellRow + 1);
71 int cellColumn = this.m_gcEnd.CellColumn;
72 this.Cells.RemoveCell(this.m_gcEnd.Key);
73 this.m_gcEnd = gridCells.GetCellFromRowCol(nRow, cellColumn);
74 }
75
76 public CGCells Cells
77 {
78 get
79 {
80 return this.m_Cells;
81 }
82 }
83
84 public CGCell EndCell
85 {
86 get
87 {
88 return this.m_gcEnd;
89 }
90 set
91 {
92 this.m_gcEnd = value;
93 }
94 }
95
96 public CGCell StartCell
97 {
98 get
99 {
100 return this.m_gcStart;
101 }
102 set
103 {
104 this.m_gcStart = value;
105 }
106 }
107 }
108}
109
Note: See TracBrowser for help on using the repository browser.