143 lines
5.0 KiB
C#
143 lines
5.0 KiB
C#
|
using System.Windows.Forms;
|
||
|
using System.Collections.Generic;
|
||
|
using nsoftware.SecureBlackbox;
|
||
|
|
||
|
/// <summary>
|
||
|
/// Summary description for ReferencesForm.
|
||
|
/// </summary>
|
||
|
public class ReferencesForm : System.Windows.Forms.Form
|
||
|
{
|
||
|
private System.Windows.Forms.Button btnClose;
|
||
|
public ListView lvReferencesResult;
|
||
|
private ColumnHeader chId;
|
||
|
private ColumnHeader chUri;
|
||
|
private ColumnHeader chRefType;
|
||
|
private ColumnHeader chDigestValid;
|
||
|
|
||
|
/// <summary>
|
||
|
/// Required designer variable.
|
||
|
/// </summary>
|
||
|
private System.ComponentModel.Container components = null;
|
||
|
|
||
|
public ReferencesForm()
|
||
|
{
|
||
|
//
|
||
|
// Required for Windows Form Designer support
|
||
|
//
|
||
|
InitializeComponent();
|
||
|
|
||
|
//
|
||
|
// TODO: Add any constructor code after InitializeComponent call
|
||
|
//
|
||
|
}
|
||
|
|
||
|
public void Update(List<ReferenceRes> referenceResult)
|
||
|
{
|
||
|
lvReferencesResult.BeginUpdate();
|
||
|
lvReferencesResult.Items.Clear();
|
||
|
|
||
|
foreach (ReferenceRes res in referenceResult)
|
||
|
{
|
||
|
ListViewItem Item = lvReferencesResult.Items.Add(res.Id);
|
||
|
Item.SubItems.Add(res.Uri);
|
||
|
Item.SubItems.Add(res.RefType);
|
||
|
Item.SubItems.Add(res.DigestValid.ToString());
|
||
|
}
|
||
|
|
||
|
lvReferencesResult.EndUpdate();
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// Clean up any resources being used.
|
||
|
/// </summary>
|
||
|
protected override void Dispose(bool disposing)
|
||
|
{
|
||
|
if (disposing)
|
||
|
{
|
||
|
if (components != null)
|
||
|
{
|
||
|
components.Dispose();
|
||
|
}
|
||
|
}
|
||
|
base.Dispose(disposing);
|
||
|
}
|
||
|
|
||
|
#region Windows Form Designer generated code
|
||
|
/// <summary>
|
||
|
/// Required method for Designer support - do not modify
|
||
|
/// the contents of this method with the code editor.
|
||
|
/// </summary>
|
||
|
private void InitializeComponent()
|
||
|
{
|
||
|
this.btnClose = new System.Windows.Forms.Button();
|
||
|
this.lvReferencesResult = new System.Windows.Forms.ListView();
|
||
|
this.chId = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||
|
this.chUri = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||
|
this.chRefType = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||
|
this.chDigestValid = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||
|
this.SuspendLayout();
|
||
|
//
|
||
|
// btnClose
|
||
|
//
|
||
|
this.btnClose.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||
|
this.btnClose.Location = new System.Drawing.Point(289, 195);
|
||
|
this.btnClose.Name = "btnClose";
|
||
|
this.btnClose.Size = new System.Drawing.Size(75, 25);
|
||
|
this.btnClose.TabIndex = 4;
|
||
|
this.btnClose.Text = "Close";
|
||
|
//
|
||
|
// lvReferencesResult
|
||
|
//
|
||
|
this.lvReferencesResult.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||
|
| System.Windows.Forms.AnchorStyles.Left)
|
||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||
|
this.lvReferencesResult.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||
|
this.chId,
|
||
|
this.chUri,
|
||
|
this.chRefType,
|
||
|
this.chDigestValid});
|
||
|
this.lvReferencesResult.HideSelection = false;
|
||
|
this.lvReferencesResult.Location = new System.Drawing.Point(5, 5);
|
||
|
this.lvReferencesResult.Name = "lvReferencesResult";
|
||
|
this.lvReferencesResult.Size = new System.Drawing.Size(359, 177);
|
||
|
this.lvReferencesResult.TabIndex = 5;
|
||
|
this.lvReferencesResult.UseCompatibleStateImageBehavior = false;
|
||
|
this.lvReferencesResult.View = System.Windows.Forms.View.Details;
|
||
|
//
|
||
|
// chId
|
||
|
//
|
||
|
this.chId.Text = "Id";
|
||
|
this.chId.Width = 70;
|
||
|
//
|
||
|
// chUri
|
||
|
//
|
||
|
this.chUri.Text = "Uri";
|
||
|
this.chUri.Width = 130;
|
||
|
//
|
||
|
// chRefType
|
||
|
//
|
||
|
this.chRefType.Text = "RefType";
|
||
|
this.chRefType.Width = 70;
|
||
|
//
|
||
|
// chDigestValid
|
||
|
//
|
||
|
this.chDigestValid.Text = "DigestValid";
|
||
|
this.chDigestValid.Width = 70;
|
||
|
//
|
||
|
// ReferencesForm
|
||
|
//
|
||
|
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
|
||
|
this.ClientSize = new System.Drawing.Size(370, 230);
|
||
|
this.Controls.Add(this.lvReferencesResult);
|
||
|
this.Controls.Add(this.btnClose);
|
||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||
|
this.MaximizeBox = false;
|
||
|
this.Name = "ReferencesForm";
|
||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||
|
this.Text = "References";
|
||
|
this.ResumeLayout(false);
|
||
|
|
||
|
}
|
||
|
#endregion
|
||
|
}
|