Changeset 900 for Scheduling/trunk/cs/bsdx0200GUISourceCode/CalendarGrid.cs
- Timestamp:
- Aug 10, 2010, 8:00:01 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Scheduling/trunk/cs/bsdx0200GUISourceCode/CalendarGrid.cs
r846 r900 659 659 DateTime endTime = a.EndTime; 660 660 string resource = a.Resource; 661 int num= 0;662 int num2= 0;663 int num3= 0;664 int num4= 0;665 int num5= 0;661 int originX = 0; 662 int originY = 0; 663 int recHeight = 0; 664 int recWidth = 0; 665 int columnToPutAppt = 0; 666 666 Rectangle rectangle = new Rectangle(); 667 int totalMinutes = (int) startTime.TimeOfDay.TotalMinutes; 668 int num7 = (int) endTime.TimeOfDay.TotalMinutes; 667 int startTotalMinutesoffset = (int) startTime.TimeOfDay.TotalMinutes; 668 int endTotalMinutesoffset = (int) endTime.TimeOfDay.TotalMinutes; 669 // if grid has more than one reource 669 670 if (this.m_sResourcesArray.Count > 1) 670 671 { 671 num5 = (int) this.m_ColumnInfoTable[resource]; 672 num5++; 672 // get zero based index 673 columnToPutAppt = (int) this.m_ColumnInfoTable[resource]; 674 // increment to 1 based index 675 columnToPutAppt++; 673 676 } 674 677 else 675 678 { 676 num5 = ((int) (startTime.DayOfWeek - this.m_dtStart.DayOfWeek))+ 1;677 } 678 if ( num5< 1)679 columnToPutAppt = (startTime - this.m_dtStart).Days + 1; 680 } 681 if (columnToPutAppt < 1) 679 682 { 680 683 bRet = false; 681 684 return rectangle; 682 685 } 683 num = col0Width + (cellWidth * (num5- 1));684 int num8 = totalMinutes+ this.m_nTimeScale;685 int num9 = ( num7 > 0) ? num7: 0x5a0;686 num9 -= totalMinutes;687 num2= (cellHeight * num8) / this.m_nTimeScale;688 num3= (cellHeight * num9) / this.m_nTimeScale;689 num4= cellWidth;690 rectangle.X = num;691 rectangle.Y = num2;692 rectangle.Width = num4;693 rectangle.Height = num3;686 originX = col0Width + (cellWidth * (columnToPutAppt - 1)); 687 int num8 = startTotalMinutesoffset + this.m_nTimeScale; 688 int num9 = (endTotalMinutesoffset > 0) ? endTotalMinutesoffset : 0x5a0; 689 num9 -= startTotalMinutesoffset; 690 originY = (cellHeight * num8) / this.m_nTimeScale; 691 recHeight = (cellHeight * num9) / this.m_nTimeScale; 692 recWidth = cellWidth; 693 rectangle.X = originX; 694 rectangle.Y = originY; 695 rectangle.Width = recWidth; 696 rectangle.Height = recHeight; 694 697 bRet = true; 695 698 return rectangle;
Note:
See TracChangeset
for help on using the changeset viewer.