2009-11-30 03:53:28 -05:00
|
|
|
using System;
|
|
|
|
using System.Drawing;
|
|
|
|
using System.Collections;
|
|
|
|
using System.ComponentModel;
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
|
|
|
namespace IndianHealthService.ClinicalScheduling
|
|
|
|
{
|
|
|
|
/// <summary>
|
2011-04-14 08:33:14 -04:00
|
|
|
/// Program loading splash screen. Notice the numerous remote methods intended
|
|
|
|
/// to mickey mouse the form from another thread.
|
|
|
|
///
|
|
|
|
/// I don't know of a better way of doing this right now.
|
2009-11-30 03:53:28 -05:00
|
|
|
/// </summary>
|
|
|
|
public class DSplash : System.Windows.Forms.Form
|
|
|
|
{
|
|
|
|
private System.Windows.Forms.Label label1;
|
|
|
|
private System.Windows.Forms.LinkLabel lnkMail;
|
|
|
|
private System.Windows.Forms.Label lblStatus;
|
2011-01-05 04:10:20 -05:00
|
|
|
private Label lblVersion;
|
|
|
|
private Label label2;
|
2011-01-06 04:25:38 -05:00
|
|
|
private ProgressBar progressBar1;
|
2009-11-30 03:53:28 -05:00
|
|
|
/// <summary>
|
|
|
|
/// Required designer variable.
|
|
|
|
/// </summary>
|
|
|
|
private System.ComponentModel.Container components = null;
|
|
|
|
|
|
|
|
public DSplash()
|
|
|
|
{
|
|
|
|
//
|
|
|
|
// Required for Windows Form Designer support
|
|
|
|
//
|
|
|
|
InitializeComponent();
|
|
|
|
|
|
|
|
//
|
|
|
|
// TODO: Add any constructor code after InitializeComponent call
|
|
|
|
//
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Clean up any resources being used.
|
|
|
|
/// </summary>
|
|
|
|
protected override void Dispose( bool disposing )
|
|
|
|
{
|
|
|
|
if( disposing )
|
|
|
|
{
|
|
|
|
if(components != null)
|
|
|
|
{
|
|
|
|
components.Dispose();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
base.Dispose( disposing );
|
|
|
|
}
|
|
|
|
|
|
|
|
#region Windows Form Designer generated code
|
|
|
|
/// <summary>
|
|
|
|
/// Required method for Designer support - do not modify
|
|
|
|
/// the contents of this method with the code editor.
|
|
|
|
/// </summary>
|
|
|
|
private void InitializeComponent()
|
|
|
|
{
|
2011-01-05 04:10:20 -05:00
|
|
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DSplash));
|
2009-12-04 03:04:47 -05:00
|
|
|
this.label1 = new System.Windows.Forms.Label();
|
|
|
|
this.lnkMail = new System.Windows.Forms.LinkLabel();
|
|
|
|
this.lblStatus = new System.Windows.Forms.Label();
|
2011-01-05 04:10:20 -05:00
|
|
|
this.lblVersion = new System.Windows.Forms.Label();
|
|
|
|
this.label2 = new System.Windows.Forms.Label();
|
2011-01-06 04:25:38 -05:00
|
|
|
this.progressBar1 = new System.Windows.Forms.ProgressBar();
|
2009-12-04 03:04:47 -05:00
|
|
|
this.SuspendLayout();
|
|
|
|
//
|
|
|
|
// label1
|
|
|
|
//
|
|
|
|
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
2011-01-05 04:10:20 -05:00
|
|
|
this.label1.Location = new System.Drawing.Point(12, 67);
|
2009-12-04 03:04:47 -05:00
|
|
|
this.label1.Name = "label1";
|
2011-01-05 04:10:20 -05:00
|
|
|
this.label1.Size = new System.Drawing.Size(464, 40);
|
2009-12-04 03:04:47 -05:00
|
|
|
this.label1.TabIndex = 0;
|
2011-01-05 04:10:20 -05:00
|
|
|
this.label1.Text = "Clinical Scheduling";
|
2009-12-04 03:04:47 -05:00
|
|
|
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
|
|
|
//
|
|
|
|
// lnkMail
|
|
|
|
//
|
|
|
|
this.lnkMail.Location = new System.Drawing.Point(0, 0);
|
|
|
|
this.lnkMail.Name = "lnkMail";
|
|
|
|
this.lnkMail.Size = new System.Drawing.Size(100, 23);
|
|
|
|
this.lnkMail.TabIndex = 4;
|
|
|
|
//
|
|
|
|
// lblStatus
|
|
|
|
//
|
|
|
|
this.lblStatus.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
2011-01-05 04:10:20 -05:00
|
|
|
this.lblStatus.Location = new System.Drawing.Point(80, 159);
|
2009-12-04 03:04:47 -05:00
|
|
|
this.lblStatus.Name = "lblStatus";
|
|
|
|
this.lblStatus.Size = new System.Drawing.Size(328, 16);
|
|
|
|
this.lblStatus.TabIndex = 3;
|
|
|
|
this.lblStatus.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
|
|
|
//
|
2011-01-05 04:10:20 -05:00
|
|
|
// lblVersion
|
|
|
|
//
|
|
|
|
this.lblVersion.AutoSize = true;
|
|
|
|
this.lblVersion.Location = new System.Drawing.Point(210, 117);
|
|
|
|
this.lblVersion.Name = "lblVersion";
|
|
|
|
this.lblVersion.Size = new System.Drawing.Size(52, 13);
|
|
|
|
this.lblVersion.TabIndex = 5;
|
|
|
|
this.lblVersion.Text = "lblVersion";
|
|
|
|
this.lblVersion.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
|
|
|
//
|
|
|
|
// label2
|
|
|
|
//
|
|
|
|
this.label2.AutoSize = true;
|
|
|
|
this.label2.Font = new System.Drawing.Font("Book Antiqua", 27.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
|
|
|
this.label2.Location = new System.Drawing.Point(180, 21);
|
|
|
|
this.label2.Name = "label2";
|
|
|
|
this.label2.Size = new System.Drawing.Size(130, 46);
|
|
|
|
this.label2.TabIndex = 6;
|
|
|
|
this.label2.Text = "VISTA";
|
|
|
|
//
|
2011-01-06 04:25:38 -05:00
|
|
|
// progressBar1
|
|
|
|
//
|
|
|
|
this.progressBar1.Location = new System.Drawing.Point(18, 207);
|
|
|
|
this.progressBar1.Name = "progressBar1";
|
|
|
|
this.progressBar1.Size = new System.Drawing.Size(458, 14);
|
|
|
|
this.progressBar1.Style = System.Windows.Forms.ProgressBarStyle.Continuous;
|
|
|
|
this.progressBar1.TabIndex = 7;
|
|
|
|
//
|
2009-12-04 03:04:47 -05:00
|
|
|
// DSplash
|
|
|
|
//
|
|
|
|
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
|
2011-01-05 04:10:20 -05:00
|
|
|
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
|
2009-12-04 03:04:47 -05:00
|
|
|
this.ClientSize = new System.Drawing.Size(488, 252);
|
|
|
|
this.ControlBox = false;
|
2011-01-06 04:25:38 -05:00
|
|
|
this.Controls.Add(this.progressBar1);
|
2011-01-05 04:10:20 -05:00
|
|
|
this.Controls.Add(this.label2);
|
|
|
|
this.Controls.Add(this.lblVersion);
|
2009-12-04 03:04:47 -05:00
|
|
|
this.Controls.Add(this.lblStatus);
|
|
|
|
this.Controls.Add(this.lnkMail);
|
|
|
|
this.Controls.Add(this.label1);
|
2011-01-05 04:10:20 -05:00
|
|
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
|
|
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
2009-12-04 03:04:47 -05:00
|
|
|
this.Name = "DSplash";
|
|
|
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
|
|
|
this.Text = "Clinical Scheduling";
|
|
|
|
this.Load += new System.EventHandler(this.DSplash_Load);
|
|
|
|
this.ResumeLayout(false);
|
2011-01-05 04:10:20 -05:00
|
|
|
this.PerformLayout();
|
2009-11-30 03:53:28 -05:00
|
|
|
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
|
2011-01-05 04:10:20 -05:00
|
|
|
public delegate void dSetStatus(string sStatus);
|
|
|
|
public delegate void dAny();
|
2011-01-06 04:25:38 -05:00
|
|
|
public delegate void dProgressBarSet(int number);
|
2011-04-14 08:33:14 -04:00
|
|
|
public delegate DialogResult dMessageBox(IWin32Window owner, string message);
|
|
|
|
public delegate DialogResult dMessageBox2(IWin32Window owner, string message, string caption, MessageBoxButtons btns);
|
2011-01-05 04:10:20 -05:00
|
|
|
|
|
|
|
public void SetStatus(string sStatus)
|
2009-11-30 03:53:28 -05:00
|
|
|
{
|
2011-01-05 04:10:20 -05:00
|
|
|
if (this.InvokeRequired == true)
|
|
|
|
{
|
|
|
|
dSetStatus d = new dSetStatus(SetStatus);
|
|
|
|
this.Invoke(d, new object[] { sStatus });
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
this.lblStatus.Text = sStatus;
|
2009-11-30 03:53:28 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
private void DSplash_Load(object sender, System.EventArgs e)
|
|
|
|
{
|
2011-01-05 04:10:20 -05:00
|
|
|
this.lblVersion.Text = "Version " + Application.ProductVersion;
|
2009-11-30 03:53:28 -05:00
|
|
|
}
|
|
|
|
|
2011-04-14 08:33:14 -04:00
|
|
|
public DialogResult RemoteMsgBox(string msg)
|
|
|
|
{
|
|
|
|
dMessageBox d = new dMessageBox(MessageBox.Show);
|
|
|
|
return (DialogResult)this.Invoke(d, this, msg);
|
|
|
|
}
|
|
|
|
|
|
|
|
public DialogResult RemoteMsgBox(string msg, string caption, MessageBoxButtons btns)
|
|
|
|
{
|
|
|
|
dMessageBox2 d = new dMessageBox2(MessageBox.Show);
|
|
|
|
return (DialogResult)this.Invoke(d, this, msg, caption, btns);
|
|
|
|
}
|
|
|
|
|
2011-01-05 04:10:20 -05:00
|
|
|
public void RemoteClose()
|
|
|
|
{
|
|
|
|
dAny d = new dAny(this.Close);
|
|
|
|
this.Invoke(d);
|
|
|
|
}
|
|
|
|
|
2011-04-14 08:33:14 -04:00
|
|
|
public void RemoteActivate()
|
|
|
|
{
|
|
|
|
dAny d = new dAny(this.Activate);
|
|
|
|
this.Invoke(d);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void RemoteHide()
|
|
|
|
{
|
|
|
|
dAny d = new dAny(this.Hide);
|
|
|
|
this.Invoke(d);
|
|
|
|
}
|
|
|
|
|
2011-01-06 04:25:38 -05:00
|
|
|
public void RemoteProgressBarMaxSet(int max)
|
|
|
|
{
|
|
|
|
if (this.InvokeRequired == true)
|
|
|
|
{
|
|
|
|
dProgressBarSet d = new dProgressBarSet(RemoteProgressBarMaxSet);
|
|
|
|
this.Invoke(d, new object[] { max });
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
this.progressBar1.Maximum = max;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void RemoteProgressBarValueSet(int val)
|
|
|
|
{
|
|
|
|
if (this.InvokeRequired == true)
|
|
|
|
{
|
|
|
|
dProgressBarSet d = new dProgressBarSet(RemoteProgressBarValueSet);
|
|
|
|
this.Invoke(d, new object[] { val });
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
this.progressBar1.Value = val;
|
|
|
|
}
|
|
|
|
|
2009-11-30 03:53:28 -05:00
|
|
|
}
|
2011-01-05 04:10:20 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-30 03:53:28 -05:00
|
|
|
}
|