Added LibraryDocumentUsage Property
Add Tab and ToolTip Properties
This commit is contained in:
parent
9a1eecbe3a
commit
2e773acb06
@ -5,6 +5,17 @@ using System.IO;
|
||||
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
public partial class Document
|
||||
{
|
||||
public string DocumentTitle
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_LibTitle == "") return string.Format("Document {0}", _DocID);
|
||||
return _LibTitle;
|
||||
}
|
||||
}
|
||||
}
|
||||
public partial class DocumentInfo
|
||||
{
|
||||
public string DocumentTitle
|
||||
@ -15,6 +26,24 @@ namespace VEPROMS.CSLA.Library
|
||||
return _LibTitle;
|
||||
}
|
||||
}
|
||||
public string LibraryDocumentUsage
|
||||
{
|
||||
get
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
string sep = "\r\nUsed In:\r\n ";
|
||||
foreach (EntryInfo myEntry in DocumentEntries)
|
||||
{
|
||||
foreach (ItemInfo myItem in myEntry.MyContent.ContentItems)
|
||||
{
|
||||
ItemInfo proc = myItem.MyProcedure;
|
||||
sb.Append(sep + proc.MyContent.Number + " - " + proc.MyContent.Text);
|
||||
sep = "\r\n ";
|
||||
}
|
||||
}
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
public class DSOFile : IDisposable
|
||||
{
|
||||
|
@ -17,6 +17,8 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
return string.Format("{0} {1}", MyContent.Number, MyContent.Text);
|
||||
}
|
||||
// TODO: Move to ItemInfo Extension
|
||||
|
||||
#region IVEDrillDown
|
||||
public System.Collections.IList GetChildren()
|
||||
{
|
||||
@ -414,6 +416,39 @@ namespace VEPROMS.CSLA.Library
|
||||
// AddList(nd, "Tables", Tables);
|
||||
// return xn.OwnerDocument;
|
||||
//}
|
||||
public string TabToolTip
|
||||
{
|
||||
get
|
||||
{
|
||||
if (MyContent.MyEntry == null)
|
||||
return MyContent.Number + " - " + MyContent.Text;
|
||||
string toolTip = MyProcedure.TabToolTip + "\r\n";
|
||||
if (MyContent.Number != "")
|
||||
toolTip += MyContent.Number + " - " + MyContent.Text;
|
||||
else
|
||||
toolTip += MyContent.Text;
|
||||
DocumentInfo myDocument = MyContent.MyEntry.MyDocument;
|
||||
if (myDocument.LibTitle != "")
|
||||
{
|
||||
toolTip += string.Format("\r\n(Library Document - {0})", myDocument.LibTitle);
|
||||
toolTip += myDocument.LibraryDocumentUsage;
|
||||
}
|
||||
return toolTip;
|
||||
}
|
||||
}
|
||||
public string TabTitle
|
||||
{
|
||||
get
|
||||
{
|
||||
if (MyContent.MyEntry == null)
|
||||
return MyContent.Number;
|
||||
if (MyContent.Number != "")
|
||||
return MyContent.Number;
|
||||
if (MyContent.Text.Length <= 10)
|
||||
return MyContent.Text;
|
||||
return MyContent.Text.Split(" ,.;:-_".ToCharArray())[0] + "...";
|
||||
}
|
||||
}
|
||||
#region IVEReadOnlyItem
|
||||
PartInfoList _PartInfoList;
|
||||
public System.Collections.IList GetChildren()
|
||||
|
Loading…
x
Reference in New Issue
Block a user