CGDocumentManager: Localization now works from CurrentCulture, not just CurrentUICulture.
CGView: Nothing important. Designer moves around stuff; again. Printing: Routing slip arabized; page starts at a lower level to allow for a watermark. Graphics.Dispose now called at the end of all prints to allow for faster gc. strings: Updated with more translations.
This commit is contained in:
parent
ba76cd2d1e
commit
3bcc1a88ca
|
@ -496,10 +496,20 @@ namespace IndianHealthService.ClinicalScheduling
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//User Interface Culture (m_CultureName is set from the command line flag /culture)
|
//User Interface Culture (m_CultureName is set from the command line flag /culture)
|
||||||
try { Thread.CurrentThread.CurrentUICulture = new CultureInfo(m_CultureName); } // if "", invariant culture
|
//
|
||||||
catch (CultureNotFoundException) { Thread.CurrentThread.CurrentUICulture = CultureInfo.InvariantCulture; }
|
//If passed, set that try that culture; fail over to Invariant Culture
|
||||||
|
if (m_CultureName != String.Empty)
|
||||||
|
{
|
||||||
|
try { Thread.CurrentThread.CurrentUICulture = new CultureInfo(m_CultureName); }
|
||||||
|
catch (CultureNotFoundException) { Thread.CurrentThread.CurrentUICulture = CultureInfo.InvariantCulture; }
|
||||||
|
}
|
||||||
|
//otherwise, use the Current Computer Culture, EVEN IF (!!) the UI Culture is different.
|
||||||
|
//this allows localization even if Windows still displays messages in English.
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture;
|
||||||
|
}
|
||||||
|
|
||||||
//Create global dataset
|
//Create global dataset
|
||||||
_current.m_dsGlobal = new DataSet("GlobalDataSet");
|
_current.m_dsGlobal = new DataSet("GlobalDataSet");
|
||||||
|
|
|
@ -243,7 +243,6 @@ namespace IndianHealthService.ClinicalScheduling
|
||||||
this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
|
this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
|
||||||
this.lblResource = new System.Windows.Forms.Label();
|
this.lblResource = new System.Windows.Forms.Label();
|
||||||
this.panelCenter = new System.Windows.Forms.Panel();
|
this.panelCenter = new System.Windows.Forms.Panel();
|
||||||
this.calendarGrid1 = new IndianHealthService.ClinicalScheduling.CalendarGrid();
|
|
||||||
this.ctxCalendarGrid = new System.Windows.Forms.ContextMenu();
|
this.ctxCalendarGrid = new System.Windows.Forms.ContextMenu();
|
||||||
this.ctxCalGridAdd = new System.Windows.Forms.MenuItem();
|
this.ctxCalGridAdd = new System.Windows.Forms.MenuItem();
|
||||||
this.ctxCalGridEdit = new System.Windows.Forms.MenuItem();
|
this.ctxCalGridEdit = new System.Windows.Forms.MenuItem();
|
||||||
|
@ -261,6 +260,7 @@ namespace IndianHealthService.ClinicalScheduling
|
||||||
this.statusBar1 = new System.Windows.Forms.StatusBar();
|
this.statusBar1 = new System.Windows.Forms.StatusBar();
|
||||||
this.splitter1 = new System.Windows.Forms.Splitter();
|
this.splitter1 = new System.Windows.Forms.Splitter();
|
||||||
this.splitter2 = new System.Windows.Forms.Splitter();
|
this.splitter2 = new System.Windows.Forms.Splitter();
|
||||||
|
this.calendarGrid1 = new IndianHealthService.ClinicalScheduling.CalendarGrid();
|
||||||
this.panelRight.SuspendLayout();
|
this.panelRight.SuspendLayout();
|
||||||
this.panelClip.SuspendLayout();
|
this.panelClip.SuspendLayout();
|
||||||
this.panelTop.SuspendLayout();
|
this.panelTop.SuspendLayout();
|
||||||
|
@ -646,7 +646,7 @@ namespace IndianHealthService.ClinicalScheduling
|
||||||
this.tvSchedules.HotTracking = true;
|
this.tvSchedules.HotTracking = true;
|
||||||
this.tvSchedules.Location = new System.Drawing.Point(0, 0);
|
this.tvSchedules.Location = new System.Drawing.Point(0, 0);
|
||||||
this.tvSchedules.Name = "tvSchedules";
|
this.tvSchedules.Name = "tvSchedules";
|
||||||
this.tvSchedules.Size = new System.Drawing.Size(128, 485);
|
this.tvSchedules.Size = new System.Drawing.Size(128, 359);
|
||||||
this.tvSchedules.Sorted = true;
|
this.tvSchedules.Sorted = true;
|
||||||
this.tvSchedules.TabIndex = 1;
|
this.tvSchedules.TabIndex = 1;
|
||||||
this.tvSchedules.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.tvSchedules_AfterSelect);
|
this.tvSchedules.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.tvSchedules_AfterSelect);
|
||||||
|
@ -715,7 +715,7 @@ namespace IndianHealthService.ClinicalScheduling
|
||||||
this.panelRight.Dock = System.Windows.Forms.DockStyle.Right;
|
this.panelRight.Dock = System.Windows.Forms.DockStyle.Right;
|
||||||
this.panelRight.Location = new System.Drawing.Point(996, 0);
|
this.panelRight.Location = new System.Drawing.Point(996, 0);
|
||||||
this.panelRight.Name = "panelRight";
|
this.panelRight.Name = "panelRight";
|
||||||
this.panelRight.Size = new System.Drawing.Size(128, 485);
|
this.panelRight.Size = new System.Drawing.Size(128, 359);
|
||||||
this.panelRight.TabIndex = 3;
|
this.panelRight.TabIndex = 3;
|
||||||
this.panelRight.Visible = false;
|
this.panelRight.Visible = false;
|
||||||
//
|
//
|
||||||
|
@ -811,38 +811,9 @@ namespace IndianHealthService.ClinicalScheduling
|
||||||
this.panelCenter.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.panelCenter.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.panelCenter.Location = new System.Drawing.Point(136, 24);
|
this.panelCenter.Location = new System.Drawing.Point(136, 24);
|
||||||
this.panelCenter.Name = "panelCenter";
|
this.panelCenter.Name = "panelCenter";
|
||||||
this.panelCenter.Size = new System.Drawing.Size(857, 437);
|
this.panelCenter.Size = new System.Drawing.Size(857, 311);
|
||||||
this.panelCenter.TabIndex = 7;
|
this.panelCenter.TabIndex = 7;
|
||||||
//
|
//
|
||||||
// calendarGrid1
|
|
||||||
//
|
|
||||||
this.calendarGrid1.AllowDrop = true;
|
|
||||||
this.calendarGrid1.Appointments = null;
|
|
||||||
this.calendarGrid1.ApptDragSource = null;
|
|
||||||
this.calendarGrid1.AutoScroll = true;
|
|
||||||
this.calendarGrid1.AutoScrollMinSize = new System.Drawing.Size(600, 1898);
|
|
||||||
this.calendarGrid1.AvailabilityArray = null;
|
|
||||||
this.calendarGrid1.BackColor = System.Drawing.SystemColors.Window;
|
|
||||||
this.calendarGrid1.Columns = 5;
|
|
||||||
this.calendarGrid1.ContextMenu = this.ctxCalendarGrid;
|
|
||||||
this.calendarGrid1.Dock = System.Windows.Forms.DockStyle.Fill;
|
|
||||||
this.calendarGrid1.DrawWalkIns = true;
|
|
||||||
this.calendarGrid1.GridBackColor = null;
|
|
||||||
this.calendarGrid1.GridEnter = false;
|
|
||||||
this.calendarGrid1.Location = new System.Drawing.Point(0, 0);
|
|
||||||
this.calendarGrid1.Name = "calendarGrid1";
|
|
||||||
this.calendarGrid1.Resources = ((System.Collections.ArrayList)(resources.GetObject("calendarGrid1.Resources")));
|
|
||||||
this.calendarGrid1.SelectedAppointment = 0;
|
|
||||||
this.calendarGrid1.Size = new System.Drawing.Size(857, 437);
|
|
||||||
this.calendarGrid1.StartDate = new System.DateTime(2003, 1, 27, 0, 0, 0, 0);
|
|
||||||
this.calendarGrid1.TabIndex = 0;
|
|
||||||
this.calendarGrid1.TimeScale = 20;
|
|
||||||
this.calendarGrid1.CGAppointmentChanged += new IndianHealthService.ClinicalScheduling.CalendarGrid.CGAppointmentChangedHandler(this.calendarGrid1_CGAppointmentChanged);
|
|
||||||
this.calendarGrid1.CGAppointmentAdded += new IndianHealthService.ClinicalScheduling.CalendarGrid.CGAppointmentChangedHandler(this.calendarGrid1_CGAppointmentAdded);
|
|
||||||
this.calendarGrid1.CGSelectionChanged += new IndianHealthService.ClinicalScheduling.CalendarGrid.CGSelectionChangedHandler(this.calendarGrid1_CGSelectionChanged);
|
|
||||||
this.calendarGrid1.DoubleClick += new System.EventHandler(this.calendarGrid1_DoubleClick);
|
|
||||||
this.calendarGrid1.MouseEnter += new System.EventHandler(this.calendarGrid1_MouseEnter);
|
|
||||||
//
|
|
||||||
// ctxCalendarGrid
|
// ctxCalendarGrid
|
||||||
//
|
//
|
||||||
this.ctxCalendarGrid.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
|
this.ctxCalendarGrid.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
|
||||||
|
@ -933,7 +904,7 @@ namespace IndianHealthService.ClinicalScheduling
|
||||||
//
|
//
|
||||||
this.panelBottom.Controls.Add(this.statusBar1);
|
this.panelBottom.Controls.Add(this.statusBar1);
|
||||||
this.panelBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
|
this.panelBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||||
this.panelBottom.Location = new System.Drawing.Point(136, 461);
|
this.panelBottom.Location = new System.Drawing.Point(136, 335);
|
||||||
this.panelBottom.Name = "panelBottom";
|
this.panelBottom.Name = "panelBottom";
|
||||||
this.panelBottom.Size = new System.Drawing.Size(857, 24);
|
this.panelBottom.Size = new System.Drawing.Size(857, 24);
|
||||||
this.panelBottom.TabIndex = 8;
|
this.panelBottom.TabIndex = 8;
|
||||||
|
@ -951,7 +922,7 @@ namespace IndianHealthService.ClinicalScheduling
|
||||||
//
|
//
|
||||||
this.splitter1.Location = new System.Drawing.Point(128, 24);
|
this.splitter1.Location = new System.Drawing.Point(128, 24);
|
||||||
this.splitter1.Name = "splitter1";
|
this.splitter1.Name = "splitter1";
|
||||||
this.splitter1.Size = new System.Drawing.Size(8, 461);
|
this.splitter1.Size = new System.Drawing.Size(8, 335);
|
||||||
this.splitter1.TabIndex = 9;
|
this.splitter1.TabIndex = 9;
|
||||||
this.splitter1.TabStop = false;
|
this.splitter1.TabStop = false;
|
||||||
//
|
//
|
||||||
|
@ -960,14 +931,43 @@ namespace IndianHealthService.ClinicalScheduling
|
||||||
this.splitter2.Dock = System.Windows.Forms.DockStyle.Right;
|
this.splitter2.Dock = System.Windows.Forms.DockStyle.Right;
|
||||||
this.splitter2.Location = new System.Drawing.Point(993, 24);
|
this.splitter2.Location = new System.Drawing.Point(993, 24);
|
||||||
this.splitter2.Name = "splitter2";
|
this.splitter2.Name = "splitter2";
|
||||||
this.splitter2.Size = new System.Drawing.Size(3, 461);
|
this.splitter2.Size = new System.Drawing.Size(3, 335);
|
||||||
this.splitter2.TabIndex = 10;
|
this.splitter2.TabIndex = 10;
|
||||||
this.splitter2.TabStop = false;
|
this.splitter2.TabStop = false;
|
||||||
//
|
//
|
||||||
|
// calendarGrid1
|
||||||
|
//
|
||||||
|
this.calendarGrid1.AllowDrop = true;
|
||||||
|
this.calendarGrid1.Appointments = null;
|
||||||
|
this.calendarGrid1.ApptDragSource = null;
|
||||||
|
this.calendarGrid1.AutoScroll = true;
|
||||||
|
this.calendarGrid1.AutoScrollMinSize = new System.Drawing.Size(600, 1898);
|
||||||
|
this.calendarGrid1.AvailabilityArray = null;
|
||||||
|
this.calendarGrid1.BackColor = System.Drawing.SystemColors.Window;
|
||||||
|
this.calendarGrid1.Columns = 5;
|
||||||
|
this.calendarGrid1.ContextMenu = this.ctxCalendarGrid;
|
||||||
|
this.calendarGrid1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.calendarGrid1.DrawWalkIns = true;
|
||||||
|
this.calendarGrid1.GridBackColor = null;
|
||||||
|
this.calendarGrid1.GridEnter = false;
|
||||||
|
this.calendarGrid1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.calendarGrid1.Name = "calendarGrid1";
|
||||||
|
this.calendarGrid1.Resources = ((System.Collections.ArrayList)(resources.GetObject("calendarGrid1.Resources")));
|
||||||
|
this.calendarGrid1.SelectedAppointment = 0;
|
||||||
|
this.calendarGrid1.Size = new System.Drawing.Size(857, 311);
|
||||||
|
this.calendarGrid1.StartDate = new System.DateTime(2003, 1, 27, 0, 0, 0, 0);
|
||||||
|
this.calendarGrid1.TabIndex = 0;
|
||||||
|
this.calendarGrid1.TimeScale = 20;
|
||||||
|
this.calendarGrid1.CGAppointmentChanged += new IndianHealthService.ClinicalScheduling.CalendarGrid.CGAppointmentChangedHandler(this.calendarGrid1_CGAppointmentChanged);
|
||||||
|
this.calendarGrid1.CGAppointmentAdded += new IndianHealthService.ClinicalScheduling.CalendarGrid.CGAppointmentChangedHandler(this.calendarGrid1_CGAppointmentAdded);
|
||||||
|
this.calendarGrid1.CGSelectionChanged += new IndianHealthService.ClinicalScheduling.CalendarGrid.CGSelectionChangedHandler(this.calendarGrid1_CGSelectionChanged);
|
||||||
|
this.calendarGrid1.DoubleClick += new System.EventHandler(this.calendarGrid1_DoubleClick);
|
||||||
|
this.calendarGrid1.MouseEnter += new System.EventHandler(this.calendarGrid1_MouseEnter);
|
||||||
|
//
|
||||||
// CGView
|
// CGView
|
||||||
//
|
//
|
||||||
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
|
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
|
||||||
this.ClientSize = new System.Drawing.Size(1124, 485);
|
this.ClientSize = new System.Drawing.Size(1124, 359);
|
||||||
this.Controls.Add(this.panelCenter);
|
this.Controls.Add(this.panelCenter);
|
||||||
this.Controls.Add(this.panelBottom);
|
this.Controls.Add(this.panelBottom);
|
||||||
this.Controls.Add(this.splitter2);
|
this.Controls.Add(this.splitter2);
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
<RemoteDebugMachine>
|
<RemoteDebugMachine>
|
||||||
</RemoteDebugMachine>
|
</RemoteDebugMachine>
|
||||||
<StartAction>Project</StartAction>
|
<StartAction>Project</StartAction>
|
||||||
<StartArguments>/s=172.16.16.108 /p=9250 /a=s.habiel /v=catdog.66 /culture=ar-JO</StartArguments>
|
<StartArguments>/s=172.16.16.108 /p=9250 /a=BASMA.ALDWAIRI /v=SELEN.123</StartArguments>
|
||||||
<StartPage>
|
<StartPage>
|
||||||
</StartPage>
|
</StartPage>
|
||||||
<StartProgram>C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\IEExec.exe</StartProgram>
|
<StartProgram>C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\IEExec.exe</StartProgram>
|
||||||
|
|
Binary file not shown.
|
@ -135,6 +135,9 @@ namespace IndianHealthService.ClinicalScheduling
|
||||||
//go to the next appointment
|
//go to the next appointment
|
||||||
apptPrinting++;
|
apptPrinting++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
g.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -163,13 +166,14 @@ namespace IndianHealthService.ClinicalScheduling
|
||||||
Height = pageArea.Height - (e.MarginBounds.Height + headerArea.Height)
|
Height = pageArea.Height - (e.MarginBounds.Height + headerArea.Height)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
string s;
|
||||||
|
|
||||||
// A few fonts
|
// A few fonts
|
||||||
Font fTitle = new Font(FontFamily.GenericSerif, 24, FontStyle.Bold); //for title
|
Font fTitle = new Font(FontFamily.GenericSerif, 24, FontStyle.Bold); //for title
|
||||||
Font fBody = new Font(FontFamily.GenericSerif, 12);
|
Font fBody = new Font(FontFamily.GenericSerif, 12);
|
||||||
Font fGroupTitle = new Font(FontFamily.GenericSansSerif, 10, FontStyle.Bold);
|
Font fGroupTitle = new Font(FontFamily.GenericSansSerif, 10, FontStyle.Bold);
|
||||||
|
|
||||||
StringFormat sf0 = new StringFormat()
|
StringFormat sfCenterCenter = new StringFormat()
|
||||||
{
|
{
|
||||||
Alignment = StringAlignment.Center,
|
Alignment = StringAlignment.Center,
|
||||||
LineAlignment = StringAlignment.Center
|
LineAlignment = StringAlignment.Center
|
||||||
|
@ -177,15 +181,21 @@ namespace IndianHealthService.ClinicalScheduling
|
||||||
|
|
||||||
// Draw Header
|
// Draw Header
|
||||||
string division = CGDocumentManager.Current.ConnectInfo.DivisionName;
|
string division = CGDocumentManager.Current.ConnectInfo.DivisionName;
|
||||||
g.DrawString(division, fBody, Brushes.Black, headerArea, sf0);
|
g.DrawString(division, fBody, Brushes.Black, headerArea, sfCenterCenter);
|
||||||
|
|
||||||
|
const int watermarkLength = 75;
|
||||||
|
|
||||||
|
// Move down for optional form paper
|
||||||
|
printArea.Y += watermarkLength;
|
||||||
|
printArea.Height -= watermarkLength;
|
||||||
|
|
||||||
// Draw Title
|
// Draw Title
|
||||||
StringFormat sf = new StringFormat();
|
StringFormat sfCenter = new StringFormat();
|
||||||
sf.Alignment = StringAlignment.Center; //for title & header
|
sfCenter.Alignment = StringAlignment.Center; //for title & header
|
||||||
|
|
||||||
//string s = "Appointment Reminder Slip";
|
//string s = "Appointment Reminder Slip";
|
||||||
string s = strings.ApptReminderSlip;
|
s = strings.ApptReminderSlip;
|
||||||
g.DrawString(s, fTitle, Brushes.Black, printArea, sf); //title
|
g.DrawString(s, fTitle, Brushes.Black, printArea, sfCenter); //title
|
||||||
|
|
||||||
// move down
|
// move down
|
||||||
int titleHeight = (int)g.MeasureString(s, fTitle, printArea.Width).Height;
|
int titleHeight = (int)g.MeasureString(s, fTitle, printArea.Width).Height;
|
||||||
|
@ -269,7 +279,7 @@ namespace IndianHealthService.ClinicalScheduling
|
||||||
|
|
||||||
// Draw new Title
|
// Draw new Title
|
||||||
s = strings.ClinicInstructions;
|
s = strings.ClinicInstructions;
|
||||||
g.DrawString(s, fTitle, Brushes.Black, printArea, sf); //title
|
g.DrawString(s, fTitle, Brushes.Black, printArea, sfCenter); //title
|
||||||
|
|
||||||
// move down
|
// move down
|
||||||
titleHeight = (int)g.MeasureString(s, fTitle, printArea.Width).Height;
|
titleHeight = (int)g.MeasureString(s, fTitle, printArea.Width).Height;
|
||||||
|
@ -302,7 +312,7 @@ namespace IndianHealthService.ClinicalScheduling
|
||||||
printArea.Height -= 5;
|
printArea.Height -= 5;
|
||||||
|
|
||||||
s = strings.Notes;
|
s = strings.Notes;
|
||||||
g.DrawString(s, fTitle, Brushes.Black, printArea, sf); // Notes title
|
g.DrawString(s, fTitle, Brushes.Black, printArea, sfCenter); // Notes title
|
||||||
|
|
||||||
// move down
|
// move down
|
||||||
titleHeight = (int)g.MeasureString(s, fTitle, printArea.Width).Height;
|
titleHeight = (int)g.MeasureString(s, fTitle, printArea.Width).Height;
|
||||||
|
@ -323,8 +333,9 @@ namespace IndianHealthService.ClinicalScheduling
|
||||||
//use sf0 to print the footer (center all the way)
|
//use sf0 to print the footer (center all the way)
|
||||||
s = strings.Printed + ": " + DateTime.Now.ToString();
|
s = strings.Printed + ": " + DateTime.Now.ToString();
|
||||||
Font fFooter = new Font(FontFamily.GenericSerif, 7);
|
Font fFooter = new Font(FontFamily.GenericSerif, 7);
|
||||||
g.DrawString(s, fFooter, Brushes.Black, footerArea, sf0);
|
g.DrawString(s, fFooter, Brushes.Black, footerArea, sfCenterCenter);
|
||||||
|
|
||||||
|
g.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -403,6 +414,8 @@ namespace IndianHealthService.ClinicalScheduling
|
||||||
address.AppendLine(ptRow.STREET);
|
address.AppendLine(ptRow.STREET);
|
||||||
address.AppendLine(ptRow.CITY + ", " + ptRow.STATE + " " + ptRow.ZIP);
|
address.AppendLine(ptRow.CITY + ", " + ptRow.STATE + " " + ptRow.ZIP);
|
||||||
g.DrawString(address.ToString(), fBody, Brushes.Black, printArea, sf);
|
g.DrawString(address.ToString(), fBody, Brushes.Black, printArea, sf);
|
||||||
|
|
||||||
|
g.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -459,6 +472,8 @@ namespace IndianHealthService.ClinicalScheduling
|
||||||
address.AppendLine(ptRow.STREET);
|
address.AppendLine(ptRow.STREET);
|
||||||
address.AppendLine(ptRow.CITY + ", " + ptRow.STATE + " " + ptRow.ZIP);
|
address.AppendLine(ptRow.CITY + ", " + ptRow.STATE + " " + ptRow.ZIP);
|
||||||
g.DrawString(address.ToString(), fBody, Brushes.Black, printArea, sf);
|
g.DrawString(address.ToString(), fBody, Brushes.Black, printArea, sf);
|
||||||
|
|
||||||
|
g.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -517,6 +532,7 @@ namespace IndianHealthService.ClinicalScheduling
|
||||||
address.AppendLine(ptRow.CITY + ", " + ptRow.STATE + " " + ptRow.ZIP);
|
address.AppendLine(ptRow.CITY + ", " + ptRow.STATE + " " + ptRow.ZIP);
|
||||||
g.DrawString(address.ToString(), fBody, Brushes.Black, printArea, sf);
|
g.DrawString(address.ToString(), fBody, Brushes.Black, printArea, sf);
|
||||||
|
|
||||||
|
g.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -529,6 +545,7 @@ namespace IndianHealthService.ClinicalScheduling
|
||||||
{
|
{
|
||||||
e.Graphics.DrawString(msg, new Font(FontFamily.GenericSerif, 14),
|
e.Graphics.DrawString(msg, new Font(FontFamily.GenericSerif, 14),
|
||||||
Brushes.Black, e.MarginBounds);
|
Brushes.Black, e.MarginBounds);
|
||||||
|
e.Graphics.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -576,10 +593,16 @@ namespace IndianHealthService.ClinicalScheduling
|
||||||
string division = CGDocumentManager.Current.ConnectInfo.DivisionName;
|
string division = CGDocumentManager.Current.ConnectInfo.DivisionName;
|
||||||
g.DrawString(division, fBody, Brushes.Black, headerArea, sf0);
|
g.DrawString(division, fBody, Brushes.Black, headerArea, sf0);
|
||||||
|
|
||||||
|
const int watermarkLength = 75;
|
||||||
|
|
||||||
|
// Move down for optional form paper
|
||||||
|
printArea.Y += watermarkLength;
|
||||||
|
printArea.Height -= watermarkLength;
|
||||||
|
|
||||||
// Draw Title
|
// Draw Title
|
||||||
StringFormat sf = new StringFormat();
|
StringFormat sf = new StringFormat();
|
||||||
sf.Alignment = StringAlignment.Center; //for title & header
|
sf.Alignment = StringAlignment.Center; //for title & header
|
||||||
string title = "Routing Slip";
|
string title = strings.RoutingSlip;
|
||||||
g.DrawString(title, fTitle, Brushes.Black, printArea, sf); //title
|
g.DrawString(title, fTitle, Brushes.Black, printArea, sf); //title
|
||||||
|
|
||||||
// move down
|
// move down
|
||||||
|
@ -600,25 +623,31 @@ namespace IndianHealthService.ClinicalScheduling
|
||||||
}
|
}
|
||||||
|
|
||||||
// group header
|
// group header
|
||||||
g.DrawString("Patient Information", fGroupTitle, Brushes.Black, new Point(personalInfoRectangle.X, personalInfoRectangle.Y - 20));
|
s = strings.PtInfo;
|
||||||
|
StringFormat sf3 = new StringFormat(System.Threading.Thread.CurrentThread.CurrentUICulture.TextInfo.IsRightToLeft ? StringFormatFlags.DirectionRightToLeft : 0);
|
||||||
|
g.DrawString(s, fGroupTitle, Brushes.Black, new Rectangle(personalInfoRectangle.X, personalInfoRectangle.Y - 20, personalInfoRectangle.Width, 20), sf3);
|
||||||
|
|
||||||
|
StringFormat sf4 = new StringFormat(System.Threading.Thread.CurrentThread.CurrentUICulture.TextInfo.IsRightToLeft ? StringFormatFlags.DirectionRightToLeft : 0);
|
||||||
|
sf4.SetTabStops(0, new float[] { 75 });
|
||||||
|
sf4.SetDigitSubstitution(System.Threading.Thread.CurrentThread.CurrentUICulture.LCID, StringDigitSubstitute.Traditional);
|
||||||
|
|
||||||
// inner rectangle for drawing strings:
|
// inner rectangle for drawing strings:
|
||||||
Rectangle personalInfoInnerRectangle = new Rectangle(personalInfoRectangle.X + 20, personalInfoRectangle.Y + 20, personalInfoRectangle.Width - 40, personalInfoRectangle.Height - 40);
|
Rectangle personalInfoInnerRectangle = new Rectangle(personalInfoRectangle.X + 20, personalInfoRectangle.Y + 20, personalInfoRectangle.Width - 40, personalInfoRectangle.Height - 40);
|
||||||
|
|
||||||
// Strings to write
|
// Strings to write
|
||||||
StringBuilder sb = new StringBuilder(500);
|
StringBuilder sb = new StringBuilder(500);
|
||||||
sb.AppendLine("Name:" + "\t" + appt.Patient.Name);
|
sb.AppendLine(strings.Name + ":" + "\t" + appt.Patient.Name);
|
||||||
sb.AppendLine();
|
sb.AppendLine();
|
||||||
sb.AppendLine("ID#:" + "\t" + appt.Patient.ID);
|
sb.AppendLine(strings.ID + ":" + "\t" + appt.Patient.ID);
|
||||||
sb.AppendLine();
|
sb.AppendLine();
|
||||||
sb.AppendLine("DOB:" + "\t" + appt.Patient.DOB.ToShortDateString());
|
sb.AppendLine(strings.DOB + ":" + "\t" + appt.Patient.DOB.ToShortDateString());
|
||||||
sb.AppendLine();
|
sb.AppendLine();
|
||||||
sb.AppendLine("Age:" + "\t" + appt.Patient.UserFriendlyAge);
|
sb.AppendLine(strings.Age + ":" + "\t" + appt.Patient.UserFriendlyAge);
|
||||||
//sb.AppendLine();
|
//sb.AppendLine();
|
||||||
//sb.AppendLine("Sex:" + "\t" + appt.Patient.Sex.ToString());
|
//sb.AppendLine("Sex:" + "\t" + appt.Patient.Sex.ToString());
|
||||||
|
|
||||||
// Draw them
|
// Draw them
|
||||||
g.DrawString(sb.ToString(), fBody, Brushes.Black, personalInfoInnerRectangle);
|
g.DrawString(sb.ToString(), fBody, Brushes.Black, personalInfoInnerRectangle, sf4);
|
||||||
|
|
||||||
// draw curved rectangle
|
// draw curved rectangle
|
||||||
Rectangle apptInfoRectangle = new Rectangle(e.MarginBounds.X + e.MarginBounds.Width - 280, printArea.Y + 30, 280, part1Height);
|
Rectangle apptInfoRectangle = new Rectangle(e.MarginBounds.X + e.MarginBounds.Width - 280, printArea.Y + 30, 280, part1Height);
|
||||||
|
@ -628,27 +657,28 @@ namespace IndianHealthService.ClinicalScheduling
|
||||||
}
|
}
|
||||||
|
|
||||||
// group header
|
// group header
|
||||||
g.DrawString("Appointment Information", fGroupTitle, Brushes.Black, new Point(apptInfoRectangle.X, apptInfoRectangle.Y - 20));
|
s = strings.ApptInfo;
|
||||||
|
g.DrawString(s, fGroupTitle, Brushes.Black, new Rectangle(apptInfoRectangle.X, apptInfoRectangle.Y - 20, apptInfoRectangle.Width, 20), sf3);
|
||||||
|
|
||||||
// Strings to write
|
// Strings to write
|
||||||
sb = new StringBuilder();
|
sb = new StringBuilder();
|
||||||
sb.AppendLine("Clinic:");
|
sb.AppendLine(strings.Clinic + ":");
|
||||||
sb.AppendLine(appt.Resource);
|
sb.AppendLine(appt.Resource);
|
||||||
sb.AppendLine();
|
sb.AppendLine();
|
||||||
sb.AppendLine("Appointment Provider:");
|
sb.AppendLine(strings.AppointmentProvider + ":");
|
||||||
sb.AppendLine((appt.Provider == null) ? "(none)" : appt.Provider.ToString()); //Appt Provider or (none) if null
|
sb.AppendLine((appt.Provider == null) ? strings.none : appt.Provider.ToString()); //Appt Provider or (none) if null
|
||||||
sb.AppendLine();
|
sb.AppendLine();
|
||||||
sb.AppendLine("Patient Order:" + "\t" + apptOrder);
|
sb.AppendLine(strings.PatientOrder + ":" + "\t" + apptOrder);
|
||||||
sb.AppendLine("Date: " + "\t" + appt.StartTime.ToShortDateString() + " " + appt.StartTime.ToShortTimeString());
|
sb.AppendLine(strings.Date + ":" + "\t" + appt.StartTime.ToShortDateString() + " " + appt.StartTime.ToShortTimeString());
|
||||||
sb.AppendLine();
|
sb.AppendLine();
|
||||||
sb.AppendLine("Appointment Note: ");
|
sb.AppendLine(strings.AppointmentNote + ":");
|
||||||
sb.AppendLine(String.IsNullOrWhiteSpace(appt.Note)? "(none)" : appt.Note);
|
sb.AppendLine(String.IsNullOrWhiteSpace(appt.Note)? strings.none : appt.Note);
|
||||||
|
|
||||||
// Draw them
|
// Draw them
|
||||||
Rectangle apptInfoInnerRectangle = new Rectangle(apptInfoRectangle.X + 20, apptInfoRectangle.Y + 20, apptInfoRectangle.Width - 40, apptInfoRectangle.Height - 40);
|
Rectangle apptInfoInnerRectangle = new Rectangle(apptInfoRectangle.X + 20, apptInfoRectangle.Y + 20, apptInfoRectangle.Width - 40, apptInfoRectangle.Height - 40);
|
||||||
|
|
||||||
// Draw them
|
// Draw them
|
||||||
g.DrawString(sb.ToString(), fBody, Brushes.Black, apptInfoInnerRectangle);
|
g.DrawString(sb.ToString(), fBody, Brushes.Black, apptInfoInnerRectangle, sf4);
|
||||||
|
|
||||||
// Move Drawing Rectangle Down
|
// Move Drawing Rectangle Down
|
||||||
printArea.Y += apptInfoRectangle.Height + 30 + 20;
|
printArea.Y += apptInfoRectangle.Height + 30 + 20;
|
||||||
|
@ -664,14 +694,13 @@ namespace IndianHealthService.ClinicalScheduling
|
||||||
printArea.Y += 5;
|
printArea.Y += 5;
|
||||||
printArea.Height -= 5;
|
printArea.Height -= 5;
|
||||||
|
|
||||||
s = "Scratch Area";
|
s = strings.ScratchArea;
|
||||||
g.DrawString(s, fGroupTitle, Brushes.Black, printArea);
|
g.DrawString(s, fGroupTitle, Brushes.Black, printArea, sf3);
|
||||||
|
|
||||||
// move down
|
// move down
|
||||||
printArea.Y += 300;
|
printArea.Y += 240;
|
||||||
printArea.Height -= 300;
|
printArea.Height -= 240;
|
||||||
|
|
||||||
//TODO: Put Next Appointment Area
|
|
||||||
using (Pen dashpen = new Pen(Color.Black))
|
using (Pen dashpen = new Pen(Color.Black))
|
||||||
{
|
{
|
||||||
dashpen.DashStyle = DashStyle.Dot;
|
dashpen.DashStyle = DashStyle.Dot;
|
||||||
|
@ -681,12 +710,12 @@ namespace IndianHealthService.ClinicalScheduling
|
||||||
printArea.Y += 5;
|
printArea.Y += 5;
|
||||||
printArea.Height -= 5;
|
printArea.Height -= 5;
|
||||||
|
|
||||||
s = "Next Appointment Instructions";
|
s = strings.NextAppointmentInstructions;
|
||||||
g.DrawString(s, fGroupTitle, Brushes.Black, printArea);
|
g.DrawString(s, fGroupTitle, Brushes.Black, printArea, sf3);
|
||||||
|
|
||||||
// Draw Footer
|
// Draw Footer
|
||||||
//use sf0 to print the footer (center all the way)
|
//use sf0 to print the footer (center all the way)
|
||||||
s = "Printed: " + DateTime.Now.ToString();
|
s = strings.Printed + ": " + DateTime.Now.ToString();
|
||||||
Font fFooter = new Font(FontFamily.GenericSerif, 7);
|
Font fFooter = new Font(FontFamily.GenericSerif, 7);
|
||||||
g.DrawString(s, fFooter, Brushes.Black, footerArea, sf0);
|
g.DrawString(s, fFooter, Brushes.Black, footerArea, sf0);
|
||||||
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -78,6 +78,24 @@ namespace IndianHealthService.ClinicalScheduling {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Appointment Note.
|
||||||
|
/// </summary>
|
||||||
|
internal static string AppointmentNote {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("AppointmentNote", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Appointment Provider.
|
||||||
|
/// </summary>
|
||||||
|
internal static string AppointmentProvider {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("AppointmentProvider", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Appointment Details.
|
/// Looks up a localized string similar to Appointment Details.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -186,6 +204,15 @@ namespace IndianHealthService.ClinicalScheduling {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Next Appointment Instructions.
|
||||||
|
/// </summary>
|
||||||
|
internal static string NextAppointmentInstructions {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("NextAppointmentInstructions", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to (no instructions provided).
|
/// Looks up a localized string similar to (no instructions provided).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -195,6 +222,15 @@ namespace IndianHealthService.ClinicalScheduling {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to (none).
|
||||||
|
/// </summary>
|
||||||
|
internal static string none {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("none", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Notes.
|
/// Looks up a localized string similar to Notes.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -204,6 +240,15 @@ namespace IndianHealthService.ClinicalScheduling {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Patient Order.
|
||||||
|
/// </summary>
|
||||||
|
internal static string PatientOrder {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("PatientOrder", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Printed.
|
/// Looks up a localized string similar to Printed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -222,6 +267,24 @@ namespace IndianHealthService.ClinicalScheduling {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Routing Slip.
|
||||||
|
/// </summary>
|
||||||
|
internal static string RoutingSlip {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("RoutingSlip", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Scratch Area.
|
||||||
|
/// </summary>
|
||||||
|
internal static string ScratchArea {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("ScratchArea", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Sex.
|
/// Looks up a localized string similar to Sex.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -172,7 +172,7 @@
|
||||||
<value>الوقت</value>
|
<value>الوقت</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="years" xml:space="preserve">
|
<data name="years" xml:space="preserve">
|
||||||
<value>سنوات</value>
|
<value>سنة</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Female" xml:space="preserve">
|
<data name="Female" xml:space="preserve">
|
||||||
<value>أنثى</value>
|
<value>أنثى</value>
|
||||||
|
@ -180,4 +180,25 @@
|
||||||
<data name="Male" xml:space="preserve">
|
<data name="Male" xml:space="preserve">
|
||||||
<value>ذكر</value>
|
<value>ذكر</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="AppointmentNote" xml:space="preserve">
|
||||||
|
<value>ملاحضات الموعد</value>
|
||||||
|
</data>
|
||||||
|
<data name="AppointmentProvider" xml:space="preserve">
|
||||||
|
<value>الموعد عند</value>
|
||||||
|
</data>
|
||||||
|
<data name="NextAppointmentInstructions" xml:space="preserve">
|
||||||
|
<value>تعليمات الموعد القادم</value>
|
||||||
|
</data>
|
||||||
|
<data name="none" xml:space="preserve">
|
||||||
|
<value>(غير متوفر)</value>
|
||||||
|
</data>
|
||||||
|
<data name="PatientOrder" xml:space="preserve">
|
||||||
|
<value>دور المريض</value>
|
||||||
|
</data>
|
||||||
|
<data name="RoutingSlip" xml:space="preserve">
|
||||||
|
<value>قسيمة التوجيه</value>
|
||||||
|
</data>
|
||||||
|
<data name="ScratchArea" xml:space="preserve">
|
||||||
|
<value>ملاحضات زائدة</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
|
@ -180,4 +180,25 @@
|
||||||
<data name="Male" xml:space="preserve">
|
<data name="Male" xml:space="preserve">
|
||||||
<value>Male</value>
|
<value>Male</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="AppointmentNote" xml:space="preserve">
|
||||||
|
<value>Appointment Note</value>
|
||||||
|
</data>
|
||||||
|
<data name="AppointmentProvider" xml:space="preserve">
|
||||||
|
<value>Appointment Provider</value>
|
||||||
|
</data>
|
||||||
|
<data name="NextAppointmentInstructions" xml:space="preserve">
|
||||||
|
<value>Next Appointment Instructions</value>
|
||||||
|
</data>
|
||||||
|
<data name="none" xml:space="preserve">
|
||||||
|
<value>(none)</value>
|
||||||
|
</data>
|
||||||
|
<data name="PatientOrder" xml:space="preserve">
|
||||||
|
<value>Patient Order</value>
|
||||||
|
</data>
|
||||||
|
<data name="RoutingSlip" xml:space="preserve">
|
||||||
|
<value>Routing Slip</value>
|
||||||
|
</data>
|
||||||
|
<data name="ScratchArea" xml:space="preserve">
|
||||||
|
<value>Scratch Area</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
Loading…
Reference in New Issue