This commit is contained in:
@@ -11,6 +11,8 @@ using System.Drawing.Imaging;
|
||||
using VEPROMS.Properties;
|
||||
using DataLoader;
|
||||
using DescriptiveEnum;
|
||||
using DevComponents.DotNetBar;
|
||||
using DevComponents.DotNetBar.Controls;
|
||||
|
||||
namespace VEPROMS
|
||||
{
|
||||
@@ -62,44 +64,31 @@ namespace VEPROMS
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void FindDefaultValues()
|
||||
/// <summary>
|
||||
/// Use the ParentLookup to grab the default values
|
||||
/// - set the watermark property (where applicable) of the control with that value
|
||||
/// - set the default setting labels with that value
|
||||
/// ** the default setting labels appear when the Show Default Values checkbox is checked by the user.
|
||||
/// </summary>
|
||||
private void FindDefaultValues()
|
||||
{
|
||||
_DocVersionConfig.ParentLookup = true;
|
||||
|
||||
// get default format
|
||||
_DefaultFormatName = _DocVersionConfig.DefaultFormatSelection;
|
||||
if (_DefaultFormatName != null && !(_DefaultFormatName.Equals("")))
|
||||
{
|
||||
ppLblFormatDefault.Text = string.Format("({0})", _DefaultFormatName);
|
||||
ppCmbxFormat.WatermarkText = string.Format("{0}", _DefaultFormatName);
|
||||
}
|
||||
SetupDefault(_DefaultFormatName, ppLblFormatDefault, ppCmbxFormat);
|
||||
|
||||
// Get the default Change Bar Type
|
||||
_DefaultChgBarType = _DocVersionConfig.Print_ChangeBar.ToString();
|
||||
if (!(_DefaultChgBarType.Equals("")))
|
||||
{
|
||||
string tstr = EnumDescConverter.GetEnumDescription(_DocVersionConfig.Print_ChangeBar);
|
||||
ppLblChangeBarTypeDefault.Text = string.Format("({0})", tstr);
|
||||
ppCmbxChangeBarType.WatermarkText = string.Format("{0}", tstr);
|
||||
}
|
||||
_DefaultChgBarType = _DocVersionConfig.Print_ChangeBar.ToString();
|
||||
SetupDefault(EnumDescConverter.GetEnumDescription(_DocVersionConfig.Print_ChangeBar), ppLblChangeBarTypeDefault, ppCmbxChangeBarType);
|
||||
|
||||
// Get the default Change Bar Location
|
||||
_DefaultChgBarLoc = _DocVersionConfig.Print_ChangeBarLoc.ToString();
|
||||
if (!(_DefaultChgBarLoc.Equals("")))
|
||||
{
|
||||
string tstr = EnumDescConverter.GetEnumDescription(_DocVersionConfig.Print_ChangeBarLoc);
|
||||
ppLblChgBarPosDefault.Text = string.Format("({0})", tstr);
|
||||
ppCmbxChgBarPos.WatermarkText = string.Format("{0}", tstr);
|
||||
}
|
||||
SetupDefault(EnumDescConverter.GetEnumDescription(_DocVersionConfig.Print_ChangeBarLoc), ppLblChgBarPosDefault, ppCmbxChgBarPos);
|
||||
|
||||
// Get the default Change Bar text
|
||||
_DefaultChgBarText = _DocVersionConfig.Print_ChangeBarText.ToString();
|
||||
if (!(_DefaultChgBarText.Equals("")))
|
||||
{
|
||||
string tstr = EnumDescConverter.GetEnumDescription(_DocVersionConfig.Print_ChangeBarText);
|
||||
ppLblChgBarTxtTypeDefault.Text = string.Format("({0})", tstr);
|
||||
ppCmbxChgBarTxtType.WatermarkText = string.Format("{0}", tstr);
|
||||
}
|
||||
SetupDefault(EnumDescConverter.GetEnumDescription(_DocVersionConfig.Print_ChangeBarText), ppLblChgBarTxtTypeDefault, ppCmbxChgBarTxtType);
|
||||
|
||||
// Get the default User Change Bar Message 1
|
||||
_DefaultChgBarUsrMsg1 = _DocVersionConfig.Print_UserCBMess1;
|
||||
@@ -117,58 +106,33 @@ namespace VEPROMS
|
||||
|
||||
// Get the default RO Graphic file extension
|
||||
_DefaultROGraficFileExtension = _DocVersionConfig.Graphics_defaultext;
|
||||
if (!(_DefaultROGraficFileExtension.Equals("")))
|
||||
{
|
||||
ppLblGraphicFileExtDefault.Text = string.Format("({0})", _DefaultROGraficFileExtension);
|
||||
ppCmbxGrphFileExt.WatermarkText = string.Format("{0}", _DefaultROGraficFileExtension);
|
||||
}
|
||||
SetupDefault(_DefaultROGraficFileExtension, ppLblGraphicFileExtDefault, ppCmbxGrphFileExt);
|
||||
|
||||
// Get the default Referenced Objects prefix
|
||||
_DefaultROPrefix = _DocVersionConfig.RODefaults_setpointprefix;
|
||||
if (!(_DefaultROPrefix.Equals("")))
|
||||
{
|
||||
ppLblROPrefixDefault.Text = string.Format("({0})", _DefaultROPrefix);
|
||||
ppCmbxDefROPrefix.WatermarkText = string.Format("{0}", _DefaultROPrefix);
|
||||
}
|
||||
SetupDefault(_DefaultROPrefix, ppLblROPrefixDefault, ppCmbxDefROPrefix);
|
||||
|
||||
// Get the default RO Graphics prefix
|
||||
_DefaultImagePrefix = _DocVersionConfig.RODefaults_graphicsprefix;
|
||||
if (!(_DefaultImagePrefix.Equals("")))
|
||||
{
|
||||
ppLblImagePrefixDefault.Text = string.Format("({0})", _DefaultImagePrefix);
|
||||
ppCmbxDefImgPrefix.WatermarkText = string.Format("{0}", _DefaultImagePrefix);
|
||||
}
|
||||
SetupDefault(_DefaultImagePrefix, ppLblImagePrefixDefault, ppCmbxDefImgPrefix);
|
||||
|
||||
// Get the default Print Pagination
|
||||
_DefaultPagination = _DocVersionConfig.Print_Pagination.ToString();
|
||||
if (!(_DefaultPagination.Equals("")))
|
||||
{
|
||||
string tstr = EnumDescConverter.GetEnumDescription(_DocVersionConfig.Print_Pagination);
|
||||
ppLblPaginationDefault.Text = string.Format("({0})", tstr);
|
||||
ppCmbxPagination.WatermarkText = string.Format("{0}", tstr);
|
||||
}
|
||||
SetupDefault(EnumDescConverter.GetEnumDescription(_DocVersionConfig.Print_Pagination), ppLblPaginationDefault, ppCmbxPagination);
|
||||
|
||||
|
||||
// Get the default Watermark
|
||||
_DefaultWatermark = _DocVersionConfig.Print_Watermark.ToString();
|
||||
if (!(_DefaultWatermark.Equals("")))
|
||||
{
|
||||
string tstr = EnumDescConverter.GetEnumDescription(_DocVersionConfig.Print_Watermark);
|
||||
ppLblWatermarkDefault.Text = string.Format("({0})", tstr);
|
||||
ppCmbxWatermark.WatermarkText = string.Format("{0}", tstr);
|
||||
}
|
||||
SetupDefault(EnumDescConverter.GetEnumDescription(_DocVersionConfig.Print_Watermark), ppLblWatermarkDefault, ppCmbxWatermark);
|
||||
|
||||
// Get the default Disable Duplex
|
||||
_DefaultDisableDuplex = _DocVersionConfig.Print_DisableDuplex;
|
||||
ppLblAutoDuplexDefault.Text = string.Format("(Duplex {0})", (_DefaultDisableDuplex) ? "OFF" : "ON");
|
||||
|
||||
//// Get the default Format Columns
|
||||
//_DefaultFormatColumns = _FolderConfig.Format_Columns.ToString();
|
||||
//if (!(_DefaultFormatColumns.Equals("")))
|
||||
// folderPropStepEditorColumnsDefault.Text = string.Format("({0})", _DefaultFormatColumns);
|
||||
|
||||
_DocVersionConfig.ParentLookup = false;
|
||||
}
|
||||
|
||||
|
||||
private void frmVersionsProperties_Load(object sender, EventArgs e)
|
||||
{
|
||||
// populate the a list box of possible graphic file types
|
||||
@@ -229,11 +193,39 @@ namespace VEPROMS
|
||||
|
||||
}
|
||||
|
||||
private void ppBtnDefaultFmt_Click(object sender, EventArgs e)
|
||||
#region General tab
|
||||
|
||||
/// <summary>
|
||||
/// This is the General button used on the button interface design
|
||||
/// </summary>
|
||||
/// <param name="sender">object</param>
|
||||
/// <param name="e">EventArgs</param>
|
||||
private void btnGeneral_Click(object sender, EventArgs e)
|
||||
{
|
||||
ppCmbxFormat.SelectedIndex = -1;
|
||||
ProcessButtonClick(tiGeneral, btnGeneral);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Referenced Objects
|
||||
|
||||
/// <summary>
|
||||
/// This is the Referenced Objects button used on the button interface design
|
||||
/// </summary>
|
||||
/// <param name="sender">object</param>
|
||||
/// <param name="e">EventArgs</param>
|
||||
private void btnRefObjs_Click(object sender, EventArgs e)
|
||||
{
|
||||
ProcessButtonClick(tiRefObjs, btnRefObjs);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This is a temporary function for demo purposes...
|
||||
/// Display the standard folder selection dialog to have the user select the location of the Referenced Objects folder.
|
||||
/// From this, we will use the RO.FST to populate the RO and Image Accessory ID cobmo boxes.
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void ppBtnFldrDlg_Click(object sender, EventArgs e)
|
||||
{
|
||||
dlgROFolder = new FolderBrowserDialog();
|
||||
@@ -243,6 +235,12 @@ namespace VEPROMS
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// TEMPORARY - TO PROVIDE DEMO FUNCTIONALITY
|
||||
/// An RO Folder was selected, find the RO.FST file and populate the RO and Image database combo boxes
|
||||
/// </summary>
|
||||
/// <param name="sender">object</param>
|
||||
/// <param name="e">EventArgs</param>
|
||||
private void ppTxbxRoFoldLoc_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
string tpath = ppTxbxRoFoldLoc.Text + "\\RO.FST";
|
||||
@@ -269,14 +267,14 @@ namespace VEPROMS
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Selection in Graphic File Extension combo box changed.
|
||||
/// </summary>
|
||||
/// <param name="sender">object</param>
|
||||
/// <param name="e">EventArgs</param>
|
||||
private void ppCmbxGrphFileExt_SelectedValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
if ((ppCmbxGrphFileExt.SelectedIndex != -1) && _DefaultROGraficFileExtension.Equals(ppCmbxGrphFileExt.SelectedValue))
|
||||
{
|
||||
ppBtnDefaultGrfExt.Focus();
|
||||
ppBtnDefaultGrfExt.PerformClick();
|
||||
}
|
||||
ppBtnDefaultGrfExt.Visible = (ppCmbxGrphFileExt.SelectedValue != null);
|
||||
ProcessCmbxSelectedValueChange(ppCmbxGrphFileExt, _DefaultROGraficFileExtension, ppBtnDefaultGrfExt, ppLblGraphicFileExtDefault);
|
||||
}
|
||||
|
||||
private void ppBtnDefaultGrfExt_Click(object sender, EventArgs e)
|
||||
@@ -313,17 +311,29 @@ namespace VEPROMS
|
||||
ppCmbxDefImgPrefix.SelectedIndex = -1;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Output Settings
|
||||
|
||||
/// <summary>
|
||||
/// This is the Output Settings button used on the button interface design
|
||||
/// </summary>
|
||||
/// <param name="sender">object</param>
|
||||
/// <param name="e">EventArgs</param>
|
||||
private void btnOutputSettings_Click(object sender, EventArgs e)
|
||||
{
|
||||
ProcessButtonClick(tiOutputSettings, btnOutputSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Selection in Pagination combo box changed.
|
||||
/// </summary>
|
||||
/// <param name="sender">object</param>
|
||||
/// <param name="e">EventArgs</param>
|
||||
private void ppCmbxPagination_SelectedValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
DocVersionConfig.PrintPagination pgtn = (DocVersionConfig.PrintPagination)Enum.Parse(typeof(DocVersionConfig.PrintPagination), _DefaultPagination);
|
||||
if ((ppCmbxPagination.SelectedIndex != -1) &&
|
||||
ppCmbxPagination.SelectedValue.Equals(pgtn))
|
||||
{
|
||||
ppBtnDefPagination.Focus();
|
||||
ppBtnDefPagination.PerformClick();
|
||||
}
|
||||
ppBtnDefPagination.Visible = (ppCmbxPagination.SelectedValue != null);
|
||||
ppLblPaginationDefault.Visible = ppCbShwDefSettings.Checked && ppBtnDefPagination.Visible;
|
||||
ProcessCmbxSelectionEnumChanged(ppCmbxPagination, pgtn, ppBtnDefPagination, ppLblPaginationDefault);
|
||||
}
|
||||
|
||||
private void ppBtnDefPagination_Click(object sender, EventArgs e)
|
||||
@@ -331,24 +341,46 @@ namespace VEPROMS
|
||||
ppCmbxPagination.SelectedIndex = -1;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Selection in Watermark combo box changed.
|
||||
/// </summary>
|
||||
/// <param name="sender">object</param>
|
||||
/// <param name="e">EventArgs</param>
|
||||
private void ppCmbxWatermark_SelectedValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
DocVersionConfig.PrintWatermark wtr = (DocVersionConfig.PrintWatermark)Enum.Parse(typeof(DocVersionConfig.PrintWatermark), _DefaultWatermark);
|
||||
if ((ppCmbxWatermark.SelectedIndex != -1) &&
|
||||
ppCmbxWatermark.SelectedValue.Equals(wtr))
|
||||
{
|
||||
ppBtnDefWatermark.Focus();
|
||||
ppBtnDefWatermark.PerformClick();
|
||||
}
|
||||
ppBtnDefWatermark.Visible = (ppCmbxWatermark.SelectedValue != null);
|
||||
ppLblWatermarkDefault.Visible = ppCbShwDefSettings.Checked && ppBtnDefWatermark.Visible;
|
||||
}
|
||||
|
||||
private void ppBtnDefWatermark_Click(object sender, EventArgs e)
|
||||
{
|
||||
ppCmbxWatermark.SelectedIndex = -1;
|
||||
ProcessCmbxSelectionEnumChanged(ppCmbxWatermark, wtr, ppBtnDefWatermark, ppLblWatermarkDefault);
|
||||
}
|
||||
|
||||
private void ppBtnDefWatermark_Click(object sender, EventArgs e)
|
||||
{
|
||||
ppCmbxWatermark.SelectedIndex = -1;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Format Settings
|
||||
|
||||
/// <summary>
|
||||
/// This is the Format Settings button used on the button interface design
|
||||
/// </summary>
|
||||
/// <param name="sender">object</param>
|
||||
/// <param name="e">EventArgs</param>
|
||||
private void btnFmtSettings_Click(object sender, EventArgs e)
|
||||
{
|
||||
ProcessButtonClick(tiFmtSettings, btnFmtSettings);
|
||||
}
|
||||
|
||||
private void ppBtnDefaultFmt_Click(object sender, EventArgs e)
|
||||
{
|
||||
ppCmbxFormat.SelectedIndex = -1;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// If checked, will disable automatic duplexing (ex Foldout Pages)
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void ppChbxDisAutoDuplex_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
ppBtnDeftDisAutoDuplx.Visible = (_DefaultDisableDuplex != ppChbxDisAutoDuplex.Checked);
|
||||
@@ -356,18 +388,20 @@ namespace VEPROMS
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Selection in Format combo box changed.
|
||||
/// </summary>
|
||||
/// <param name="sender">object</param>
|
||||
/// <param name="e">EventArgs</param>
|
||||
private void ppCmbxFormat_SelectedValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
if ((ppCmbxFormat.SelectedIndex != -1) && _DefaultFormatName.Equals(ppCmbxFormat.SelectedValue))
|
||||
{
|
||||
ppBtnDefaultFmt.Focus();
|
||||
ppBtnDefaultFmt.PerformClick();
|
||||
}
|
||||
ppBtnDefaultFmt.Visible = (ppCmbxFormat.SelectedValue != null);
|
||||
ppLblFormatDefault.Visible = ppCbShwDefSettings.Checked && ppBtnDefaultFmt.Visible;
|
||||
|
||||
ProcessCmbxSelectedValueChange(ppCmbxFormat, _DefaultFormatName, ppBtnDefaultFmt, ppLblFormatDefault);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enable or disable the user specified change bar options base on the type
|
||||
/// of change bar selected.
|
||||
/// </summary>
|
||||
private void setEnabledUserSpecifiedChgBarCombos(DocVersionConfig.PrintChangeBar pcb)
|
||||
{
|
||||
ppGpbxUserSpecCB.Enabled =
|
||||
@@ -379,17 +413,15 @@ namespace VEPROMS
|
||||
(ppCmbxChangeBarType.SelectedValue == null && pcb.Equals(DocVersionConfig.PrintChangeBar.WithUserSpecified));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Selection in Change Bar combo box changed.
|
||||
/// </summary>
|
||||
/// <param name="sender">object</param>
|
||||
/// <param name="e">EventArgs</param>
|
||||
private void ppCmbxChangeBarType_SelectedValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
DocVersionConfig.PrintChangeBar pcb = (DocVersionConfig.PrintChangeBar)Enum.Parse(typeof(DocVersionConfig.PrintChangeBar), _DefaultChgBarType);
|
||||
if ((ppCmbxChangeBarType.SelectedIndex != -1) &&
|
||||
ppCmbxChangeBarType.SelectedValue.Equals(pcb))
|
||||
{
|
||||
ppBtnDefaultChgBar.Focus();
|
||||
ppBtnDefaultChgBar.PerformClick();
|
||||
}
|
||||
ppBtnDefaultChgBar.Visible = (ppCmbxChangeBarType.SelectedValue != null);
|
||||
ppLblChangeBarTypeDefault.Visible = ppCbShwDefSettings.Checked && ppBtnDefaultChgBar.Visible;
|
||||
ProcessCmbxSelectionEnumChanged(ppCmbxChangeBarType, pcb, ppBtnDefaultChgBar, ppLblChangeBarTypeDefault);
|
||||
setEnabledUserSpecifiedChgBarCombos(pcb);
|
||||
}
|
||||
|
||||
@@ -398,17 +430,15 @@ namespace VEPROMS
|
||||
ppCmbxChangeBarType.SelectedIndex = -1;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Selection in Change Bar Position combo box changed.
|
||||
/// </summary>
|
||||
/// <param name="sender">object</param>
|
||||
/// <param name="e">EventArgs</param>
|
||||
private void ppCmbxChgBarPos_SelectedValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
DocVersionConfig.PrintChangeBarLoc cbl = (DocVersionConfig.PrintChangeBarLoc)Enum.Parse(typeof(DocVersionConfig.PrintChangeBarLoc), _DefaultChgBarLoc);
|
||||
if ((ppCmbxChgBarPos.SelectedIndex != -1) &&
|
||||
ppCmbxChgBarPos.SelectedValue.Equals(cbl))
|
||||
{
|
||||
ppBtnDefaultCbPos.Focus();
|
||||
ppBtnDefaultCbPos.PerformClick();
|
||||
}
|
||||
ppBtnDefaultCbPos.Visible = (ppCmbxChgBarPos.SelectedValue != null);
|
||||
ppLblChgBarPosDefault.Visible = ppCbShwDefSettings.Checked && ppBtnDefaultCbPos.Visible;
|
||||
ProcessCmbxSelectionEnumChanged(ppCmbxChgBarPos, cbl, ppBtnDefaultCbPos, ppLblChgBarPosDefault);
|
||||
}
|
||||
|
||||
private void ppBtnDefaultCbPos_Click(object sender, EventArgs e)
|
||||
@@ -416,6 +446,10 @@ namespace VEPROMS
|
||||
ppCmbxChgBarPos.SelectedIndex = -1;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enable or disable the user specified change bar text based on the selected
|
||||
/// change bar text type (selected in the user specific change bar grouping)
|
||||
/// </summary>
|
||||
private void setEnabledUserSpecifiedChgBarText()
|
||||
{
|
||||
ppGpbxUserSpecTxt.Enabled =
|
||||
@@ -426,17 +460,15 @@ namespace VEPROMS
|
||||
ppCmbxChgBarTxtType.SelectedValue.Equals(DocVersionConfig.PrintChangeBarText.UserDef));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Selection in Change Bar Text Type combo box changed.
|
||||
/// </summary>
|
||||
/// <param name="sender">object</param>
|
||||
/// <param name="e">EventArgs</param>
|
||||
private void ppCmbxChgBarTxtType_SelectedValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
DocVersionConfig.PrintChangeBarText cbt = (DocVersionConfig.PrintChangeBarText)Enum.Parse(typeof(DocVersionConfig.PrintChangeBarText), _DefaultChgBarText);
|
||||
if ((ppCmbxChgBarTxtType.SelectedIndex != -1) &&
|
||||
ppCmbxChgBarTxtType.SelectedValue.Equals(cbt))
|
||||
{
|
||||
ppBtnDefCbTxtTyp.Focus();
|
||||
ppBtnDefCbTxtTyp.PerformClick();
|
||||
}
|
||||
ppBtnDefCbTxtTyp.Visible = (ppCmbxChgBarTxtType.SelectedValue != null);
|
||||
ppLblChgBarTxtTypeDefault.Visible = ppCbShwDefSettings.Checked && ppBtnDefCbTxtTyp.Visible;
|
||||
ProcessCmbxSelectionEnumChanged(ppCmbxChgBarTxtType, cbt, ppBtnDefCbTxtTyp, ppLblChgBarTxtTypeDefault);
|
||||
setEnabledUserSpecifiedChgBarText();
|
||||
}
|
||||
|
||||
@@ -445,16 +477,61 @@ namespace VEPROMS
|
||||
ppCmbxChgBarTxtType.SelectedIndex = -1;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Selection in Change Bar User Message One text changed.
|
||||
/// </summary>
|
||||
/// <param name="sender">object</param>
|
||||
/// <param name="e">EventArgs</param>
|
||||
private void ppTxbxChangeBarUserMsgOne_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
ppBtnDefCbTxt1.Visible = (ppTxbxChangeBarUserMsgOne.Text != null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Selection in Change Bar User Message Two text changed.
|
||||
/// </summary>
|
||||
/// <param name="sender">object</param>
|
||||
/// <param name="e">EventArgs</param>
|
||||
private void ppTxbxChangeBarUserMsgTwo_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
ppBtnDefCbTxt2.Visible = (ppTxbxChangeBarUserMsgTwo.Text != null);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Library Documents
|
||||
|
||||
/// <summary>
|
||||
/// This is the Library Documents button used on the button interface design
|
||||
/// </summary>
|
||||
/// <param name="sender">object</param>
|
||||
/// <param name="e">EventArgs</param>
|
||||
private void btnLibDocs_Click(object sender, EventArgs e)
|
||||
{
|
||||
ProcessButtonClick(tiLibDocs, btnLibDocs);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Generic functions used on this property page
|
||||
|
||||
/// <summary>
|
||||
/// This is a generic Enter Event function for use with all of the property page tabs.
|
||||
/// Found that the visiblity value of buttons is not recorded until the property page in which it resides is diplayed.
|
||||
/// Thus we need to call defaultSettingVisiblity() to check and set visiblity states.
|
||||
/// </summary>
|
||||
/// <param name="sender"> type object</param>
|
||||
/// <param name="e">type EventArgs</param>
|
||||
private void tabpage_Enter(object sender, EventArgs e)
|
||||
{
|
||||
// Show or hide the labels containing the default values
|
||||
if (!_Initializing)
|
||||
defaultSettingsVisiblity();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines what labels (showing default values) are visable on the property pages
|
||||
/// </summary>
|
||||
private void defaultSettingsVisiblity()
|
||||
{
|
||||
ppLblChgBarUserMsgOneDefault.Visible =
|
||||
@@ -473,52 +550,12 @@ namespace VEPROMS
|
||||
ppLblAutoDuplexDefault.Visible = ppCbShwDefSettings.Checked && ppBtnDeftDisAutoDuplx.Visible;
|
||||
}
|
||||
|
||||
private void ppCbShwDefSettings_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
defaultSettingsVisiblity();
|
||||
}
|
||||
|
||||
private void tabGeneral_Layout(object sender, LayoutEventArgs e)
|
||||
{
|
||||
if (!_Initializing)
|
||||
defaultSettingsVisiblity();
|
||||
}
|
||||
|
||||
private void btnGeneral_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClearAllCheckedButtons();
|
||||
tcVersions.SelectedTab = tiGeneral;
|
||||
btnGeneral.Checked = true;
|
||||
}
|
||||
|
||||
private void btnRefObjs_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClearAllCheckedButtons();
|
||||
tcVersions.SelectedTab = tiRefObjs;
|
||||
btnRefObjs.Checked = true;
|
||||
}
|
||||
|
||||
private void btnOutputSettings_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClearAllCheckedButtons();
|
||||
tcVersions.SelectedTab = tiOutputSettings;
|
||||
btnOutputSettings.Checked = true;
|
||||
}
|
||||
|
||||
private void btnFmtSettings_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClearAllCheckedButtons();
|
||||
tcVersions.SelectedTab = tiFmtSettings;
|
||||
btnFmtSettings.Checked = true;
|
||||
}
|
||||
|
||||
private void btnLibDocs_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClearAllCheckedButtons();
|
||||
tcVersions.SelectedTab = tiLibDocs;
|
||||
btnLibDocs.Checked = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// For the Button Interface property page style, when a button is selected (pressed),
|
||||
/// it will remain in the checked state even when a different button is selected. Thus
|
||||
/// we must clear the checked state of the buttons when a button is selected, then set
|
||||
/// the newly selected button's state to checked.
|
||||
/// </summary>
|
||||
private void ClearAllCheckedButtons()
|
||||
{
|
||||
btnGeneral.Checked = false;
|
||||
@@ -527,5 +564,72 @@ namespace VEPROMS
|
||||
btnFmtSettings.Checked = false;
|
||||
btnLibDocs.Checked = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Select the corresponding tab and set the button's state to checked
|
||||
/// </summary>
|
||||
/// <param name="tab">Property Page Tab</param>
|
||||
/// <param name="button">Corresponding Property Page Button</param>
|
||||
private void ProcessButtonClick(TabItem tab, ButtonX button)
|
||||
{
|
||||
ClearAllCheckedButtons();
|
||||
tcVersions.SelectedTab = tab;
|
||||
button.Checked = true;
|
||||
}
|
||||
|
||||
/// <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>
|
||||
/// <param name="cmbx">Combo Box Name</param>
|
||||
/// <param name="defstr">string containing default text</param>
|
||||
/// <param name="button">button to reset to default value</param>
|
||||
/// <param name="deflabel">label containing the default</param>
|
||||
private void ProcessCmbxSelectedValueChange(ComboBoxEx cmbx, string defstr, ButtonX button, Label deflabel)
|
||||
{
|
||||
if ((cmbx.SelectedIndex != -1) && defstr.Equals(cmbx.SelectedValue))
|
||||
{
|
||||
button.Focus();
|
||||
button.PerformClick();
|
||||
}
|
||||
button.Visible = cmbx.SelectedValue != null;
|
||||
deflabel.Visible = ppCbShwDefSettings.Checked && button.Visible;
|
||||
}
|
||||
/// <summary>
|
||||
/// Set the watermark and default label
|
||||
/// </summary>
|
||||
/// <param name="defaultText">The default text</param>
|
||||
/// <param name="lbl">Label that displays the current default when view defaults is set</param>
|
||||
/// <param name="cmboEx">Combo box with a watermark property</param>
|
||||
private static void SetupDefault(string defaultText, Label lbl, ComboBoxEx cmbo)
|
||||
{
|
||||
if (defaultText != null && !(defaultText.Equals("")))
|
||||
{
|
||||
lbl.Text = string.Format("({0})", defaultText);
|
||||
cmbo.WatermarkText = string.Format("{0}", defaultText);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user