217 lines
6.5 KiB
C#
217 lines
6.5 KiB
C#
using System;
|
|
using System.Drawing;
|
|
using System.Collections;
|
|
using System.ComponentModel;
|
|
using System.Windows.Forms;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace SecretStoreService
|
|
{
|
|
/// <summary>
|
|
/// Summary description for Form2.
|
|
/// </summary>
|
|
public class Form2 : System.Windows.Forms.Form
|
|
{
|
|
private System.Windows.Forms.Label label1;
|
|
private System.Windows.Forms.Label label2;
|
|
private System.Windows.Forms.Label label3;
|
|
private System.Windows.Forms.Label label4;
|
|
private System.Windows.Forms.Label label5;
|
|
private System.Windows.Forms.Label server;
|
|
private System.Windows.Forms.Label clientversion;
|
|
private System.Windows.Forms.Label serverversion;
|
|
private System.Windows.Forms.Label numsecrets;
|
|
private System.Windows.Forms.Label status;
|
|
/// <summary>
|
|
/// Required designer variable.
|
|
/// </summary>
|
|
private System.ComponentModel.Container components = null;
|
|
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
public struct SYSTEM_INFO
|
|
{
|
|
public uint dwOemId;
|
|
public uint dwPageSize;
|
|
public uint lpMinimumApplicationAddress;
|
|
public uint lpMaximumApplicationAddress;
|
|
public uint dwActiveProcessorMask;
|
|
public uint dwNumberOfProcessors;
|
|
public uint dwProcessorType;
|
|
public uint dwAllocationGranularity;
|
|
public uint dwProcessorLevel;
|
|
public uint dwProcessorRevision;
|
|
}
|
|
|
|
[DllImport("kernel32")]
|
|
static extern void GetSystemInfo(ref SYSTEM_INFO pSI);
|
|
|
|
|
|
|
|
public Form2()
|
|
{
|
|
//
|
|
// Required for Windows Form Designer support
|
|
//
|
|
InitializeComponent();
|
|
|
|
//
|
|
// TODO: Add any constructor code after InitializeComponent call
|
|
//
|
|
|
|
|
|
}
|
|
|
|
/// <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.label1 = new System.Windows.Forms.Label();
|
|
this.label2 = new System.Windows.Forms.Label();
|
|
this.label3 = new System.Windows.Forms.Label();
|
|
this.label4 = new System.Windows.Forms.Label();
|
|
this.label5 = new System.Windows.Forms.Label();
|
|
this.server = new System.Windows.Forms.Label();
|
|
this.clientversion = new System.Windows.Forms.Label();
|
|
this.serverversion = new System.Windows.Forms.Label();
|
|
this.numsecrets = new System.Windows.Forms.Label();
|
|
this.status = new System.Windows.Forms.Label();
|
|
this.SuspendLayout();
|
|
//
|
|
// label1
|
|
//
|
|
this.label1.Location = new System.Drawing.Point(48, 56);
|
|
this.label1.Name = "label1";
|
|
this.label1.Size = new System.Drawing.Size(112, 16);
|
|
this.label1.TabIndex = 0;
|
|
this.label1.Text = "Client Version=";
|
|
this.label1.Click += new System.EventHandler(this.label1_Click);
|
|
//
|
|
// label2
|
|
//
|
|
this.label2.Location = new System.Drawing.Point(48, 80);
|
|
this.label2.Name = "label2";
|
|
this.label2.Size = new System.Drawing.Size(88, 16);
|
|
this.label2.TabIndex = 1;
|
|
this.label2.Text = "Server Version=";
|
|
//
|
|
// label3
|
|
//
|
|
this.label3.Location = new System.Drawing.Point(48, 120);
|
|
this.label3.Name = "label3";
|
|
this.label3.Size = new System.Drawing.Size(112, 24);
|
|
this.label3.TabIndex = 2;
|
|
this.label3.Text = "Number of Secrets=";
|
|
//
|
|
// label4
|
|
//
|
|
this.label4.Location = new System.Drawing.Point(48, 144);
|
|
this.label4.Name = "label4";
|
|
this.label4.Size = new System.Drawing.Size(48, 16);
|
|
this.label4.TabIndex = 3;
|
|
this.label4.Text = "Status=";
|
|
//
|
|
// label5
|
|
//
|
|
this.label5.Location = new System.Drawing.Point(48, 32);
|
|
this.label5.Name = "label5";
|
|
this.label5.Size = new System.Drawing.Size(48, 16);
|
|
this.label5.TabIndex = 4;
|
|
this.label5.Text = "Server=";
|
|
//
|
|
// server
|
|
//
|
|
this.server.Location = new System.Drawing.Point(104, 32);
|
|
this.server.Name = "server";
|
|
this.server.Size = new System.Drawing.Size(72, 16);
|
|
this.server.TabIndex = 5;
|
|
this.server.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
|
//
|
|
// clientversion
|
|
//
|
|
this.clientversion.Location = new System.Drawing.Point(128, 56);
|
|
this.clientversion.Name = "clientversion";
|
|
this.clientversion.Size = new System.Drawing.Size(64, 16);
|
|
this.clientversion.TabIndex = 6;
|
|
this.clientversion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
|
//
|
|
// serverversion
|
|
//
|
|
this.serverversion.Location = new System.Drawing.Point(176, 80);
|
|
this.serverversion.Name = "serverversion";
|
|
this.serverversion.Size = new System.Drawing.Size(64, 16);
|
|
this.serverversion.TabIndex = 7;
|
|
this.serverversion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
|
//
|
|
// numsecrets
|
|
//
|
|
this.numsecrets.Location = new System.Drawing.Point(160, 120);
|
|
this.numsecrets.Name = "numsecrets";
|
|
this.numsecrets.Size = new System.Drawing.Size(72, 16);
|
|
this.numsecrets.TabIndex = 8;
|
|
this.numsecrets.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
|
//
|
|
// status
|
|
//
|
|
this.status.Location = new System.Drawing.Point(112, 144);
|
|
this.status.Name = "status";
|
|
this.status.Size = new System.Drawing.Size(88, 16);
|
|
this.status.TabIndex = 9;
|
|
this.status.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
|
//
|
|
// Form2
|
|
//
|
|
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
|
|
this.ClientSize = new System.Drawing.Size(336, 278);
|
|
this.Controls.Add(this.status);
|
|
this.Controls.Add(this.numsecrets);
|
|
this.Controls.Add(this.serverversion);
|
|
this.Controls.Add(this.clientversion);
|
|
this.Controls.Add(this.server);
|
|
this.Controls.Add(this.label5);
|
|
this.Controls.Add(this.label4);
|
|
this.Controls.Add(this.label3);
|
|
this.Controls.Add(this.label2);
|
|
this.Controls.Add(this.label1);
|
|
this.Name = "Form2";
|
|
this.Text = "Secret Store Information";
|
|
this.ResumeLayout(false);
|
|
|
|
}
|
|
#endregion
|
|
|
|
private void label1_Click(object sender, System.EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
|
|
public void setInfo(string server, string clientversion, string serverversion, string numsecrets, string status)
|
|
{
|
|
this.server.Text = server;
|
|
this.clientversion.Text = clientversion;
|
|
this.serverversion.Text = serverversion;
|
|
this.numsecrets.Text = numsecrets;
|
|
this.status.Text = status;
|
|
this.Refresh();
|
|
}
|
|
}
|
|
}
|