unit WinForm1;

//
// Written by Rick Ross (http://rick-ross.com)
//

interface

uses
  System.Drawing, System.Collections, System.ComponentModel,
  System.Windows.Forms, System.Data;

type
  TWinForm1 = class(System.Windows.Forms.Form)
  {$REGION 'Designer Managed Code'}
  strict private
    /// <summary>
    /// Required designer variable.
    /// </summary>
    Components: System.ComponentModel.Container;
    Label1: System.Windows.Forms.Label;
    TextBox1: System.Windows.Forms.TextBox;
    btnOK: System.Windows.Forms.Button;
    btnCancel: System.Windows.Forms.Button;
    /// <summary>
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.
    /// </summary>
    procedure InitializeComponent;
    procedure btnOK_Click(sender: System.Object; e: System.EventArgs);
  {$ENDREGION}
  strict protected
    /// <summary>
    /// Clean up any resources being used.
    /// </summary>
    procedure Dispose(Disposing: Boolean); override;
  strict protected
    FTypeName : string;
  public
    constructor Create;
    property TypeName : string read FTypeName;
  end;

implementation

uses
  System.Globalization;

{$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>
procedure TWinForm1.InitializeComponent;
begin
  Self.Label1 := System.Windows.Forms.Label.Create;
  Self.TextBox1 := System.Windows.Forms.TextBox.Create;
  Self.btnOK := System.Windows.Forms.Button.Create;
  Self.btnCancel := System.Windows.Forms.Button.Create;
  Self.SuspendLayout;
  // 
  // Label1
  // 
  Self.Label1.Font := System.Drawing.Font.Create('Microsoft Sans Serif', 8.25, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, (System.Byte(0)));
  Self.Label1.Location := System.Drawing.Point.Create(8, 8);
  Self.Label1.Name := 'Label1';
  Self.Label1.Size := System.Drawing.Size.Create(480, 16);
  Self.Label1.TabIndex := 0;
  Self.Label1.Text := 'Name of System.Type to explore (e.g. System.String)';
  // 
  // TextBox1
  // 
  Self.TextBox1.Location := System.Drawing.Point.Create(8, 32);
  Self.TextBox1.Name := 'TextBox1';
  Self.TextBox1.Size := System.Drawing.Size.Create(528, 20);
  Self.TextBox1.TabIndex := 1;
  Self.TextBox1.Text := '';
  // 
  // btnOK
  // 
  Self.btnOK.DialogResult := System.Windows.Forms.DialogResult.OK;
  Self.btnOK.Location := System.Drawing.Point.Create(376, 64);
  Self.btnOK.Name := 'btnOK';
  Self.btnOK.TabIndex := 2;
  Self.btnOK.Text := 'OK';
  Include(Self.btnOK.Click, Self.btnOK_Click);
  // 
  // btnCancel
  // 
  Self.btnCancel.DialogResult := System.Windows.Forms.DialogResult.Cancel;
  Self.btnCancel.Location := System.Drawing.Point.Create(464, 64);
  Self.btnCancel.Name := 'btnCancel';
  Self.btnCancel.TabIndex := 3;
  Self.btnCancel.Text := 'Cancel';
  // 
  // TWinForm1
  // 
  Self.AutoScaleBaseSize := System.Drawing.Size.Create(5, 13);
  Self.ClientSize := System.Drawing.Size.Create(552, 101);
  Self.Controls.Add(Self.btnCancel);
  Self.Controls.Add(Self.btnOK);
  Self.Controls.Add(Self.TextBox1);
  Self.Controls.Add(Self.Label1);
  Self.Name := 'TWinForm1';
  Self.StartPosition := System.Windows.Forms.FormStartPosition.CenterParent;
  Self.Text := 'Open a .NET System.Type by name';
  Self.ResumeLayout(False);
end;
{$ENDREGION}

procedure TWinForm1.Dispose(Disposing: Boolean);
begin
  if Disposing then
  begin
    if Components <> nil then
      Components.Dispose();
  end;
  inherited Dispose(Disposing);
end;

constructor TWinForm1.Create;
begin
  inherited Create;
  //
  // Required for Windows Form Designer support
  //
  InitializeComponent;
  //
  // TODO: Add any constructor code after InitializeComponent call
  //
end;

procedure TWinForm1.btnOK_Click(sender: System.Object; e: System.EventArgs);
begin
  FTypeName := TextBox1.Text;
end;

end.
