source: Scheduling/branches/BMX4Support/DSplash.cs@ 1257

Last change on this file since 1257 was 1143, checked in by Sam Habiel, 14 years ago

CalendarGrid: Many changes:

  1. Dragover handler to handle auto scrolling when dragging. Also highlights destination cell in dragging.
  2. Solution for the click-right click problem by better handling of right click issues.
  3. New method OnRButtonDown()
  4. Extra comments everywhere.
  5. Fix for single column being enabled when there are multiple resources. Columns property now calls this.SetColumnInfo() to rectify that problem.

CGDocument:

  1. EditAppoitment Used to send request a refresh from the DB and update the view itself, rather than letting the view handle that. That's now changed.

CGDocumentManager:

  1. MessageBox displayed during login splash now are shown BY the splash form.

CGView:

  1. Shortcuts and some display text updated.
  2. Splash screen when updating now removed.
  3. If print appointment slip checkbox is checked when EditAppointment is chosen, now it will print the routing slip.
  4. Tiny change in appointment structure generated during drag and drop (added Patient member, as it was causing a crash)

DApptSearch:

  1. Change of name of Appointment to Slot, for better user understanding.

DSplash:

  1. RemoteMessage box methods and associated delegates for mickey mousing the form from another thread.

Updated release exes and dlls

File size: 8.3 KB
Line 
1using System;
2using System.Drawing;
3using System.Collections;
4using System.ComponentModel;
5using System.Windows.Forms;
6
7namespace IndianHealthService.ClinicalScheduling
8{
9 /// <summary>
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.
14 /// </summary>
15 public class DSplash : System.Windows.Forms.Form
16 {
17 private System.Windows.Forms.Label label1;
18 private System.Windows.Forms.LinkLabel lnkMail;
19 private System.Windows.Forms.Label lblStatus;
20 private Label lblVersion;
21 private Label label2;
22 private ProgressBar progressBar1;
23 /// <summary>
24 /// Required designer variable.
25 /// </summary>
26 private System.ComponentModel.Container components = null;
27
28 public DSplash()
29 {
30 //
31 // Required for Windows Form Designer support
32 //
33 InitializeComponent();
34
35 //
36 // TODO: Add any constructor code after InitializeComponent call
37 //
38 }
39
40 /// <summary>
41 /// Clean up any resources being used.
42 /// </summary>
43 protected override void Dispose( bool disposing )
44 {
45 if( disposing )
46 {
47 if(components != null)
48 {
49 components.Dispose();
50 }
51 }
52 base.Dispose( disposing );
53 }
54
55 #region Windows Form Designer generated code
56 /// <summary>
57 /// Required method for Designer support - do not modify
58 /// the contents of this method with the code editor.
59 /// </summary>
60 private void InitializeComponent()
61 {
62 System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DSplash));
63 this.label1 = new System.Windows.Forms.Label();
64 this.lnkMail = new System.Windows.Forms.LinkLabel();
65 this.lblStatus = new System.Windows.Forms.Label();
66 this.lblVersion = new System.Windows.Forms.Label();
67 this.label2 = new System.Windows.Forms.Label();
68 this.progressBar1 = new System.Windows.Forms.ProgressBar();
69 this.SuspendLayout();
70 //
71 // label1
72 //
73 this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
74 this.label1.Location = new System.Drawing.Point(12, 67);
75 this.label1.Name = "label1";
76 this.label1.Size = new System.Drawing.Size(464, 40);
77 this.label1.TabIndex = 0;
78 this.label1.Text = "Clinical Scheduling";
79 this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
80 //
81 // lnkMail
82 //
83 this.lnkMail.Location = new System.Drawing.Point(0, 0);
84 this.lnkMail.Name = "lnkMail";
85 this.lnkMail.Size = new System.Drawing.Size(100, 23);
86 this.lnkMail.TabIndex = 4;
87 //
88 // lblStatus
89 //
90 this.lblStatus.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
91 this.lblStatus.Location = new System.Drawing.Point(80, 159);
92 this.lblStatus.Name = "lblStatus";
93 this.lblStatus.Size = new System.Drawing.Size(328, 16);
94 this.lblStatus.TabIndex = 3;
95 this.lblStatus.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
96 //
97 // lblVersion
98 //
99 this.lblVersion.AutoSize = true;
100 this.lblVersion.Location = new System.Drawing.Point(210, 117);
101 this.lblVersion.Name = "lblVersion";
102 this.lblVersion.Size = new System.Drawing.Size(52, 13);
103 this.lblVersion.TabIndex = 5;
104 this.lblVersion.Text = "lblVersion";
105 this.lblVersion.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
106 //
107 // label2
108 //
109 this.label2.AutoSize = true;
110 this.label2.Font = new System.Drawing.Font("Book Antiqua", 27.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
111 this.label2.Location = new System.Drawing.Point(180, 21);
112 this.label2.Name = "label2";
113 this.label2.Size = new System.Drawing.Size(130, 46);
114 this.label2.TabIndex = 6;
115 this.label2.Text = "VISTA";
116 //
117 // progressBar1
118 //
119 this.progressBar1.Location = new System.Drawing.Point(18, 207);
120 this.progressBar1.Name = "progressBar1";
121 this.progressBar1.Size = new System.Drawing.Size(458, 14);
122 this.progressBar1.Style = System.Windows.Forms.ProgressBarStyle.Continuous;
123 this.progressBar1.TabIndex = 7;
124 //
125 // DSplash
126 //
127 this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
128 this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
129 this.ClientSize = new System.Drawing.Size(488, 252);
130 this.ControlBox = false;
131 this.Controls.Add(this.progressBar1);
132 this.Controls.Add(this.label2);
133 this.Controls.Add(this.lblVersion);
134 this.Controls.Add(this.lblStatus);
135 this.Controls.Add(this.lnkMail);
136 this.Controls.Add(this.label1);
137 this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
138 this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
139 this.Name = "DSplash";
140 this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
141 this.Text = "Clinical Scheduling";
142 this.Load += new System.EventHandler(this.DSplash_Load);
143 this.ResumeLayout(false);
144 this.PerformLayout();
145
146 }
147 #endregion
148
149 public delegate void dSetStatus(string sStatus);
150 public delegate void dAny();
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);
154
155 public void SetStatus(string sStatus)
156 {
157 if (this.InvokeRequired == true)
158 {
159 dSetStatus d = new dSetStatus(SetStatus);
160 this.Invoke(d, new object[] { sStatus });
161 return;
162 }
163
164 this.lblStatus.Text = sStatus;
165 }
166
167 private void DSplash_Load(object sender, System.EventArgs e)
168 {
169 this.lblVersion.Text = "Version " + Application.ProductVersion;
170 }
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
184 public void RemoteClose()
185 {
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);
199 this.Invoke(d);
200 }
201
202 public void RemoteProgressBarMaxSet(int max)
203 {
204 if (this.InvokeRequired == true)
205 {
206 dProgressBarSet d = new dProgressBarSet(RemoteProgressBarMaxSet);
207 this.Invoke(d, new object[] { max });
208 return;
209 }
210
211 this.progressBar1.Maximum = max;
212 }
213
214 public void RemoteProgressBarValueSet(int val)
215 {
216 if (this.InvokeRequired == true)
217 {
218 dProgressBarSet d = new dProgressBarSet(RemoteProgressBarValueSet);
219 this.Invoke(d, new object[] { val });
220 return;
221 }
222
223 this.progressBar1.Value = val;
224 }
225
226 }
227
228
229
230}
Note: See TracBrowser for help on using the repository browser.