Added a Library Document Usage report
added methods to create a library document usage report
This commit is contained in:
@@ -34,6 +34,7 @@ namespace Volian.Controls.Library
|
||||
this.groupPanelLibDocs = new DevComponents.DotNetBar.Controls.GroupPanel();
|
||||
this.listBoxLibDocs = new System.Windows.Forms.ListBox();
|
||||
this.pnlProp = new System.Windows.Forms.Panel();
|
||||
this.btnPrint = new System.Windows.Forms.Button();
|
||||
this.btnOpenLibDoc = new System.Windows.Forms.Button();
|
||||
this.btnDelLibDoc = new System.Windows.Forms.Button();
|
||||
this.btnCancel = new System.Windows.Forms.Button();
|
||||
@@ -169,6 +170,7 @@ namespace Volian.Controls.Library
|
||||
// pnlProp
|
||||
//
|
||||
this.pnlProp.BackColor = System.Drawing.Color.Beige;
|
||||
this.pnlProp.Controls.Add(this.btnPrint);
|
||||
this.pnlProp.Controls.Add(this.btnOpenLibDoc);
|
||||
this.pnlProp.Controls.Add(this.btnDelLibDoc);
|
||||
this.pnlProp.Controls.Add(this.btnCancel);
|
||||
@@ -183,12 +185,23 @@ namespace Volian.Controls.Library
|
||||
this.pnlProp.Size = new System.Drawing.Size(501, 150);
|
||||
this.pnlProp.TabIndex = 32;
|
||||
//
|
||||
// btnPrint
|
||||
//
|
||||
this.btnPrint.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnPrint.Location = new System.Drawing.Point(401, 113);
|
||||
this.btnPrint.Name = "btnPrint";
|
||||
this.btnPrint.Size = new System.Drawing.Size(75, 30);
|
||||
this.btnPrint.TabIndex = 15;
|
||||
this.btnPrint.Text = "Print";
|
||||
this.btnPrint.UseVisualStyleBackColor = true;
|
||||
this.btnPrint.Click += new System.EventHandler(this.btnPrint_Click);
|
||||
//
|
||||
// btnOpenLibDoc
|
||||
//
|
||||
this.btnOpenLibDoc.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnOpenLibDoc.Location = new System.Drawing.Point(360, 113);
|
||||
this.btnOpenLibDoc.Location = new System.Drawing.Point(325, 113);
|
||||
this.btnOpenLibDoc.Name = "btnOpenLibDoc";
|
||||
this.btnOpenLibDoc.Size = new System.Drawing.Size(108, 30);
|
||||
this.btnOpenLibDoc.Size = new System.Drawing.Size(70, 30);
|
||||
this.superTooltipLibDocs.SetSuperTooltip(this.btnOpenLibDoc, new DevComponents.DotNetBar.SuperTooltipInfo("Open", "", "Opens, for edit, an unused library document.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
|
||||
this.btnOpenLibDoc.TabIndex = 14;
|
||||
this.btnOpenLibDoc.Text = "Open";
|
||||
@@ -198,9 +211,9 @@ namespace Volian.Controls.Library
|
||||
// btnDelLibDoc
|
||||
//
|
||||
this.btnDelLibDoc.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnDelLibDoc.Location = new System.Drawing.Point(247, 113);
|
||||
this.btnDelLibDoc.Location = new System.Drawing.Point(246, 113);
|
||||
this.btnDelLibDoc.Name = "btnDelLibDoc";
|
||||
this.btnDelLibDoc.Size = new System.Drawing.Size(108, 30);
|
||||
this.btnDelLibDoc.Size = new System.Drawing.Size(73, 30);
|
||||
this.superTooltipLibDocs.SetSuperTooltip(this.btnDelLibDoc, new DevComponents.DotNetBar.SuperTooltipInfo("Delete", "", "Deletes an unused library document.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
|
||||
this.btnDelLibDoc.TabIndex = 13;
|
||||
this.btnDelLibDoc.Text = "Delete";
|
||||
@@ -375,5 +388,6 @@ namespace Volian.Controls.Library
|
||||
private System.Windows.Forms.ListBox listBoxUsages;
|
||||
private DevComponents.DotNetBar.Controls.GroupPanel groupPanelUsages;
|
||||
private DevComponents.DotNetBar.SuperTooltip superTooltipLibDocs;
|
||||
private System.Windows.Forms.Button btnPrint;
|
||||
}
|
||||
}
|
||||
|
@@ -62,6 +62,13 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
#endregion
|
||||
#region Events
|
||||
public event DisplayLibDocEvent PrintRequest;
|
||||
private void OnPrintRequest(DisplayLibDocEventArgs args)
|
||||
{
|
||||
if (PrintRequest != null)
|
||||
PrintRequest(this, args);
|
||||
}
|
||||
|
||||
private void listBoxLibDocs_Click(object sender, EventArgs e)
|
||||
{
|
||||
UpdateUsageList();
|
||||
@@ -268,5 +275,50 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
private void btnPrint_Click(object sender, EventArgs e)
|
||||
{
|
||||
OnPrintRequest(new DisplayLibDocEventArgs("Library Document Usage",LibDocList));
|
||||
}
|
||||
}
|
||||
public class DisplayLibDocEventArgs
|
||||
{
|
||||
private string _ReportTitle;
|
||||
public string ReportTitle
|
||||
{
|
||||
get { return _ReportTitle; }
|
||||
set { _ReportTitle = value; }
|
||||
}
|
||||
private DocumentInfoList _libDocList;
|
||||
|
||||
public DocumentInfoList LibDocList
|
||||
{
|
||||
get { return _libDocList; }
|
||||
set { _libDocList = value; }
|
||||
}
|
||||
//private string _SearchString = null;
|
||||
//public string SearchString
|
||||
//{
|
||||
// get { return _SearchString; }
|
||||
// set { _SearchString = value; }
|
||||
//}
|
||||
//private string _TypesSelected;
|
||||
//public string TypesSelected
|
||||
//{
|
||||
// get { return _TypesSelected; }
|
||||
// set { _TypesSelected = value; }
|
||||
//}
|
||||
//private ICollection<ItemInfo> _MyItemInfoList;
|
||||
//public ICollection<ItemInfo> MyItemInfoList
|
||||
//{
|
||||
// get { return _MyItemInfoList; }
|
||||
// set { _MyItemInfoList = value; }
|
||||
//}
|
||||
public DisplayLibDocEventArgs(string reportTitle, DocumentInfoList libDocList)
|
||||
{
|
||||
_ReportTitle = reportTitle;
|
||||
_libDocList = libDocList;
|
||||
}
|
||||
}
|
||||
public delegate void DisplayLibDocEvent(object sender, DisplayLibDocEventArgs args);
|
||||
}
|
||||
|
@@ -120,9 +120,6 @@
|
||||
<metadata name="superTooltipLibDocs.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="superTooltipLibDocs.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<data name="listBoxLibDocs.SuperTooltip" xml:space="preserve">
|
||||
<value>Shows list of current library documents. The number preceding each document shows how many times it is used. By selecting one that has usages, ths list of usages will be shown below. By selecting one that has NO usages, it can be deleted or opened.</value>
|
||||
</data>
|
||||
|
Reference in New Issue
Block a user