using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace DNPlay
{
///
/// Summary description for frmOpenURL.
///
public class frmOpenURL : System.Windows.Forms.Form
{
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox txtURL;
private System.Windows.Forms.Button cmdOK;
private System.Windows.Forms.Button cmdCancel;
///
/// Required designer variable.
///
private System.ComponentModel.Container components = null;
public String URLToOpen;
public bool wasOK;
public frmOpenURL()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
///
/// Clean up any resources being used.
///
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.txtURL = new System.Windows.Forms.TextBox();
this.cmdOK = new System.Windows.Forms.Button();
this.cmdCancel = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// label1
//
this.label1.Location = new System.Drawing.Point(16, 16);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(368, 16);
this.label1.TabIndex = 0;
this.label1.Text = "Enter the URL you wish to open.";
//
// txtURL
//
this.txtURL.Location = new System.Drawing.Point(16, 48);
this.txtURL.Name = "txtURL";
this.txtURL.Size = new System.Drawing.Size(376, 20);
this.txtURL.TabIndex = 1;
this.txtURL.Text = "";
//
// cmdOK
//
this.cmdOK.Location = new System.Drawing.Point(304, 80);
this.cmdOK.Name = "cmdOK";
this.cmdOK.Size = new System.Drawing.Size(88, 24);
this.cmdOK.TabIndex = 2;
this.cmdOK.Text = "Open";
this.cmdOK.Click += new System.EventHandler(this.cmdOK_Click);
//
// cmdCancel
//
this.cmdCancel.Location = new System.Drawing.Point(200, 80);
this.cmdCancel.Name = "cmdCancel";
this.cmdCancel.Size = new System.Drawing.Size(88, 24);
this.cmdCancel.TabIndex = 3;
this.cmdCancel.Text = "Cancel";
this.cmdCancel.Click += new System.EventHandler(this.cmdCancel_Click);
//
// frmOpenURL
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(416, 110);
this.Controls.Add(this.cmdCancel);
this.Controls.Add(this.cmdOK);
this.Controls.Add(this.txtURL);
this.Controls.Add(this.label1);
this.Name = "frmOpenURL";
this.Text = "Open URL...";
this.ResumeLayout(false);
}
#endregion
private void cmdOK_Click(object sender, System.EventArgs e)
{
wasOK = true;
URLToOpen = txtURL.Text;
this.Close();
}
private void cmdCancel_Click(object sender, System.EventArgs e)
{
wasOK = false;
URLToOpen = "";
this.Close();
}
}
}