hide various items not needed at this time
This commit is contained in:
@@ -135,26 +135,32 @@ namespace VEPROMS
|
||||
ppCmbxChgBarPos.DataSource = EnumDetail<ProcedureConfig.PrintChangeBarLoc>.Details();
|
||||
ppCmbxChgBarPos.DisplayMember = "Description";
|
||||
ppCmbxChgBarPos.ValueMember = "EValue";
|
||||
ppCmbxChgBarPos.SelectedIndex = -1;
|
||||
|
||||
ppCmbxChgBarTxtType.DataSource = EnumDetail<ProcedureConfig.PrintChangeBarText>.Details();
|
||||
ppCmbxChgBarTxtType.DisplayMember = "Description";
|
||||
ppCmbxChgBarTxtType.ValueMember = "EValue";
|
||||
ppCmbxChgBarTxtType.SelectedIndex = -1;
|
||||
|
||||
ppCmbxChangeBarType.DataSource = EnumDetail<ProcedureConfig.PrintChangeBar>.Details();
|
||||
ppCmbxChangeBarType.DisplayMember = "Description";
|
||||
ppCmbxChangeBarType.ValueMember = "EValue";
|
||||
ppCmbxChangeBarType.SelectedIndex = -1;
|
||||
|
||||
ppCmbxPagination.DataSource = EnumDetail<ProcedureConfig.PrintPagination>.Details();
|
||||
ppCmbxPagination.DisplayMember = "Description";
|
||||
ppCmbxPagination.ValueMember = "EValue";
|
||||
ppCmbxPagination.SelectedIndex = -1;
|
||||
|
||||
ppCmbxWatermark.DataSource = EnumDetail<ProcedureConfig.PrintWatermark>.Details();
|
||||
ppCmbxWatermark.DisplayMember = "Description";
|
||||
ppCmbxWatermark.ValueMember = "EValue";
|
||||
ppCmbxWatermark.SelectedIndex = -1;
|
||||
|
||||
ppCmbxStpEditorCols.DataSource = EnumDetail<ProcedureConfig.FormatColumns>.Details();
|
||||
ppCmbxStpEditorCols.DisplayMember = "Description";
|
||||
ppCmbxStpEditorCols.ValueMember = "EValue";
|
||||
ppCmbxStpEditorCols.SelectedIndex = -1;
|
||||
|
||||
_Initializing = false;
|
||||
}
|
||||
@@ -220,14 +226,15 @@ namespace VEPROMS
|
||||
/// Enable or disable the user specified change bar options base on the type
|
||||
/// of change bar selected.
|
||||
/// </summary>
|
||||
private void setEnabledUserSpecifiedChgBarCombos()
|
||||
private void setEnabledUserSpecifiedChgBarCombos(ProcedureConfig.PrintChangeBar pcb)
|
||||
{
|
||||
ppGpbxUserSpecCB.Enabled =
|
||||
ppCmbxChgBarPos.Enabled =
|
||||
ppCmbxChgBarTxtType.Enabled =
|
||||
ppBtnDefaultCbPos.Enabled =
|
||||
ppBtnDefCbTxtTyp.Enabled = (ppCmbxChangeBarType.SelectedValue != null &&
|
||||
ppCmbxChangeBarType.SelectedValue.Equals(ProcedureConfig.PrintChangeBar.WithUserSpecified));
|
||||
ppCmbxChangeBarType.SelectedValue.Equals(ProcedureConfig.PrintChangeBar.WithUserSpecified)) ||
|
||||
(ppCmbxChangeBarType.SelectedValue == null && pcb.Equals(DocVersionConfig.PrintChangeBar.WithUserSpecified));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -237,12 +244,28 @@ namespace VEPROMS
|
||||
/// <param name="e">EventArgs</param>
|
||||
private void ppCmbxChangeBarType_SelectedValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
ProcessCmbxSelectedValueChange(ppCmbxChangeBarType, _DefaultChgBarType, ppBtnDefaultChgBar, ppLblChangeBarTypeDefault);
|
||||
setEnabledUserSpecifiedChgBarCombos();
|
||||
if (!_Initializing)
|
||||
{
|
||||
ProcedureConfig.PrintChangeBar pcb = (ProcedureConfig.PrintChangeBar)Enum.Parse(typeof(ProcedureConfig.PrintChangeBar), _DefaultChgBarType);
|
||||
ProcessCmbxSelectionEnumChanged(ppCmbxChangeBarType, pcb, ppBtnDefaultChgBar, ppLblChangeBarTypeDefault);
|
||||
setEnabledUserSpecifiedChgBarCombos(pcb);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reset to the parent setting.
|
||||
/// Find the parent setting and assign it to _ProcedureConfig.PrintChangeBar.
|
||||
/// This will force the database to be updated.
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void ppBtnDefaultChgBar_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Get the parent setting
|
||||
ProcedureConfig.PrintChangeBar pcb = (ProcedureConfig.PrintChangeBar)Enum.Parse(typeof(ProcedureConfig.PrintChangeBar), _DefaultChgBarType);
|
||||
// Compare parent setting with current setting
|
||||
if (pcb != _ProcedureConfig.Print_ChangeBar)
|
||||
_ProcedureConfig.Print_ChangeBar = pcb; // this will force a database update (write)
|
||||
ppCmbxChangeBarType.SelectedIndex = -1; //reset to the default Change Bar setting
|
||||
}
|
||||
|
||||
@@ -253,11 +276,27 @@ namespace VEPROMS
|
||||
/// <param name="e">EventArgs</param>
|
||||
private void ppCmbxChgBarPos_SelectedValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
ProcessCmbxSelectedValueChange(ppCmbxChgBarPos, _DefaultChgBarLoc, ppBtnDefaultCbPos, ppLblChgBarPosDefault);
|
||||
if (!_Initializing)
|
||||
{
|
||||
ProcedureConfig.PrintChangeBarLoc cbl = (ProcedureConfig.PrintChangeBarLoc)Enum.Parse(typeof(ProcedureConfig.PrintChangeBarLoc), _DefaultChgBarLoc);
|
||||
ProcessCmbxSelectionEnumChanged(ppCmbxChgBarPos, cbl, ppBtnDefaultCbPos, ppLblChgBarPosDefault);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reset to the parent setting.
|
||||
/// Find the parent setting and assign it to _ProcedureConfig.Print_ChangeBarLoc.
|
||||
/// This will force the database to be updated.
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void ppBtnDefaultCbPos_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Get the parent setting
|
||||
ProcedureConfig.PrintChangeBarLoc cbl = (ProcedureConfig.PrintChangeBarLoc)Enum.Parse(typeof(ProcedureConfig.PrintChangeBarLoc), _DefaultChgBarLoc);
|
||||
// Compare parent setting with current setting
|
||||
if (cbl != _ProcedureConfig.Print_ChangeBarLoc)
|
||||
_ProcedureConfig.Print_ChangeBarLoc = cbl; // this will force a database update (write)
|
||||
ppCmbxChgBarPos.SelectedIndex = -1; //reset to the default Change Bar Position setting
|
||||
}
|
||||
|
||||
@@ -268,12 +307,28 @@ namespace VEPROMS
|
||||
/// <param name="e">EventArgs</param>
|
||||
private void ppCmbxChgBarTxtType_SelectedValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
ProcessCmbxSelectedValueChange(ppCmbxChgBarTxtType, _DefaultChgBarText, ppBtnDefCbTxtTyp, ppLblChgBarTxtTypeDefault);
|
||||
setEnabledUserSpecifiedChgBarText();
|
||||
if (!_Initializing)
|
||||
{
|
||||
ProcedureConfig.PrintChangeBarText cbt = (ProcedureConfig.PrintChangeBarText)Enum.Parse(typeof(ProcedureConfig.PrintChangeBarText), _DefaultChgBarText);
|
||||
ProcessCmbxSelectionEnumChanged(ppCmbxChgBarTxtType, cbt, ppBtnDefCbTxtTyp, ppLblChgBarTxtTypeDefault);
|
||||
setEnabledUserSpecifiedChgBarText();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reset to the parent setting.
|
||||
/// Find the parent setting and assign it to _ProcedureConfig.Print_ChangeBarText.
|
||||
/// This will force the database to be updated.
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void ppBtnDefCbTxtTyp_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Get the parent setting
|
||||
ProcedureConfig.PrintChangeBarText cbt = (ProcedureConfig.PrintChangeBarText)Enum.Parse(typeof(ProcedureConfig.PrintChangeBarText), _DefaultChgBarText);
|
||||
// Compare parent setting with current setting
|
||||
if (cbt != _ProcedureConfig.Print_ChangeBarText)
|
||||
_ProcedureConfig.Print_ChangeBarText = cbt; // this will force a database update (write)
|
||||
ppCmbxChgBarTxtType.SelectedIndex = -1; //reset to the default Change Bar Text Type setting
|
||||
}
|
||||
|
||||
@@ -312,11 +367,27 @@ namespace VEPROMS
|
||||
/// <param name="e">EventArgs</param>
|
||||
private void ppCmbxPagination_SelectedValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
ProcessCmbxSelectedValueChange(ppCmbxPagination, _DefaultPagination, ppBtnDefPagination, ppLblPaginationDefault);
|
||||
if (!_Initializing)
|
||||
{
|
||||
ProcedureConfig.PrintPagination pgtn = (ProcedureConfig.PrintPagination)Enum.Parse(typeof(ProcedureConfig.PrintPagination), _DefaultPagination);
|
||||
ProcessCmbxSelectionEnumChanged(ppCmbxPagination, pgtn, ppBtnDefPagination, ppLblPaginationDefault);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reset to the parent setting.
|
||||
/// Find the parent setting and assign it to _ProcedureConfig.Print_Pagination.
|
||||
/// This will force the database to be updated.
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void ppBtnDefPagination_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Get the parent setting
|
||||
ProcedureConfig.PrintPagination pgtn = (ProcedureConfig.PrintPagination)Enum.Parse(typeof(ProcedureConfig.PrintPagination), _DefaultPagination);
|
||||
// Compare parent setting with current setting
|
||||
if (pgtn != _ProcedureConfig.Print_Pagination)
|
||||
_ProcedureConfig.Print_Pagination = pgtn; // this will force a database update (write)
|
||||
ppCmbxPagination.SelectedIndex = -1; //reset to the default Pagination setting
|
||||
}
|
||||
|
||||
@@ -327,11 +398,27 @@ namespace VEPROMS
|
||||
/// <param name="e">EventArgs</param>
|
||||
private void ppCmbxWatermark_SelectedValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
ProcessCmbxSelectedValueChange(ppCmbxWatermark, _DefaultWatermark, ppBtnDefWatermark, ppLblWatermarkDefault);
|
||||
if (!_Initializing)
|
||||
{
|
||||
ProcedureConfig.PrintWatermark wtr = (ProcedureConfig.PrintWatermark)Enum.Parse(typeof(ProcedureConfig.PrintWatermark), _DefaultWatermark);
|
||||
ProcessCmbxSelectionEnumChanged(ppCmbxWatermark, wtr, ppBtnDefWatermark, ppLblWatermarkDefault);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reset to the parent setting.
|
||||
/// Find the parent setting and assign it to _ProcedureConfig.Print_Watermark.
|
||||
/// This will force the database to be updated.
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void ppBtnDefWatermark_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Get the parent setting
|
||||
ProcedureConfig.PrintWatermark wtr = (ProcedureConfig.PrintWatermark)Enum.Parse(typeof(ProcedureConfig.PrintWatermark), _DefaultWatermark);
|
||||
// Compare parent setting with current setting
|
||||
if (wtr != _ProcedureConfig.Print_Watermark)
|
||||
_ProcedureConfig.Print_Watermark = wtr; // this will force a database update (write)
|
||||
ppCmbxWatermark.SelectedIndex = -1; //reset to the default Watermark setting
|
||||
}
|
||||
|
||||
@@ -425,6 +512,24 @@ namespace VEPROMS
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Process a change in the enum combo box selection
|
||||
/// </summary>
|
||||
/// <param name="cmbx">Combo Box Name</param>
|
||||
/// <param name="defstr">the default enum value</param>
|
||||
/// <param name="button">button to reset to default value</param>
|
||||
/// <param name="deflabel">label containing the default</param>
|
||||
private void ProcessCmbxSelectionEnumChanged(ComboBoxEx cmbx, object enumval, ButtonX button, Label deflabel)
|
||||
{
|
||||
if ((cmbx.SelectedIndex != -1) &&
|
||||
cmbx.SelectedValue.Equals(enumval))
|
||||
{
|
||||
button.Focus();
|
||||
button.PerformClick();
|
||||
}
|
||||
button.Visible = (cmbx.SelectedValue != null);
|
||||
deflabel.Visible = ppCbShwDefSettings.Checked && button.Visible;
|
||||
}
|
||||
/// <summary>
|
||||
/// Process a change in the combo box selection
|
||||
/// </summary>
|
||||
|
Reference in New Issue
Block a user