[614] | 1 | using System;
|
---|
| 2 | using System.Drawing;
|
---|
| 3 | using System.Collections;
|
---|
| 4 | using System.ComponentModel;
|
---|
| 5 | using System.Windows.Forms;
|
---|
| 6 |
|
---|
| 7 | namespace IndianHealthService.ClinicalScheduling
|
---|
| 8 | {
|
---|
| 9 | /// <summary>
|
---|
[1143] | 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.
|
---|
[614] | 14 | /// </summary>
|
---|
| 15 | public class DSplash : System.Windows.Forms.Form
|
---|
| 16 | {
|
---|
| 17 | private System.Windows.Forms.LinkLabel lnkMail;
|
---|
| 18 | private System.Windows.Forms.Label lblStatus;
|
---|
[1050] | 19 | private Label lblVersion;
|
---|
[1051] | 20 | private ProgressBar progressBar1;
|
---|
[614] | 21 | /// <summary>
|
---|
| 22 | /// Required designer variable.
|
---|
| 23 | /// </summary>
|
---|
| 24 | private System.ComponentModel.Container components = null;
|
---|
| 25 |
|
---|
| 26 | public DSplash()
|
---|
| 27 | {
|
---|
| 28 | //
|
---|
| 29 | // Required for Windows Form Designer support
|
---|
| 30 | //
|
---|
| 31 | InitializeComponent();
|
---|
| 32 |
|
---|
| 33 | //
|
---|
| 34 | // TODO: Add any constructor code after InitializeComponent call
|
---|
| 35 | //
|
---|
| 36 | }
|
---|
| 37 |
|
---|
| 38 | /// <summary>
|
---|
| 39 | /// Clean up any resources being used.
|
---|
| 40 | /// </summary>
|
---|
| 41 | protected override void Dispose( bool disposing )
|
---|
| 42 | {
|
---|
| 43 | if( disposing )
|
---|
| 44 | {
|
---|
| 45 | if(components != null)
|
---|
| 46 | {
|
---|
| 47 | components.Dispose();
|
---|
| 48 | }
|
---|
| 49 | }
|
---|
| 50 | base.Dispose( disposing );
|
---|
| 51 | }
|
---|
| 52 |
|
---|
| 53 | #region Windows Form Designer generated code
|
---|
| 54 | /// <summary>
|
---|
| 55 | /// Required method for Designer support - do not modify
|
---|
| 56 | /// the contents of this method with the code editor.
|
---|
| 57 | /// </summary>
|
---|
| 58 | private void InitializeComponent()
|
---|
| 59 | {
|
---|
[1050] | 60 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DSplash));
|
---|
[627] | 61 | this.lnkMail = new System.Windows.Forms.LinkLabel();
|
---|
| 62 | this.lblStatus = new System.Windows.Forms.Label();
|
---|
[1050] | 63 | this.lblVersion = new System.Windows.Forms.Label();
|
---|
[1051] | 64 | this.progressBar1 = new System.Windows.Forms.ProgressBar();
|
---|
[627] | 65 | this.SuspendLayout();
|
---|
| 66 | //
|
---|
| 67 | // lnkMail
|
---|
| 68 | //
|
---|
[1728] | 69 | this.lnkMail.BackColor = System.Drawing.Color.Gray;
|
---|
| 70 | this.lnkMail.ForeColor = System.Drawing.SystemColors.HotTrack;
|
---|
| 71 | this.lnkMail.Location = new System.Drawing.Point(489, 229);
|
---|
[627] | 72 | this.lnkMail.Name = "lnkMail";
|
---|
| 73 | this.lnkMail.Size = new System.Drawing.Size(100, 23);
|
---|
| 74 | this.lnkMail.TabIndex = 4;
|
---|
[1728] | 75 | this.lnkMail.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkMail_LinkClicked);
|
---|
[627] | 76 | //
|
---|
| 77 | // lblStatus
|
---|
| 78 | //
|
---|
[1728] | 79 | this.lblStatus.BackColor = System.Drawing.Color.Gray;
|
---|
[627] | 80 | this.lblStatus.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
---|
[1728] | 81 | this.lblStatus.ForeColor = System.Drawing.SystemColors.HotTrack;
|
---|
| 82 | this.lblStatus.Location = new System.Drawing.Point(261, 202);
|
---|
[627] | 83 | this.lblStatus.Name = "lblStatus";
|
---|
| 84 | this.lblStatus.Size = new System.Drawing.Size(328, 16);
|
---|
| 85 | this.lblStatus.TabIndex = 3;
|
---|
| 86 | this.lblStatus.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
---|
[1728] | 87 | this.lblStatus.Click += new System.EventHandler(this.lblStatus_Click);
|
---|
[627] | 88 | //
|
---|
[1050] | 89 | // lblVersion
|
---|
| 90 | //
|
---|
| 91 | this.lblVersion.AutoSize = true;
|
---|
[1728] | 92 | this.lblVersion.BackColor = System.Drawing.Color.Gray;
|
---|
| 93 | this.lblVersion.ForeColor = System.Drawing.SystemColors.HotTrack;
|
---|
| 94 | this.lblVersion.Location = new System.Drawing.Point(239, 9);
|
---|
[1050] | 95 | this.lblVersion.Name = "lblVersion";
|
---|
| 96 | this.lblVersion.Size = new System.Drawing.Size(52, 13);
|
---|
| 97 | this.lblVersion.TabIndex = 5;
|
---|
| 98 | this.lblVersion.Text = "lblVersion";
|
---|
| 99 | this.lblVersion.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
---|
| 100 | //
|
---|
[1051] | 101 | // progressBar1
|
---|
| 102 | //
|
---|
[1728] | 103 | this.progressBar1.BackColor = System.Drawing.Color.Gray;
|
---|
| 104 | this.progressBar1.Location = new System.Drawing.Point(60, 164);
|
---|
[1051] | 105 | this.progressBar1.Name = "progressBar1";
|
---|
| 106 | this.progressBar1.Size = new System.Drawing.Size(458, 14);
|
---|
| 107 | this.progressBar1.Style = System.Windows.Forms.ProgressBarStyle.Continuous;
|
---|
| 108 | this.progressBar1.TabIndex = 7;
|
---|
| 109 | //
|
---|
[627] | 110 | // DSplash
|
---|
| 111 | //
|
---|
| 112 | this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
|
---|
[1050] | 113 | this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
|
---|
[1728] | 114 | this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
|
---|
| 115 | this.ClientSize = new System.Drawing.Size(601, 403);
|
---|
[627] | 116 | this.ControlBox = false;
|
---|
[1051] | 117 | this.Controls.Add(this.progressBar1);
|
---|
[1050] | 118 | this.Controls.Add(this.lblVersion);
|
---|
[627] | 119 | this.Controls.Add(this.lblStatus);
|
---|
| 120 | this.Controls.Add(this.lnkMail);
|
---|
[1050] | 121 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
---|
| 122 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
---|
[627] | 123 | this.Name = "DSplash";
|
---|
| 124 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
---|
| 125 | this.Text = "Clinical Scheduling";
|
---|
| 126 | this.Load += new System.EventHandler(this.DSplash_Load);
|
---|
| 127 | this.ResumeLayout(false);
|
---|
[1050] | 128 | this.PerformLayout();
|
---|
[614] | 129 |
|
---|
| 130 | }
|
---|
| 131 | #endregion
|
---|
| 132 |
|
---|
[1050] | 133 | public delegate void dSetStatus(string sStatus);
|
---|
| 134 | public delegate void dAny();
|
---|
[1051] | 135 | public delegate void dProgressBarSet(int number);
|
---|
[1143] | 136 | public delegate DialogResult dMessageBox(IWin32Window owner, string message);
|
---|
| 137 | public delegate DialogResult dMessageBox2(IWin32Window owner, string message, string caption, MessageBoxButtons btns);
|
---|
[1050] | 138 |
|
---|
| 139 | public void SetStatus(string sStatus)
|
---|
[614] | 140 | {
|
---|
[1050] | 141 | if (this.InvokeRequired == true)
|
---|
| 142 | {
|
---|
| 143 | dSetStatus d = new dSetStatus(SetStatus);
|
---|
| 144 | this.Invoke(d, new object[] { sStatus });
|
---|
| 145 | return;
|
---|
| 146 | }
|
---|
| 147 |
|
---|
| 148 | this.lblStatus.Text = sStatus;
|
---|
[614] | 149 | }
|
---|
| 150 |
|
---|
| 151 | private void DSplash_Load(object sender, System.EventArgs e)
|
---|
| 152 | {
|
---|
[1050] | 153 | this.lblVersion.Text = "Version " + Application.ProductVersion;
|
---|
[614] | 154 | }
|
---|
| 155 |
|
---|
[1143] | 156 | public DialogResult RemoteMsgBox(string msg)
|
---|
| 157 | {
|
---|
| 158 | dMessageBox d = new dMessageBox(MessageBox.Show);
|
---|
| 159 | return (DialogResult)this.Invoke(d, this, msg);
|
---|
| 160 | }
|
---|
| 161 |
|
---|
| 162 | public DialogResult RemoteMsgBox(string msg, string caption, MessageBoxButtons btns)
|
---|
| 163 | {
|
---|
| 164 | dMessageBox2 d = new dMessageBox2(MessageBox.Show);
|
---|
| 165 | return (DialogResult)this.Invoke(d, this, msg, caption, btns);
|
---|
| 166 | }
|
---|
| 167 |
|
---|
[1050] | 168 | public void RemoteClose()
|
---|
| 169 | {
|
---|
| 170 | dAny d = new dAny(this.Close);
|
---|
| 171 | this.Invoke(d);
|
---|
| 172 | }
|
---|
| 173 |
|
---|
[1143] | 174 | public void RemoteActivate()
|
---|
| 175 | {
|
---|
| 176 | dAny d = new dAny(this.Activate);
|
---|
| 177 | this.Invoke(d);
|
---|
| 178 | }
|
---|
| 179 |
|
---|
| 180 | public void RemoteHide()
|
---|
| 181 | {
|
---|
| 182 | dAny d = new dAny(this.Hide);
|
---|
| 183 | this.Invoke(d);
|
---|
| 184 | }
|
---|
| 185 |
|
---|
[1051] | 186 | public void RemoteProgressBarMaxSet(int max)
|
---|
| 187 | {
|
---|
| 188 | if (this.InvokeRequired == true)
|
---|
| 189 | {
|
---|
| 190 | dProgressBarSet d = new dProgressBarSet(RemoteProgressBarMaxSet);
|
---|
| 191 | this.Invoke(d, new object[] { max });
|
---|
| 192 | return;
|
---|
| 193 | }
|
---|
| 194 |
|
---|
| 195 | this.progressBar1.Maximum = max;
|
---|
| 196 | }
|
---|
| 197 |
|
---|
| 198 | public void RemoteProgressBarValueSet(int val)
|
---|
| 199 | {
|
---|
| 200 | if (this.InvokeRequired == true)
|
---|
| 201 | {
|
---|
| 202 | dProgressBarSet d = new dProgressBarSet(RemoteProgressBarValueSet);
|
---|
| 203 | this.Invoke(d, new object[] { val });
|
---|
| 204 | return;
|
---|
| 205 | }
|
---|
| 206 |
|
---|
| 207 | this.progressBar1.Value = val;
|
---|
| 208 | }
|
---|
| 209 |
|
---|
[1728] | 210 | private void label2_Click(object sender, EventArgs e)
|
---|
| 211 | {
|
---|
[1050] | 212 |
|
---|
[1728] | 213 | }
|
---|
[1050] | 214 |
|
---|
[1728] | 215 | private void lblStatus_Click(object sender, EventArgs e)
|
---|
| 216 | {
|
---|
| 217 |
|
---|
| 218 | }
|
---|
| 219 |
|
---|
| 220 | private void lnkMail_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
---|
| 221 | {
|
---|
| 222 |
|
---|
| 223 | }
|
---|
| 224 | }
|
---|
[614] | 225 | }
|
---|