This commit is contained in:
parent
391cbaea39
commit
b84bf35339
@ -63,6 +63,11 @@ namespace Volian.Controls.Library
|
|||||||
private void listBoxLibDocs_Click(object sender, EventArgs e)
|
private void listBoxLibDocs_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (listBoxLibDocs.SelectedIndex == _SelectedLibDoc) return;
|
if (listBoxLibDocs.SelectedIndex == _SelectedLibDoc) return;
|
||||||
|
UpdateUsageList();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UpdateUsageList()
|
||||||
|
{
|
||||||
groupPanelLibDocs.Style.BackColor = Color.Orange;
|
groupPanelLibDocs.Style.BackColor = Color.Orange;
|
||||||
_SelectedLibDoc = listBoxLibDocs.SelectedIndex;
|
_SelectedLibDoc = listBoxLibDocs.SelectedIndex;
|
||||||
listBoxUsages.Items.Clear();
|
listBoxUsages.Items.Clear();
|
||||||
@ -81,7 +86,7 @@ namespace Volian.Controls.Library
|
|||||||
// from usage list), otherwise disable buttons & list usages
|
// from usage list), otherwise disable buttons & list usages
|
||||||
DocumentInfo dicnt = LibDocList[_SelectedLibDoc];
|
DocumentInfo dicnt = LibDocList[_SelectedLibDoc];
|
||||||
ItemInfoList iil = dicnt.LibraryDocumentUsageList;
|
ItemInfoList iil = dicnt.LibraryDocumentUsageList;
|
||||||
groupPanelUsages.Style.BackColor = dicnt.LibraryDocumentUsageList==null||dicnt.LibraryDocumentUsageList.Count==0 ? this.saveGroupPanelUsages : Color.LightGreen;
|
groupPanelUsages.Style.BackColor = dicnt.LibraryDocumentUsageList == null || dicnt.LibraryDocumentUsageList.Count == 0 ? this.saveGroupPanelUsages : Color.LightGreen;
|
||||||
if (iil == null)
|
if (iil == null)
|
||||||
{
|
{
|
||||||
btnDelLibDoc.Enabled = true;
|
btnDelLibDoc.Enabled = true;
|
||||||
@ -130,7 +135,10 @@ namespace Volian.Controls.Library
|
|||||||
if (chg == true)
|
if (chg == true)
|
||||||
{
|
{
|
||||||
doc.Save();
|
doc.Save();
|
||||||
|
int cursel = _SelectedLibDoc;
|
||||||
LibDocListFillIn(_DisplayTabControl);
|
LibDocListFillIn(_DisplayTabControl);
|
||||||
|
listBoxLibDocs.SelectedIndex = cursel;
|
||||||
|
UpdateUsageList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void btnCancel_Click(object sender, EventArgs e)
|
private void btnCancel_Click(object sender, EventArgs e)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user