This commit is contained in:
Jsj
2008-03-25 12:45:35 +00:00
parent 1515b5ed9b
commit 6acc548cf3
3 changed files with 182 additions and 147 deletions

View File

@@ -86,6 +86,12 @@ namespace VEPROMS
// Get the default RO Graphic file extension
_DefaultROGraficFileExtension = _FolderConfig.Graphics_defaultext;
// if no graphic file extension was saved, use Tif
if (_DefaultROGraficFileExtension.Equals(""))
{
ppCmbxGrphFileExt.SelectedIndex = 5;
_DefaultROGraficFileExtension = ppCmbxGrphFileExt.Text;
}
SetupDefault(_DefaultROGraficFileExtension, ppLblGraphicFileExtDefault, ppCmbxGrphFileExt);
// Get the default Referenced Objects prefix
@@ -164,6 +170,11 @@ namespace VEPROMS
this.btnEdSettings.Visible = false;
ppLblDefSettingsInfo.Visible = false;
ppCbShwDefSettings.Visible = false; // hide check box for showing default values for top node
ppCbShwDefSettings.Checked = false;
// FOR NOW, don't show Start Message tab
// TODO: later on, not needed for initial release.
this.tcFolder.Tabs.Remove(tiStMsg);
this.btnStMsg.Visible = false;
}
else
{
@@ -171,6 +182,8 @@ namespace VEPROMS
this.tcFolder.Tabs.Remove(tiStMsg);
this.btnStMsg.Visible = false;
/* This color settings property page is currently no visible...
*
// this was coded for demo purposes... setup the text colors for the sample text
// of the Step Editor Text Colors property
_ROcolor = _FolderConfig.Color_ro;
@@ -182,11 +195,14 @@ namespace VEPROMS
_TransColor = _FolderConfig.Color_transition;
if (_TransColor == string.Empty) _TransColor = "Orange";
SetupSampleTextBoxes();
* */
// 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";
@@ -371,6 +387,7 @@ 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);
}
@@ -471,13 +488,23 @@ namespace VEPROMS
/// <param name="e">EventArgs</param>
private void ppCmbxChangeBarType_SelectedValueChanged(object sender, EventArgs e)
{
FolderConfig.PrintChangeBar pcb = (FolderConfig.PrintChangeBar)Enum.Parse(typeof(FolderConfig.PrintChangeBar), _DefaultChgBarType);
ProcessCmbxSelectionEnumChanged(ppCmbxChangeBarType, pcb, ppBtnDefaultChgBar, ppLblChangeBarTypeDefault);
setEnabledUserSpecifiedChgBarCombos(pcb);
if (!_Initializing)
{
FolderConfig.PrintChangeBar pcb = (FolderConfig.PrintChangeBar)Enum.Parse(typeof(FolderConfig.PrintChangeBar), _DefaultChgBarType);
ProcessCmbxSelectionEnumChanged(ppCmbxChangeBarType, pcb, ppBtnDefaultChgBar, ppLblChangeBarTypeDefault);
setEnabledUserSpecifiedChgBarCombos(pcb);
}
}
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.
//
FolderConfig.PrintChangeBar pcb = (FolderConfig.PrintChangeBar)Enum.Parse(typeof(FolderConfig.PrintChangeBar), _DefaultChgBarType);
if (pcb!= _FolderConfig.Print_ChangeBar)
_FolderConfig.Print_ChangeBar = pcb; // t
ppCmbxChangeBarType.SelectedIndex = -1; //reset to the default Change Bar setting
}
@@ -562,6 +589,9 @@ namespace VEPROMS
ProcessButtonClick(tiEditSettings, btnEdSettings);
}
#region Editor Color Property Page Settings
/** The property page for these color settings is not visible for now.
*
/// <summary>
/// Set the text and background colors for the sample text for the Step Editor Text Colors
/// on the Editor Settings property page
@@ -712,6 +742,8 @@ namespace VEPROMS
ppLblViewRO.ForeColor = cGetColor(_ROcolor);
ppLblEditRO.ForeColor = cGetColor(_ROcolor);
}
**/
#endregion
/// <summary>
/// Selection in Step Editor Columns combo box changed.
@@ -844,14 +876,14 @@ namespace VEPROMS
/// <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 = ((!_FolderConfig.Name.Equals("VEPROMS")) && (cmbx.SelectedValue != null));
deflabel.Visible = ppCbShwDefSettings.Checked && button.Visible;
if ((cmbx.SelectedIndex != -1) &&
cmbx.SelectedValue.Equals(enumval))
{
button.Focus();
button.PerformClick();
}
button.Visible = ((!_FolderConfig.Name.Equals("VEPROMS")) && (cmbx.SelectedValue != null));
deflabel.Visible = ppCbShwDefSettings.Checked && button.Visible;
}
/// <summary>