B2016-019: Don’t display enhanced tab if not enhanced document. Also enlarge form a bit so that folder button on Output settings tab isn’t cut off
B2016-015: refresh tabs for enhanced inserted steps. B2016-017: fix crashes on replace B2016-024: do not allow insert new HLS in enhanced if positioned on substep (from ribbon) - B2016-022: insert procedure in a ‘source’ set before/after did not have Create Enhanced checkbox and B2016-017: fix crashes on replace
This commit is contained in:
@@ -398,9 +398,8 @@ namespace VEPROMS
|
||||
}
|
||||
private void InitEnhanced()
|
||||
{
|
||||
// first determine if enhanced tab should be turned off: KBR HOW?
|
||||
|
||||
|
||||
btnEnhanced.Visible = true;
|
||||
tiEnhanced.Visible = true;
|
||||
// get enhanced tab's data if:
|
||||
// 1) hasEnhancedPO: this is source and format file has the purchase options for enhanced deviation or enhanced background
|
||||
// 2) isEnhanced: this docversion has a config/enhanced node that defines it as an enhanced document.
|
||||
@@ -425,9 +424,15 @@ namespace VEPROMS
|
||||
cbxEnhVersions.SelectedIndex = 0;
|
||||
cbxEnhVersions.Enabled = false;
|
||||
}
|
||||
// This is a source document that already has settings KBR ? - Can additions can be made
|
||||
else if (hasEnhancedPO)
|
||||
{
|
||||
// if this is not a source, i.e. does not have myenhanceddocuments, then FOR NOW - UNTIL 'NEW' is done, turn off enhanced tab:
|
||||
if (_DocVersionConfig.MyEnhancedDocuments == null || _DocVersionConfig.MyEnhancedDocuments.Count == 0)
|
||||
{
|
||||
btnEnhanced.Visible = false;
|
||||
tiEnhanced.Visible = false;
|
||||
return;
|
||||
}
|
||||
// first set up existing enhanced linked documents (this is a listbox on left of form)
|
||||
_Enhanced = new List<EnhancedMiniConfig>();
|
||||
lbEnhanced.Visible = true;
|
||||
@@ -449,91 +454,7 @@ namespace VEPROMS
|
||||
bsMiniEnhanced.DataSource = bsEnhanced.Current as EnhancedMiniConfig;
|
||||
}
|
||||
}
|
||||
//private void InitEnhancedOld()
|
||||
//{
|
||||
// // get enhanced tab's data if:
|
||||
// // 1) hasEnhancedPO: this is source and format file has the purchase options for enhanced deviation or enhanced background
|
||||
// // 2) isEnhanced: this docversion has a config/enhanced node that defines it as an enhanced document.
|
||||
// bool hasEnhancedPO = true;
|
||||
// //if (((_DocVersionConfig.MyDocVersion.MyDocVersionInfo.ActiveFormat.PlantFormat.FormatData.PurchaseOptions.Value & E_PurchaseOptions.EnhancedDeviations) == E_PurchaseOptions.EnhancedDeviations)
|
||||
// // || ((_DocVersionConfig.MyDocVersion.MyDocVersionInfo.ActiveFormat.PlantFormat.FormatData.PurchaseOptions.Value & E_PurchaseOptions.EnhancedBackgrounds) == E_PurchaseOptions.EnhancedBackgrounds)) hasEnhancedPO = true;
|
||||
// bool isEnhanced = (_DocVersionConfig.MyEnhancedDocuments != null && _DocVersionConfig.MyEnhancedDocuments.Count == 1 && _DocVersionConfig.MyEnhancedDocuments[0].Type == 0);
|
||||
|
||||
// if (hasEnhancedPO || isEnhanced)
|
||||
// {
|
||||
// // need to filter the list and add only those that are set for the current doc version whose properties
|
||||
// // we are working with, or that have no setting. (If the docversion has a source that is not this one, don't list)
|
||||
// DocVersionInfoList dvil = DocVersionInfoList.Get();
|
||||
// _Enhanced = new List<EnhancedMiniConfig>();
|
||||
// DVEnhancedDocument dvedUseData = null;
|
||||
// int indxDataSource = 0;
|
||||
// for (int ie = 0; ie < dvil.Count; ie++)
|
||||
// {
|
||||
// DocVersionInfo dvi = dvil[ie];
|
||||
// // get config items for filling in the data:
|
||||
// DocVersionConfig dvc = dvi.MyConfig as DocVersionConfig;
|
||||
// // need to see if it should be include
|
||||
// bool includeit = false;
|
||||
// if (isEnhanced && dvi.VersionID == _DocVersionConfig.MyDocVersion.VersionID)
|
||||
// {
|
||||
// dvedUseData = dvc.MyEnhancedDocuments[0];
|
||||
// includeit = true;
|
||||
// }
|
||||
// if (hasEnhancedPO && !isEnhanced)
|
||||
// {
|
||||
|
||||
// // if this docversion has no relationships, include it:
|
||||
// if (dvc.MyEnhancedDocuments == null || dvc.MyEnhancedDocuments.Count == 0)
|
||||
// includeit = true;
|
||||
// else
|
||||
// {
|
||||
// //DVEnhancedDocuments dveds = _DocVersionConfig.MyEnhancedDocuments;
|
||||
// //foreach (EnhancedDocument ed in sc.MyEnhancedDocuments)
|
||||
// //{
|
||||
// // DVEnhancedDocument dved = dveds[ed.Type];
|
||||
// // AddLinkToEnhancedDocument(cb, yLocation, ed.ItemID, dved.PdfToken, dved.PdfX);
|
||||
// //}
|
||||
// foreach (DVEnhancedDocument ed in dvc.MyEnhancedDocuments) // config for enhanced
|
||||
// {
|
||||
// if (ed.VersionID == _DocVersionConfig.MyDocVersion.VersionID)
|
||||
// {
|
||||
// // the displayed data is the enhanced config item pointing to this one:
|
||||
// foreach (DVEnhancedDocument sed in _DocVersionConfig.MyEnhancedDocuments)
|
||||
// {
|
||||
// if (sed.VersionID == dvi.VersionID)
|
||||
// {
|
||||
// dvedUseData = sed;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// if (dvedUseData != null)
|
||||
// {
|
||||
// includeit = true;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// if (includeit)
|
||||
// {
|
||||
// // get config items for filling in the data:
|
||||
// EnhancedMiniConfig ecfg = null;
|
||||
// if (dvedUseData != null)
|
||||
// ecfg = new EnhancedMiniConfig(indxDataSource, dvi.VersionID, "?", dvi.SearchDVPath, dvedUseData.Name, dvedUseData.Type.ToString(), dvedUseData.PdfToken, dvedUseData.PdfX.ToString());
|
||||
// else
|
||||
// ecfg = new EnhancedMiniConfig(indxDataSource, dvi.VersionID, "?", dvi.SearchDVPath, "", "", "", "");
|
||||
// indxDataSource++;
|
||||
// _Enhanced.Add(ecfg);
|
||||
// dvedUseData = null;
|
||||
// includeit = false;
|
||||
// if (isEnhanced) break;
|
||||
// }
|
||||
// }
|
||||
// bsEnhanced.DataSource = _Enhanced;
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
void btnPC_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (MessageBox.Show(this, "Are you sure you want to add Applicability to this Working Draft?", "Add Applicability", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Stop) == DialogResult.Yes)
|
||||
|
Reference in New Issue
Block a user