This commit is contained in:
2010-07-23 15:56:27 +00:00
parent 047909f8fe
commit 3a49176ee3
8 changed files with 2585 additions and 388 deletions

View File

@@ -165,32 +165,32 @@ namespace VEPROMS
FindDefaultValues();
// Assign the data sources to the combo boxes
ppCmbxChgBarPos.DataSource = EnumDetail<ProcedureConfig.PrintChangeBarLoc>.Details();
ppCmbxChgBarPos.DataSource = EnumDetail<PrintChangeBarLoc>.Details();
ppCmbxChgBarPos.DisplayMember = "Description";
ppCmbxChgBarPos.ValueMember = "EValue";
ppCmbxChgBarPos.SelectedIndex = -1;
ppCmbxChgBarTxtType.DataSource = EnumDetail<ProcedureConfig.PrintChangeBarText>.Details();
ppCmbxChgBarTxtType.DataSource = EnumDetail<PrintChangeBarText>.Details();
ppCmbxChgBarTxtType.DisplayMember = "Description";
ppCmbxChgBarTxtType.ValueMember = "EValue";
ppCmbxChgBarTxtType.SelectedIndex = -1;
ppCmbxChangeBarType.DataSource = EnumDetail<ProcedureConfig.PrintChangeBar>.Details();
ppCmbxChangeBarType.DataSource = EnumDetail<PrintChangeBar>.Details();
ppCmbxChangeBarType.DisplayMember = "Description";
ppCmbxChangeBarType.ValueMember = "EValue";
ppCmbxChangeBarType.SelectedIndex = -1;
ppCmbxPagination.DataSource = EnumDetail<ProcedureConfig.PrintPagination>.Details();
ppCmbxPagination.DataSource = EnumDetail<PrintPagination>.Details();
ppCmbxPagination.DisplayMember = "Description";
ppCmbxPagination.ValueMember = "EValue";
ppCmbxPagination.SelectedIndex = -1;
ppCmbxWatermark.DataSource = EnumDetail<ProcedureConfig.PrintWatermark>.Details();
ppCmbxWatermark.DataSource = EnumDetail<PrintWatermark>.Details();
ppCmbxWatermark.DisplayMember = "Description";
ppCmbxWatermark.ValueMember = "EValue";
ppCmbxWatermark.SelectedIndex = -1;
ppCmbxStpEditorCols.DataSource = EnumDetail<ProcedureConfig.FormatColumns>.Details();
ppCmbxStpEditorCols.DataSource = EnumDetail<FormatColumns>.Details();
ppCmbxStpEditorCols.DisplayMember = "Description";
ppCmbxStpEditorCols.ValueMember = "EValue";
ppCmbxStpEditorCols.SelectedIndex = -1;
@@ -219,7 +219,7 @@ namespace VEPROMS
{
//if (!_Initializing)
//{
ProcedureConfig.FormatColumns fc = (ProcedureConfig.FormatColumns)Enum.Parse(typeof(ProcedureConfig.FormatColumns), _DefaultFormatColumns);
FormatColumns fc = (FormatColumns)Enum.Parse(typeof(FormatColumns), _DefaultFormatColumns);
ProcessCmbxSelectionEnumChanged(ppCmbxStpEditorCols, fc, ppBtnDefEdCols, ppLblStpEditorColsDefault);
//if ((ppCmbxStpEditorCols.SelectedIndex != -1) && ppCmbxStpEditorCols.SelectedValue.Equals(fc))
//{
@@ -265,7 +265,7 @@ namespace VEPROMS
/// Enable or disable the user specified change bar options base on the type
/// of change bar selected.
/// </summary>
private void setEnabledUserSpecifiedChgBarCombos(ProcedureConfig.PrintChangeBar pcb)
private void setEnabledUserSpecifiedChgBarCombos(PrintChangeBar pcb)
{
//ppGpbxUserSpecCB.Enabled =
//ppCmbxChgBarPos.Enabled =
@@ -276,8 +276,8 @@ namespace VEPROMS
// (ppCmbxChangeBarType.SelectedValue == null && pcb.Equals(DocVersionConfig.PrintChangeBar.WithUserSpecified));
ppGpbxUserSpecCB.Enabled = (ppCmbxChangeBarType.SelectedValue != null &&
ppCmbxChangeBarType.SelectedValue.Equals(ProcedureConfig.PrintChangeBar.WithUserSpecified)) ||
(ppCmbxChangeBarType.SelectedValue == null && pcb.Equals(ProcedureConfig.PrintChangeBar.WithUserSpecified));
ppCmbxChangeBarType.SelectedValue.Equals(PrintChangeBar.WithUserSpecified)) ||
(ppCmbxChangeBarType.SelectedValue == null && pcb.Equals(PrintChangeBar.WithUserSpecified));
}
/// <summary>
@@ -290,7 +290,7 @@ namespace VEPROMS
//Console.WriteLine("### SelectedValueChanged");
if (!_Initializing)
{
ProcedureConfig.PrintChangeBar pcb = (ProcedureConfig.PrintChangeBar)Enum.Parse(typeof(ProcedureConfig.PrintChangeBar), _DefaultChgBarType);
PrintChangeBar pcb = (PrintChangeBar)Enum.Parse(typeof(PrintChangeBar), _DefaultChgBarType);
ProcessCmbxSelectionEnumChanged(ppCmbxChangeBarType, pcb, ppBtnDefaultChgBar, ppLblChangeBarTypeDefault);
setEnabledUserSpecifiedChgBarCombos(pcb);
//tcpFormatSettings.Focus();
@@ -307,7 +307,7 @@ namespace VEPROMS
private void ppBtnDefaultChgBar_Click(object sender, EventArgs e)
{
// Get the parent setting
ProcedureConfig.PrintChangeBar pcb = (ProcedureConfig.PrintChangeBar)Enum.Parse(typeof(ProcedureConfig.PrintChangeBar), _DefaultChgBarType);
PrintChangeBar pcb = (PrintChangeBar)Enum.Parse(typeof(PrintChangeBar), _DefaultChgBarType);
// Compare parent setting with current setting
_Initializing = true;
if (pcb != _ProcedureConfig.Print_ChangeBar)
@@ -326,7 +326,7 @@ namespace VEPROMS
{
if (!_Initializing)
{
ProcedureConfig.PrintChangeBarLoc cbl = (ProcedureConfig.PrintChangeBarLoc)Enum.Parse(typeof(ProcedureConfig.PrintChangeBarLoc), _DefaultChgBarLoc);
PrintChangeBarLoc cbl = (PrintChangeBarLoc)Enum.Parse(typeof(PrintChangeBarLoc), _DefaultChgBarLoc);
ProcessCmbxSelectionEnumChanged(ppCmbxChgBarPos, cbl, ppBtnDefaultCbPos, ppLblChgBarPosDefault);
//tcpFormatSettings.Focus();
}
@@ -342,7 +342,7 @@ namespace VEPROMS
private void ppBtnDefaultCbPos_Click(object sender, EventArgs e)
{
// Get the parent setting
ProcedureConfig.PrintChangeBarLoc cbl = (ProcedureConfig.PrintChangeBarLoc)Enum.Parse(typeof(ProcedureConfig.PrintChangeBarLoc), _DefaultChgBarLoc);
PrintChangeBarLoc cbl = (PrintChangeBarLoc)Enum.Parse(typeof(PrintChangeBarLoc), _DefaultChgBarLoc);
// Compare parent setting with current setting
if (cbl != _ProcedureConfig.Print_ChangeBarLoc)
_ProcedureConfig.Print_ChangeBarLoc = cbl; // this will force a database update (write)
@@ -359,7 +359,7 @@ namespace VEPROMS
{
if (!_Initializing)
{
ProcedureConfig.PrintChangeBarText cbt = (ProcedureConfig.PrintChangeBarText)Enum.Parse(typeof(ProcedureConfig.PrintChangeBarText), _DefaultChgBarText);
PrintChangeBarText cbt = (PrintChangeBarText)Enum.Parse(typeof(PrintChangeBarText), _DefaultChgBarText);
ProcessCmbxSelectionEnumChanged(ppCmbxChgBarTxtType, cbt, ppBtnDefCbTxtTyp, ppLblChgBarTxtTypeDefault);
setEnabledUserSpecifiedChgBarText();
//tcpFormatSettings.Focus();
@@ -376,7 +376,7 @@ namespace VEPROMS
private void ppBtnDefCbTxtTyp_Click(object sender, EventArgs e)
{
// Get the parent setting
ProcedureConfig.PrintChangeBarText cbt = (ProcedureConfig.PrintChangeBarText)Enum.Parse(typeof(ProcedureConfig.PrintChangeBarText), _DefaultChgBarText);
PrintChangeBarText cbt = (PrintChangeBarText)Enum.Parse(typeof(PrintChangeBarText), _DefaultChgBarText);
// Compare parent setting with current setting
if (cbt != _ProcedureConfig.Print_ChangeBarText)
_ProcedureConfig.Print_ChangeBarText = cbt; // this will force a database update (write)
@@ -398,10 +398,10 @@ namespace VEPROMS
//ppCmbxChgBarTxtType.SelectedValue.Equals(ProcedureConfig.PrintChangeBarText.UserDef));
// This string is used to check against our default setting to see if User Defined Changebar Text is active
string decUserDef = ProcedureConfig.PrintChangeBarText.UserDef.ToString();
string decUserDef = PrintChangeBarText.UserDef.ToString();
ppGpbxUserSpecTxt.Enabled = (ppCmbxChgBarTxtType.SelectedValue != null &&
ppCmbxChgBarTxtType.SelectedValue.Equals(ProcedureConfig.PrintChangeBarText.UserDef)) ||
ppCmbxChgBarTxtType.SelectedValue.Equals(PrintChangeBarText.UserDef)) ||
(ppCmbxChgBarTxtType.SelectedIndex == -1 && _DefaultChgBarText.Equals(decUserDef));
}
@@ -429,7 +429,7 @@ namespace VEPROMS
{
if (!_Initializing)
{
ProcedureConfig.PrintPagination pgtn = (ProcedureConfig.PrintPagination)Enum.Parse(typeof(ProcedureConfig.PrintPagination), _DefaultPagination);
PrintPagination pgtn = (PrintPagination)Enum.Parse(typeof(PrintPagination), _DefaultPagination);
ProcessCmbxSelectionEnumChanged(ppCmbxPagination, pgtn, ppBtnDefPagination, ppLblPaginationDefault);
//tcpOutputSettings.Focus();
}
@@ -445,7 +445,7 @@ namespace VEPROMS
private void ppBtnDefPagination_Click(object sender, EventArgs e)
{
// Get the parent setting
ProcedureConfig.PrintPagination pgtn = (ProcedureConfig.PrintPagination)Enum.Parse(typeof(ProcedureConfig.PrintPagination), _DefaultPagination);
PrintPagination pgtn = (PrintPagination)Enum.Parse(typeof(PrintPagination), _DefaultPagination);
// Compare parent setting with current setting
if (pgtn != _ProcedureConfig.Print_Pagination)
_ProcedureConfig.Print_Pagination = pgtn; // this will force a database update (write)
@@ -462,7 +462,7 @@ namespace VEPROMS
{
if (!_Initializing)
{
ProcedureConfig.PrintWatermark wtr = (ProcedureConfig.PrintWatermark)Enum.Parse(typeof(ProcedureConfig.PrintWatermark), _DefaultWatermark);
PrintWatermark wtr = (PrintWatermark)Enum.Parse(typeof(PrintWatermark), _DefaultWatermark);
ProcessCmbxSelectionEnumChanged(ppCmbxWatermark, wtr, ppBtnDefWatermark, ppLblWatermarkDefault);
//tcpOutputSettings.Focus();
}
@@ -478,7 +478,7 @@ namespace VEPROMS
private void ppBtnDefWatermark_Click(object sender, EventArgs e)
{
// Get the parent setting
ProcedureConfig.PrintWatermark wtr = (ProcedureConfig.PrintWatermark)Enum.Parse(typeof(ProcedureConfig.PrintWatermark), _DefaultWatermark);
PrintWatermark wtr = (PrintWatermark)Enum.Parse(typeof(PrintWatermark), _DefaultWatermark);
// Compare parent setting with current setting
if (wtr != _ProcedureConfig.Print_Watermark)
_ProcedureConfig.Print_Watermark = wtr; // this will force a database update (write)
@@ -659,7 +659,7 @@ namespace VEPROMS
private void ppBtnDefEdCols_Click(object sender, EventArgs e)
{
// Get the parent setting
ProcedureConfig.FormatColumns fc = (ProcedureConfig.FormatColumns)Enum.Parse(typeof(ProcedureConfig.FormatColumns), _DefaultFormatColumns);
FormatColumns fc = (FormatColumns)Enum.Parse(typeof(FormatColumns), _DefaultFormatColumns);
if (fc != _ProcedureConfig.Format_Columns)
_ProcedureConfig.Format_Columns = fc; // this will force a database update (write)
ppCmbxStpEditorCols.SelectedIndex = -1; //reset to the default
@@ -669,7 +669,7 @@ namespace VEPROMS
private void ppBtnDefWatermark_Click_1(object sender, EventArgs e)
{
// Get the parent setting
ProcedureConfig.PrintWatermark wtr = (ProcedureConfig.PrintWatermark)Enum.Parse(typeof(ProcedureConfig.PrintWatermark), _DefaultWatermark);
PrintWatermark wtr = (PrintWatermark)Enum.Parse(typeof(PrintWatermark), _DefaultWatermark);
// Compare parent setting with current setting
if (wtr != _ProcedureConfig.Print_Watermark)
_ProcedureConfig.Print_Watermark = wtr; // this will force a database update (write)