This commit is contained in:
2009-01-27 15:47:52 +00:00
parent 258b503bed
commit d548cf9b29
4 changed files with 228 additions and 535 deletions

View File

@@ -92,15 +92,7 @@ namespace VEPROMS
ppCmbxGrphFileExt.SelectedIndex = 5;
_DefaultROGraficFileExtension = ppCmbxGrphFileExt.Text;
}
SetupDefault(_DefaultROGraficFileExtension, ppLblGraphicFileExtDefault, ppCmbxGrphFileExt);
// Get the default Referenced Objects prefix
_DefaultROPrefix = _FolderConfig.Default_SPPrefix;
SetupDefault(_DefaultROPrefix, ppLblROPrefixDefault, ppCmbxDefROPrefix);
// Get the default RO Graphics prefix
_DefaultImagePrefix = _FolderConfig.Default_IMPrefix;
SetupDefault(_DefaultImagePrefix, ppLblImagePrefixDefault, ppCmbxDefImgPrefix);
SetupDefault(_DefaultROGraficFileExtension, ppLblGrphFileExtDefault, ppCmbxGrphFileExt);
// Get the default Print Pagination
_DefaultPagination = _FolderConfig.Print_Pagination.ToString();
@@ -163,7 +155,6 @@ namespace VEPROMS
// - the first (top) tree node shows different "tabs" than the
// other folder type of tree nodes
if (!_FolderConfig.HasParent())
//if (_FolderConfig.Name.Equals("VEPROMS"))
{
// if we are at the top node of the tree, remove the Folder Property page tabs
// that do not pertain to this level (top of tree)
@@ -180,12 +171,21 @@ namespace VEPROMS
// TODO: later on, not needed for initial release.
this.tcFolder.Tabs.Remove(tiStMsg);
this.btnStMsg.Visible = false;
// Also, for the referenced object tab, the top node (veproms system level) should
// allow setting of the default graphics file extension. No other folder level allows this.
ppCmbxGrphFileExt.Visible = true;
ppLblGrphFileExtDefault.Visible = true;
lblGrphFileExt.Visible = true;
ppBtnDefaultGrphFileExt.Visible = true;
}
else
{
// don't show Start Message tab if not at top level
// don't show Start Message or ref obj tab if not at top level
this.tcFolder.Tabs.Remove(tiStMsg);
this.tcFolder.Tabs.Remove(tiRefObj);
this.btnStMsg.Visible = false;
this.btnRefObjs.Visible = false;
/* This color settings property page is currently no visible...
*
@@ -234,6 +234,12 @@ namespace VEPROMS
ppCmbxStpEditorCols.SelectedValue = -1;
ppCbShwDefSettings.Visible = true; // display check box for showing default values
// Also, for the referenced object tab, the top node (veproms system level) should
// allow setting of the default graphics file extension. No other folder level allows this.
ppCmbxGrphFileExt.Visible = false;
ppLblGrphFileExtDefault.Visible = false;
this.lblGrphFileExt.Visible = false;
}
_Initializing = false;
}
@@ -304,7 +310,7 @@ namespace VEPROMS
private void ppCmbxGrphFileExt_SelectedValueChanged(object sender, EventArgs e)
{
if (!_Initializing)
ProcessCmbxSelectedValueChange(ppCmbxGrphFileExt, _DefaultROGraficFileExtension, ppBtnDefaultGrfExt, ppLblGraphicFileExtDefault);
ProcessCmbxSelectedValueChange(ppCmbxGrphFileExt, _DefaultROGraficFileExtension, ppBtnDefaultGrphFileExt, ppLblGrphFileExtDefault);
}
/// <summary>
@@ -322,58 +328,6 @@ namespace VEPROMS
ppCmbxGrphFileExt.SelectedIndex = -1; //reset to the default Graphic File Extension setting
}
/// <summary>
/// Selection in Default RO Prefix combo box changed.
/// </summary>
/// <param name="sender">object</param>
/// <param name="e">EventArgs</param>
private void ppCmbxDefROPrefix_SelectedValueChanged(object sender, EventArgs e)
{
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
}
/// <summary>
/// Selection in Default Image Prefix combo box changed.
/// </summary>
/// <param name="sender">object</param>
/// <param name="e">EventArgs</param>
private void ppCmbxDefImgPrefix_SelectedValueChanged(object sender, EventArgs e)
{
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
}
/// <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
@@ -382,46 +336,30 @@ namespace VEPROMS
/// <param name="e">EventArgs</param>
private void ppTxbxRoFoldLoc_TextChanged(object sender, EventArgs e)
{
string tpath = ppTxbxRoFoldLoc.Text + "\\RO.FST";
if (File.Exists(tpath))
{
//TODO:
//string tpath = ppTxbxRoFoldLoc.Text + "\\RO.FST";
//if (File.Exists(tpath))
//{
// build a list of available RO Accessory Page ID's
ROFST rofst = new ROFST(tpath, null);
ROFST.rodbi[] rodblist = rofst.GetRODatabaseList();
for (int i = 0; i < rodblist.Length; i++)
{
string mitem = string.Format("{0} - {1}", rodblist[i].dbiTitle, rodblist[i].dbiAP);
switch (rodblist[i].dbiType)
{
case 7: ppCmbxDefROPrefix.Items.Add(mitem); // setpoint
break;
case 8: ppCmbxDefImgPrefix.Items.Add(mitem); // graphic
break;
default: // user defined
ppCmbxDefROPrefix.Items.Add(mitem);
ppCmbxDefImgPrefix.Items.Add(mitem);
break;
}
}
}
//ROFst rofst = ROFst.Get(_DocVersionConfig.MyDocVersion.DocVersionDocVersionROFsts[0].MyROFst.ROFstID);//new ROFst(tpath, null);
//ROFst.rodbi[] rodblist = rofst.GetRODatabaseList();
//for (int i = 0; i < rodblist.Length; i++)
//{
// string mitem = string.Format("{0} - {1}", rodblist[i].dbiTitle, rodblist[i].dbiAP);
// switch (rodblist[i].dbiType)
// {
// case 7: ppCmbxDefROPrefix.Items.Add(mitem); // setpoint
// break;
// case 8: ppCmbxDefImgPrefix.Items.Add(mitem); // graphic
// break;
// default: // user defined
// ppCmbxDefROPrefix.Items.Add(mitem);
// ppCmbxDefImgPrefix.Items.Add(mitem);
// break;
// }
//}
//}
}
/// <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();
if (dlgROFolder.ShowDialog() == DialogResult.OK)
{
ppTxbxRoFoldLoc.Text = dlgROFolder.SelectedPath;
}
}
#endregion
#region Output Settings tab
@@ -979,10 +917,8 @@ namespace VEPROMS
ppLblDefSettingsInfo.Visible = ppCbShwDefSettings.Checked;
ppLblAutoDuplexDefault.Visible = ppCbShwDefSettings.Checked && ppBtnDeftDisAutoDuplx.Visible;
ppLblROPrefixDefault.Visible = ppCbShwDefSettings.Checked && ppBtnDefaultROPrefix.Visible;
ppLblImagePrefixDefault.Visible = ppCbShwDefSettings.Checked && ppBtnDefaultImgPrefix.Visible;
ppLblStpEditorColsDefault.Visible = ppCbShwDefSettings.Checked && ppBtnDefEdCols.Visible;
ppLblGraphicFileExtDefault.Visible = ppCbShwDefSettings.Checked && ppBtnDefaultGrfExt.Visible;
ppLblGrphFileExtDefault.Visible = ppCbShwDefSettings.Checked && ppBtnDefaultGrphFileExt.Visible;
ppLblWatermarkDefault.Visible = ppCbShwDefSettings.Checked && ppBtnDefWatermark.Visible;
ppLblPaginationDefault.Visible = ppCbShwDefSettings.Checked && ppBtnDefPagination.Visible;
ppLblChgBarTxtTypeDefault.Visible = ppCbShwDefSettings.Checked && ppBtnDefCbTxtTyp.Visible;
@@ -1005,7 +941,7 @@ namespace VEPROMS
button.Focus();
button.PerformClick();
}
button.Visible = (!_FolderConfig.Name.Equals("VEPROMS")) && (cmbx.SelectedValue != null);
button.Visible = (cmbx.SelectedValue != null);//(!_FolderConfig.Name.Equals("VEPROMS")) && (cmbx.SelectedValue != null);
deflabel.Visible = ppCbShwDefSettings.Checked && button.Visible;
}
@@ -1036,7 +972,9 @@ namespace VEPROMS
private void ProcessButtonClick(TabItem tab, ButtonX button)
{
ClearAllCheckedButtons();
_Initializing = true;
tcFolder.SelectedTab = tab;
_Initializing = false;
button.Checked = true;
}