hide various items not needed at this time
This commit is contained in:
@@ -33,10 +33,10 @@ namespace VEPROMS
|
||||
private string _DefaultFormatColumns = null;
|
||||
private bool _Initializing = false;
|
||||
private FolderConfig _FolderConfig;
|
||||
private string _ROcolor;
|
||||
private string _TransColor;
|
||||
private string _EditBckgndColor;
|
||||
private string _ViewBckgndColor;
|
||||
//private string _ROcolor;
|
||||
//private string _TransColor;
|
||||
//private string _EditBckgndColor;
|
||||
//private string _ViewBckgndColor;
|
||||
|
||||
public frmFolderProperties(FolderConfig folderConfig)
|
||||
{
|
||||
@@ -200,29 +200,33 @@ namespace VEPROMS
|
||||
// Assign the data sources to the combo boxes
|
||||
ppCmbxChangeBarType.DataSource = EnumDetail<FolderConfig.PrintChangeBar>.Details();
|
||||
ppCmbxChangeBarType.DisplayMember = "Name";
|
||||
//ppCmbxChgBarPos.DisplayMember = "Description";
|
||||
ppCmbxChangeBarType.ValueMember = "EValue";
|
||||
ppCmbxChangeBarType.SelectedValue = -1;
|
||||
|
||||
ppCmbxChgBarPos.DataSource = EnumDetail<FolderConfig.PrintChangeBarLoc>.Details();
|
||||
ppCmbxChgBarPos.DisplayMember = "Name";
|
||||
ppCmbxChgBarPos.ValueMember = "EValue";
|
||||
ppCmbxChgBarPos.SelectedValue = -1;
|
||||
|
||||
ppCmbxChgBarTxtType.DataSource = EnumDetail<FolderConfig.PrintChangeBarText>.Details();
|
||||
ppCmbxChgBarTxtType.DisplayMember = "Name";
|
||||
ppCmbxChgBarTxtType.ValueMember = "EValue";
|
||||
ppCmbxChgBarTxtType.SelectedValue = -1;
|
||||
|
||||
ppCmbxPagination.DataSource = EnumDetail<FolderConfig.PrintPagination>.Details();
|
||||
ppCmbxPagination.DisplayMember = "Name";
|
||||
ppCmbxPagination.ValueMember = "EValue";
|
||||
ppCmbxPagination.SelectedValue = -1;
|
||||
|
||||
ppCmbxWatermark.DataSource = EnumDetail<FolderConfig.PrintWatermark>.Details();
|
||||
ppCmbxWatermark.DisplayMember = "Name";
|
||||
ppCmbxWatermark.ValueMember = "EValue";
|
||||
ppCmbxWatermark.SelectedValue = -1;
|
||||
|
||||
ppCmbxStpEditorCols.DataSource = EnumDetail<FolderConfig.FormatColumns>.Details();
|
||||
ppCmbxStpEditorCols.DisplayMember = "Name";
|
||||
ppCmbxStpEditorCols.ValueMember = "EValue";
|
||||
ppCmbxStpEditorCols.SelectedValue = -1;
|
||||
|
||||
ppCbShwDefSettings.Visible = true; // display check box for showing default values
|
||||
}
|
||||
@@ -280,11 +284,22 @@ namespace VEPROMS
|
||||
/// <param name="e">EventArgs</param>
|
||||
private void ppCmbxGrphFileExt_SelectedValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
ProcessCmbxSelectedValueChange(ppCmbxGrphFileExt, _DefaultROGraficFileExtension, ppBtnDefaultGrfExt, ppLblGraphicFileExtDefault);
|
||||
if (!_Initializing)
|
||||
ProcessCmbxSelectedValueChange(ppCmbxGrphFileExt, _DefaultROGraficFileExtension, ppBtnDefaultGrfExt, ppLblGraphicFileExtDefault);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reset to the parent setting.
|
||||
/// Find the parent setting and assign it to _FolderConfig.Graphics_defaultext.
|
||||
/// This will force the database to be updated.
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void ppBtnDefaultGrfExt_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Compare parent setting with current setting
|
||||
if (_DefaultROGraficFileExtension.Equals(_FolderConfig.Graphics_defaultext))
|
||||
_FolderConfig.Graphics_defaultext = _DefaultROGraficFileExtension;// this will force a database update (write)
|
||||
ppCmbxGrphFileExt.SelectedIndex = -1; //reset to the default Graphic File Extension setting
|
||||
}
|
||||
|
||||
@@ -295,11 +310,22 @@ namespace VEPROMS
|
||||
/// <param name="e">EventArgs</param>
|
||||
private void ppCmbxDefROPrefix_SelectedValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
ProcessCmbxSelectedValueChange(ppCmbxDefROPrefix, _DefaultROPrefix, ppBtnDefaultROPrefix, ppLblROPrefixDefault);
|
||||
if (!_Initializing)
|
||||
ProcessCmbxSelectedValueChange(ppCmbxDefROPrefix, _DefaultROPrefix, ppBtnDefaultROPrefix, ppLblROPrefixDefault);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reset to the parent setting.
|
||||
/// Find the parent setting and assign it to _FolderConfig.Default_SPPrefix.
|
||||
/// This will force the database to be updated.
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void ppBtnDefaultROPrefix_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Compare parent setting with current setting
|
||||
if ( _DefaultROPrefix.Equals(_FolderConfig.Default_SPPrefix))
|
||||
_FolderConfig.Default_SPPrefix = _DefaultROPrefix;// this will force a database update (write)
|
||||
ppCmbxDefROPrefix.SelectedIndex = -1; //reset to the default RO Prefix setting
|
||||
}
|
||||
|
||||
@@ -310,11 +336,22 @@ namespace VEPROMS
|
||||
/// <param name="e">EventArgs</param>
|
||||
private void ppCmbxDefImgPrefix_SelectedValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
ProcessCmbxSelectedValueChange(ppCmbxDefImgPrefix, _DefaultImagePrefix, ppBtnDefaultImgPrefix, ppLblImagePrefixDefault);
|
||||
if (!_Initializing)
|
||||
ProcessCmbxSelectedValueChange(ppCmbxDefImgPrefix, _DefaultImagePrefix, ppBtnDefaultImgPrefix, ppLblImagePrefixDefault);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reset to the parent setting.
|
||||
/// Find the parent setting and assign it to _FolderConfig.Default_IMPrefix.
|
||||
/// This will force the database to be updated.
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void ppBtnDefaultImgPrefix_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Compare parent setting with current setting
|
||||
if (_DefaultImagePrefix.Equals(_FolderConfig.Default_IMPrefix))
|
||||
_FolderConfig.Default_IMPrefix = _DefaultImagePrefix;// this will force a database update (write)
|
||||
ppCmbxDefImgPrefix.SelectedIndex = -1; //reset to the default Image Prefix setting
|
||||
}
|
||||
|
||||
@@ -387,13 +424,27 @@ namespace VEPROMS
|
||||
/// <param name="e">EventArgs</param>
|
||||
private void ppCmbxPagination_SelectedValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
//ProcessCmbxSelectedValueChange(ppCmbxPagination, _DefaultPagination, ppBtnDefPagination, ppLblPaginationDefault);
|
||||
FolderConfig.PrintPagination pgtn = (FolderConfig.PrintPagination)Enum.Parse(typeof(FolderConfig.PrintPagination), _DefaultPagination);
|
||||
ProcessCmbxSelectionEnumChanged(ppCmbxPagination, pgtn, ppBtnDefPagination, ppLblPaginationDefault);
|
||||
if (!_Initializing)
|
||||
{
|
||||
FolderConfig.PrintPagination pgtn = (FolderConfig.PrintPagination)Enum.Parse(typeof(FolderConfig.PrintPagination), _DefaultPagination);
|
||||
ProcessCmbxSelectionEnumChanged(ppCmbxPagination, pgtn, ppBtnDefPagination, ppLblPaginationDefault);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reset to the parent setting.
|
||||
/// Find the parent setting and assign it to _FolderConfig.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
|
||||
FolderConfig.PrintPagination pgtn = (FolderConfig.PrintPagination)Enum.Parse(typeof(FolderConfig.PrintPagination), _DefaultPagination);
|
||||
// Compare parent setting with current setting
|
||||
if (pgtn != _FolderConfig.Print_Pagination)
|
||||
_FolderConfig.Print_Pagination = pgtn; // this will force a database update (write)
|
||||
ppCmbxPagination.SelectedIndex = -1; //reset to the default Pagination setting
|
||||
}
|
||||
|
||||
@@ -404,11 +455,27 @@ namespace VEPROMS
|
||||
/// <param name="e">EventArgs</param>
|
||||
private void ppCmbxWatermark_SelectedValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
FolderConfig.PrintWatermark wtr = (FolderConfig.PrintWatermark)Enum.Parse(typeof(FolderConfig.PrintWatermark), _DefaultWatermark);
|
||||
ProcessCmbxSelectionEnumChanged(ppCmbxWatermark, wtr, ppBtnDefWatermark, ppLblWatermarkDefault);
|
||||
if (!_Initializing)
|
||||
{
|
||||
FolderConfig.PrintWatermark wtr = (FolderConfig.PrintWatermark)Enum.Parse(typeof(FolderConfig.PrintWatermark), _DefaultWatermark);
|
||||
ProcessCmbxSelectionEnumChanged(ppCmbxWatermark, wtr, ppBtnDefWatermark, ppLblWatermarkDefault);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reset to the parent setting.
|
||||
/// Find the parent setting and assign it to _FolderConfig.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
|
||||
FolderConfig.PrintWatermark wtr = (FolderConfig.PrintWatermark)Enum.Parse(typeof(FolderConfig.PrintWatermark), _DefaultWatermark);
|
||||
// Compare parent setting with current setting
|
||||
if (wtr != _FolderConfig.Print_Watermark)
|
||||
_FolderConfig.Print_Watermark = wtr; // this will force a database update (write)
|
||||
ppCmbxWatermark.SelectedIndex = -1; //reset to the default Watermark setting
|
||||
}
|
||||
|
||||
@@ -419,8 +486,11 @@ namespace VEPROMS
|
||||
/// <param name="e">EventArgs</param>
|
||||
private void ppChbxDisAutoDuplex_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
ppBtnDeftDisAutoDuplx.Visible = (!_FolderConfig.Name.Equals("VEPROMS")) && (_DefaultDisableDuplex != ppChbxDisAutoDuplex.Checked);
|
||||
ppLblAutoDuplexDefault.Visible = ppCbShwDefSettings.Checked && ppBtnDeftDisAutoDuplx.Visible;
|
||||
if (!_Initializing)
|
||||
{
|
||||
ppBtnDeftDisAutoDuplx.Visible = (!_FolderConfig.Name.Equals("VEPROMS")) && (_DefaultDisableDuplex != ppChbxDisAutoDuplex.Checked);
|
||||
ppLblAutoDuplexDefault.Visible = ppCbShwDefSettings.Checked && ppBtnDeftDisAutoDuplx.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -458,7 +528,8 @@ namespace VEPROMS
|
||||
/// <param name="e">EventArgs</param>
|
||||
private void ppCmbxFormat_SelectedValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
ProcessCmbxSelectedValueChange(ppCmbxFormat, _DefaultFormatName, ppBtnDefaultFmt, ppLblFormatDefault);
|
||||
if (!_Initializing)
|
||||
ProcessCmbxSelectedValueChange(ppCmbxFormat, _DefaultFormatName, ppBtnDefaultFmt, ppLblFormatDefault);
|
||||
}
|
||||
|
||||
private void ppBtnDefaultFmt_Click(object sender, EventArgs e)
|
||||
@@ -496,16 +567,21 @@ namespace VEPROMS
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reset to the parent setting.
|
||||
/// Find the parent setting and assign it to _FolderConfig.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)
|
||||
{
|
||||
// Find the parent setting and assign it to _FolderConfig.PrintChangeBar. This will force the database
|
||||
// to be updated. Prior to adding this logic, if we were saving a setting identical to the parent setting,
|
||||
// the database was not being updated, because it didn't see it as being different.
|
||||
//
|
||||
// Get the parent setting
|
||||
FolderConfig.PrintChangeBar pcb = (FolderConfig.PrintChangeBar)Enum.Parse(typeof(FolderConfig.PrintChangeBar), _DefaultChgBarType);
|
||||
// Compare parent setting with current setting
|
||||
if (pcb!= _FolderConfig.Print_ChangeBar)
|
||||
_FolderConfig.Print_ChangeBar = pcb; // t
|
||||
ppCmbxChangeBarType.SelectedIndex = -1; //reset to the default Change Bar setting
|
||||
_FolderConfig.Print_ChangeBar = pcb; // this will force a database update (write)
|
||||
ppCmbxChangeBarType.SelectedIndex = -1; //reset combo box to the default Change Bar setting
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -515,12 +591,27 @@ namespace VEPROMS
|
||||
/// <param name="e">EventArgs</param>
|
||||
private void ppCmbxChgBarPos_SelectedValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
FolderConfig.PrintChangeBarLoc cbl = (FolderConfig.PrintChangeBarLoc)Enum.Parse(typeof(FolderConfig.PrintChangeBarLoc), _DefaultChgBarLoc);
|
||||
ProcessCmbxSelectionEnumChanged(ppCmbxChgBarPos, cbl, ppBtnDefaultCbPos, ppLblChgBarPosDefault);
|
||||
if (!_Initializing)
|
||||
{
|
||||
FolderConfig.PrintChangeBarLoc cbl = (FolderConfig.PrintChangeBarLoc)Enum.Parse(typeof(FolderConfig.PrintChangeBarLoc), _DefaultChgBarLoc);
|
||||
ProcessCmbxSelectionEnumChanged(ppCmbxChgBarPos, cbl, ppBtnDefaultCbPos, ppLblChgBarPosDefault);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reset to the parent setting.
|
||||
/// Find the parent setting and assign it to _FolderConfig.Print_ChangeBarLoc.
|
||||
/// This will force the database to be updated.
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void ppCmbxChgBarPos_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Get the parent setting
|
||||
FolderConfig.PrintChangeBarLoc cbl = (FolderConfig.PrintChangeBarLoc)Enum.Parse(typeof(FolderConfig.PrintChangeBarLoc), _DefaultChgBarLoc);
|
||||
// Compare parent setting with current setting
|
||||
if (cbl != _FolderConfig.Print_ChangeBarLoc)
|
||||
_FolderConfig.Print_ChangeBarLoc = cbl; // this will force a database update (write)
|
||||
ppCmbxChgBarPos.SelectedIndex = -1; //reset to the default Change Bar Position setting
|
||||
}
|
||||
|
||||
@@ -531,13 +622,28 @@ namespace VEPROMS
|
||||
/// <param name="e">EventArgs</param>
|
||||
private void ppCmbxChgBarTxtType_SelectedValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
FolderConfig.PrintChangeBarText cbt = (FolderConfig.PrintChangeBarText)Enum.Parse(typeof(FolderConfig.PrintChangeBarText), _DefaultChgBarText);
|
||||
ProcessCmbxSelectionEnumChanged(ppCmbxChgBarTxtType, cbt, ppBtnDefCbTxtTyp, ppLblChgBarTxtTypeDefault);
|
||||
setEnabledUserSpecifiedChgBarText();
|
||||
if (!_Initializing)
|
||||
{
|
||||
FolderConfig.PrintChangeBarText cbt = (FolderConfig.PrintChangeBarText)Enum.Parse(typeof(FolderConfig.PrintChangeBarText), _DefaultChgBarText);
|
||||
ProcessCmbxSelectionEnumChanged(ppCmbxChgBarTxtType, cbt, ppBtnDefCbTxtTyp, ppLblChgBarTxtTypeDefault);
|
||||
setEnabledUserSpecifiedChgBarText();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reset to the parent setting.
|
||||
/// Find the parent setting and assign it to _FolderConfig.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
|
||||
FolderConfig.PrintChangeBarText cbt = (FolderConfig.PrintChangeBarText)Enum.Parse(typeof(FolderConfig.PrintChangeBarText), _DefaultChgBarText);
|
||||
// Compare parent setting with current setting
|
||||
if (cbt != _FolderConfig.Print_ChangeBarText)
|
||||
_FolderConfig.Print_ChangeBarText = cbt; // this will force a database update (write)
|
||||
ppCmbxChgBarTxtType.SelectedIndex = -1; //reset to the default Change Bar Text Type setting
|
||||
}
|
||||
|
||||
@@ -562,7 +668,8 @@ namespace VEPROMS
|
||||
/// <param name="e">EventArgs</param>
|
||||
private void ppTxbxChangeBarUserMsgOne_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
ppBtnDefCbTxt1.Visible = (!_FolderConfig.Name.Equals("VEPROMS")) && (ppTxbxChangeBarUserMsgOne.Text != null);
|
||||
if (!_Initializing)
|
||||
ppBtnDefCbTxt1.Visible = (!_FolderConfig.Name.Equals("VEPROMS")) && (ppTxbxChangeBarUserMsgOne.Text != null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -572,7 +679,8 @@ namespace VEPROMS
|
||||
/// <param name="e">EventArgs</param>
|
||||
private void ppTxbxChangeBarUserMsgTwo_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
ppBtnDefCbTxt2.Visible = (!_FolderConfig.Name.Equals("VEPROMS")) && (ppTxbxChgBarUserMsgTwo.Text != null);
|
||||
if (!_Initializing)
|
||||
ppBtnDefCbTxt2.Visible = (!_FolderConfig.Name.Equals("VEPROMS")) && (ppTxbxChgBarUserMsgTwo.Text != null);
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -752,12 +860,27 @@ namespace VEPROMS
|
||||
/// <param name="e">EventArgs</param>
|
||||
private void ppCmbxStpEditorCols_SelectedValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
FolderConfig.FormatColumns fcl = (FolderConfig.FormatColumns)Enum.Parse(typeof(FolderConfig.FormatColumns), _DefaultFormatColumns);
|
||||
ProcessCmbxSelectionEnumChanged(ppCmbxStpEditorCols, fcl, ppBtnDefEdCols, ppLblStpEditorColsDefault);
|
||||
if (!_Initializing)
|
||||
{
|
||||
FolderConfig.FormatColumns fcl = (FolderConfig.FormatColumns)Enum.Parse(typeof(FolderConfig.FormatColumns), _DefaultFormatColumns);
|
||||
ProcessCmbxSelectionEnumChanged(ppCmbxStpEditorCols, fcl, ppBtnDefEdCols, ppLblStpEditorColsDefault);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reset to the parent setting.
|
||||
/// Find the parent setting and assign it to _FolderConfig.Format_Columns.
|
||||
/// This will force the database to be updated.
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void ppBtnDefEdCols_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Get the parent setting
|
||||
FolderConfig.FormatColumns fcl = (FolderConfig.FormatColumns)Enum.Parse(typeof(FolderConfig.FormatColumns), _DefaultFormatColumns);
|
||||
// Compare parent setting with current setting
|
||||
if (fcl != _FolderConfig.Format_Columns)
|
||||
_FolderConfig.Format_Columns = fcl; // this will force a database update (write)
|
||||
ppCmbxStpEditorCols.SelectedIndex = -1; //reset to the default Step Editor Columns setting
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user