F2023-143_Vogtle3&4_Alrm_Footer #159

Merged
jjenko merged 5 commits from F2023-143_Vogtle3&4_Alrm_Footer into master 2023-11-27 16:23:44 -05:00
4 changed files with 39 additions and 8 deletions

Binary file not shown.

Binary file not shown.

View File

@ -2001,19 +2001,34 @@ namespace VEPROMS
Application.DoEvents();
string formatFileName = (dvi.MyFormat != null) ? dvi.MyFormat.Name : "";
XmlElement xe = xn.OwnerDocument.CreateElement(nodename);
// B2022-072: if the exported docversion doesn't have the format set, look up folder tree to find the format used
int tmpFormatID = (dvi.FormatID != null) ? (int)dvi.FormatID : 0;
FolderInfo fi = dvi.MyFolder;
while (formatFileName == "" && fi != null)
{
if (fi.FormatID != null && fi.FormatID != 0)
{
formatFileName = (fi.MyFormat != null) ? fi.MyFormat.Name : "";
tmpFormatID = (fi.FormatID != null) ? (int)fi.FormatID : 0;
break;
}
fi = fi.MyParent;
}
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "versionid", dvi.VersionID.ToString()));
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "folderid", dvi.FolderID.ToString()));
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "versiontype", dvi.VersionType.ToString()));
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "name", dvi.Name));
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "title", dvi.Title));
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "itemid", dvi.ItemID.ToString()));
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "formatid", dvi.FormatID.ToString()));
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "formatid", tmpFormatID.ToString()));//dvi.FormatID.ToString()));
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "config", dvi.Config));
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "dts", dvi.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")));
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "userid", dvi.UserID.ToString()));
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "formatfilename", formatFileName));
xn.AppendChild(xe);
if (!ValidDocVersionAssociation(dvi)) return; // bug fix: B2017-082 don't export if no RO Path
if (dvi.DocVersionAssociationCount > 0)
foreach (AssociationInfo ai in dvi.DocVersionAssociations)
ExportAssociation(xe, ai, "association");

View File

@ -796,6 +796,10 @@ namespace Volian.Controls.Library
node.Checked = pNode.Checked;
CheckTreeNodeChildren(node.Nodes);
}
// B2023-112: Clear the docversion list - this flags 'All' when the 'All Proc Sets' tree node is checked and 'None' when it isn't. Then
// Use buildSetToSearchPanelTitle to set the text for how many sets are in search.
lstCheckedDocVersions.Clear();
buildSetToSearchPanelTitle();
}
private void AllSectionTypes_clicked(object sender, EventArgs e)
@ -2392,18 +2396,18 @@ namespace Volian.Controls.Library
{
if (tn.Checked)
{
tn.Style = DevComponents.AdvTree.NodeStyles.Apple; // sets green background on selected folder(s)
FolderInfo fi = (FolderInfo)tn.Tag;
//tn.Style = DevComponents.AdvTree.NodeStyles.Apple; // sets green background on selected folder(s)
//B2023-112: Don't crash if on top 'All' node (did not have associated folder)
FolderInfo fi = tn.Tag as FolderInfo;
// if this folder has a docversion, use its id:
if (tn.Nodes != null && tn.Nodes.Count > 0 && tn.Nodes[0].Text != DummyNodeText) // Folder has been expanded, so add its docversion list
{
if (fi.FolderDocVersionCount > 0) lstCheckedDocVersions.Add(fi.FolderDocVersions[0]);
if (fi != null && fi.FolderDocVersionCount > 0) lstCheckedDocVersions.Add(fi.FolderDocVersions[0]);
}
else // it has not been expanded process all below.
{
//B2023-076: Do not process the "Select All" node
if (tn.Text != SelectAllProcedureSetsText)
if (tn.Text != SelectAllProcedureSetsText && fi != null)
AddAllChildVersions(fi);
}
}
@ -2548,7 +2552,16 @@ namespace Volian.Controls.Library
private void buildSetToSearchPanelTitle()
{
if (lstCheckedDocVersions.Count == 0)
// B2023-112: lstCheckedDocVersions has list of sets, if 'all' it is empty. However, in order to get proc set tree to handle appropriate selections
// and work with this list, check both the list count and the whether the 'all' is checked.
if (lstCheckedDocVersions.Count == 0 && advTreeProcSets.Nodes != null && (advTreeProcSets.Nodes.Count <=1 || (advTreeProcSets.Nodes.Count > 1 && advTreeProcSets.Nodes[0].Nodes != null)) && (advTreeProcSets.Nodes[0].Nodes.Count == 0 || (advTreeProcSets.Nodes[0].Nodes.Count > 0 && !advTreeProcSets.Nodes[0].Nodes[0].Checked)))
{
xpSetToSearch.TitleText = string.Format("No Procedure Sets Selected");
xpSetToSearch.TitleStyle.BackColor1.Color = Color.PapayaWhip;
btnSearch.Enabled = false;
tabSearchTypes.Enabled = false; // disable all the search tabs
}
else if (lstCheckedDocVersions.Count == 0)
{
xpSetToSearch.TitleText = string.Format("All Procedure Sets Selected");
xpSetToSearch.TitleStyle.BackColor1.Color = Color.PapayaWhip;
@ -2577,6 +2590,9 @@ namespace Volian.Controls.Library
StartAdvTreeStepTypesFillIn();// B2016-258 Hang after selecting a procedure if the Step Type panel is open on the search panel
}
}
// B2023-112: If unchecking a procedure set, uncheck the 'All' node also
if (n.Checked)
advTreeProcSets.Nodes[0].Nodes[0].Checked = false;
}
#endregion
@ -2595,7 +2611,7 @@ namespace Volian.Controls.Library
if (n.Checked)
{
n.Style = DevComponents.AdvTree.NodeStyles.Apple;
//n.Style = DevComponents.AdvTree.NodeStyles.Apple; // B2023-112: coloring of proc set tree nodes was not working correctly
if (sd == null)
{