source: Scheduling/trunk/cs/bsdx0200GUISourceCode/CGAppointments.cs@ 1073

Last change on this file since 1073 was 1073, checked in by Sam Habiel, 13 years ago

calendarGrid: Removed MouseEnter event and added it to CGView which now has to handle it properly.
CGAppointments: now supports cloning.
CGDocument: Added RefreshDocumentAsync, which retrives data from the server w/o asking the grid to refersh.
CGDocumentManager: CGView.InitializeDocView does not take appointments as argument; callers are changed.
CGView: Many Changes:

  • Opening a Schedule nows calls up a splash and a wait cursor while loading.
  • Events coming from the server are now handled asynchronously (not on UI thread). This results in much better responsiveness.
  • Appointments, Availabilities, Resources are all set in the CalendarGrid by UpdateArrays; as a centralized point of drawing the grid.
  • A mistaken "feature"--stealing focus from each others windows, was removed--CalendarGrid.Focus event only fired now if the form is the Active Form. This is accomplished using GetActiveWindow() from user32.dll (a Win32 API).

LoadingSplash: Opacity removed; form resized.

File size: 1.8 KB
Line 
1namespace IndianHealthService.ClinicalScheduling
2{
3 using System;
4 using System.Collections;
5 /// <summary>
6 /// This class was regenerated from Calendargrid.dll using Reflector.exe
7 /// by Sam Habiel for WorldVista. The original source code is lost.
8 /// </summary>
9 [Serializable]
10 public class CGAppointments : IEnumerable, ICloneable
11 {
12 private Hashtable apptList = new Hashtable();
13
14 public void AddAppointment(CGAppointment appt)
15 {
16 if (this.apptList.ContainsKey(appt.AppointmentKey))
17 {
18 this.apptList.Remove(appt.AppointmentKey);
19 }
20 this.apptList.Add(appt.AppointmentKey, appt);
21 }
22
23 public void ClearAllAppointments()
24 {
25 this.apptList.Clear();
26 }
27
28 public CGAppointment GetAppointment(int nKey)
29 {
30 return (CGAppointment) this.apptList[nKey];
31 }
32
33 public IEnumerator GetEnumerator()
34 {
35 return this.apptList.GetEnumerator();
36 }
37
38 public void RemoveAppointment(int nKey)
39 {
40 this.apptList.Remove(nKey);
41 }
42
43 public int AppointmentCount
44 {
45 get
46 {
47 return this.apptList.Count;
48 }
49 }
50
51 public Hashtable AppointmentTable
52 {
53 get
54 {
55 return this.apptList;
56 }
57 }
58
59 //smh test
60 //one problem: Hashtable is a shallow copy.
61 //so it shouldn't work. But let's see.
62 public object Clone()
63 {
64 CGAppointments appts = new CGAppointments();
65 appts.apptList = (Hashtable)apptList.Clone();
66 return appts;
67 }
68 }
69}
70
Note: See TracBrowser for help on using the repository browser.