Use ToString for ListBox to allow select to find ContentAuditInfo
Use ListString Select correct item in the Edit Window Only select tab if it is not selected
This commit is contained in:
parent
c21f8adf32
commit
ff71b351e1
@ -115,14 +115,12 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
if (lbChanges.SelectedIndex > -1)
|
if (lbChanges.SelectedIndex > -1)
|
||||||
{
|
{
|
||||||
if (lbChanges.SelectedIndex < _ChronologyAuditList.Count)
|
ContentAuditInfo cai = lbChanges.SelectedItem as ContentAuditInfo;
|
||||||
{
|
if (cai != null)
|
||||||
ContentAuditInfo cai = _ChronologyAuditList[lbChanges.SelectedIndex];
|
|
||||||
OnHistorySelectionChanged(new DisplayHistoryEventArgs(cai.ItemID));
|
OnHistorySelectionChanged(new DisplayHistoryEventArgs(cai.ItemID));
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
AnnotationAuditInfo aai = _AnnotationList[lbChanges.SelectedIndex - _ChronologyAuditList.Count];
|
AnnotationAuditInfo aai = lbChanges.SelectedItem as AnnotationAuditInfo;
|
||||||
OnHistorySelectionChanged(new DisplayHistoryEventArgs(aai.ItemID));
|
OnHistorySelectionChanged(new DisplayHistoryEventArgs(aai.ItemID));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -163,7 +161,7 @@ namespace Volian.Controls.Library
|
|||||||
AnnotationTypeInfo ati = AnnotationTypeInfo.Get(aai.TypeID);
|
AnnotationTypeInfo ati = AnnotationTypeInfo.Get(aai.TypeID);
|
||||||
tn = annotationDeleted.Nodes.Add(ati.Name);
|
tn = annotationDeleted.Nodes.Add(ati.Name);
|
||||||
}
|
}
|
||||||
TreeNode cn = tn.Nodes.Add(aai.ToString());
|
TreeNode cn = tn.Nodes.Add(aai.ListString());
|
||||||
cn.Tag = aai;
|
cn.Tag = aai;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -226,7 +224,7 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
if (contentHistory == null)
|
if (contentHistory == null)
|
||||||
contentHistory = tvAudits.Nodes.Add("Content Changes"); //contentHistory = tvAudits.Nodes.Add("Content History");
|
contentHistory = tvAudits.Nodes.Add("Content Changes"); //contentHistory = tvAudits.Nodes.Add("Content History");
|
||||||
TreeNode tn = contentHistory.Nodes.Add(cai.ToString());
|
TreeNode tn = contentHistory.Nodes.Add(cai.ListString());
|
||||||
tn.Tag = cai;
|
tn.Tag = cai;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -420,7 +418,7 @@ namespace Volian.Controls.Library
|
|||||||
if (cai.DTS > MyProcedureInfo.DTS)
|
if (cai.DTS > MyProcedureInfo.DTS)
|
||||||
{
|
{
|
||||||
string itemTitle = FixPath(cai.Path);
|
string itemTitle = FixPath(cai.Path);
|
||||||
lbChanges.Items.Add(string.Format("{4} item {0} by {1} on {2} @ {3}", cai.ActionWhat, cai.UserID, cai.ActionWhen == DateTime.MinValue ? cai.DTS.ToShortDateString() : cai.ActionWhen.ToShortDateString(), cai.ActionWhen == DateTime.MinValue ? cai.DTS.ToShortTimeString() : cai.ActionWhen.ToShortTimeString(), itemTitle));
|
lbChanges.Items.Add(cai);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
foreach (AnnotationAuditInfo aai in aail2)
|
foreach (AnnotationAuditInfo aai in aail2)
|
||||||
@ -441,7 +439,7 @@ namespace Volian.Controls.Library
|
|||||||
stepnum = FixPath(iii.SearchPath);
|
stepnum = FixPath(iii.SearchPath);
|
||||||
}
|
}
|
||||||
if(aai.DTS > MyProcedureInfo.DTS)
|
if(aai.DTS > MyProcedureInfo.DTS)
|
||||||
lbChanges.Items.Add(string.Format("{0} Annotation {1}", stepnum, aai.ToString()));
|
lbChanges.Items.Add(aai);
|
||||||
}
|
}
|
||||||
//Console.WriteLine("WalkProcedure fini: {0} seconds", TimeSpan.FromTicks(DateTime.Now.Ticks - start.Ticks).TotalSeconds);
|
//Console.WriteLine("WalkProcedure fini: {0} seconds", TimeSpan.FromTicks(DateTime.Now.Ticks - start.Ticks).TotalSeconds);
|
||||||
this.Cursor = Cursors.Default;
|
this.Cursor = Cursors.Default;
|
||||||
|
@ -604,8 +604,11 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
if (myDisplayTabItem != null)
|
if (myDisplayTabItem != null)
|
||||||
{
|
{
|
||||||
myDisplayTabItem.Focus();
|
if (!myDisplayTabItem.Selected)
|
||||||
myDisplayTabItem.Selected = true;
|
{
|
||||||
|
myDisplayTabItem.Focus();
|
||||||
|
myDisplayTabItem.Selected = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private DisplayTabItem _SelectedDisplayTabItem=null;
|
private DisplayTabItem _SelectedDisplayTabItem=null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user