B2026-078 Hide Delete and Open Button for Library Documents with any occurrences.
This commit is contained in:
1 parent
93f82b2745
commit
95115f445d
1 file changed
+10
-10
@@ -29,9 +29,9 @@ namespace Volian.Controls.Library
|
||||
public DisplayLibDocs()
|
||||
{
|
||||
InitializeComponent();
|
||||
btnOpenLibDoc.Enabled = false;
|
||||
btnDelLibDoc.Enabled = false;
|
||||
btnPrint.Enabled = listBoxLibDocs.Items.Count > 0;
|
||||
btnOpenLibDoc.Visible = btnOpenLibDoc.Enabled = false;
|
||||
btnDelLibDoc.Visible = btnDelLibDoc.Enabled = false;
|
||||
btnPrint.Enabled = listBoxLibDocs.Items.Count > 0;
|
||||
saveGroupPanelUsages = groupPanelUsages.Style.BackColor;
|
||||
}
|
||||
DisplayTabControl _DisplayTabControl;
|
||||
@@ -107,14 +107,14 @@ namespace Volian.Controls.Library
|
||||
groupPanelUsages.Style.BackColor = dicnt.LibraryDocumentUsageList == null || dicnt.LibraryDocumentUsageList.Count == 0 ? this.saveGroupPanelUsages : Color.LightGreen;
|
||||
if (iil == null)
|
||||
{
|
||||
btnDelLibDoc.Enabled = true;
|
||||
btnOpenLibDoc.Enabled = true;
|
||||
return;
|
||||
btnOpenLibDoc.Visible = btnOpenLibDoc.Enabled = true;
|
||||
btnDelLibDoc.Visible = btnDelLibDoc.Enabled = true;
|
||||
return;
|
||||
}
|
||||
// Put the usages in the usage list for the selected library document.
|
||||
btnDelLibDoc.Enabled = false;
|
||||
btnOpenLibDoc.Enabled = false;
|
||||
foreach (ItemInfo ii in dicnt.LibraryDocumentUsageList)
|
||||
// Put the usages in the usage list for the selected library document.
|
||||
btnOpenLibDoc.Visible = btnOpenLibDoc.Enabled = false;
|
||||
btnDelLibDoc.Visible = btnDelLibDoc.Enabled = false;
|
||||
foreach (ItemInfo ii in dicnt.LibraryDocumentUsageList)
|
||||
{
|
||||
if (ii.MyDocVersion != null)
|
||||
listBoxUsages.Items.Add($"{ii.MyProcedure} - {ii.DisplayNumber} {ii.DisplayText}");
|
||||
|
||||
Reference in new issue
Block a user