Back to index

lightning-sunbird  0.9+nobinonly
OpenLocDialog.cs
Go to the documentation of this file.
00001 /* -*- Mode: C#; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
00002  *
00003  * ***** BEGIN LICENSE BLOCK *****
00004  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00005  *
00006  * The contents of this file are subject to the Mozilla Public License Version
00007  * 1.1 (the "License"); you may not use this file except in compliance with
00008  * the License. You may obtain a copy of the License at
00009  * http://www.mozilla.org/MPL/
00010  *
00011  * Software distributed under the License is distributed on an "AS IS" basis,
00012  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00013  * for the specific language governing rights and limitations under the
00014  * License.
00015  *
00016  * The Original Code is Manticore.
00017  *
00018  * The Initial Developer of the Original Code is
00019  * Silverstone Interactive.
00020  * Portions created by the Initial Developer are Copyright (C) 2001
00021  * the Initial Developer. All Rights Reserved.
00022  *
00023  * Contributor(s):
00024  *   David Hyatt <hyatt@netscape.com>
00025  *
00026  * Alternatively, the contents of this file may be used under the terms of
00027  * either the GNU General Public License Version 2 or later (the "GPL"), or
00028  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00029  * in which case the provisions of the GPL or the LGPL are applicable instead
00030  * of those above. If you wish to allow use of your version of this file only
00031  * under the terms of either the GPL or the LGPL, and not to allow others to
00032  * use your version of this file under the terms of the MPL, indicate your
00033  * decision by deleting the provisions above and replace them with the notice
00034  * and other provisions required by the GPL or the LGPL. If you do not delete
00035  * the provisions above, a recipient may use your version of this file under
00036  * the terms of any one of the MPL, the GPL or the LGPL.
00037  *
00038  * ***** END LICENSE BLOCK ***** */
00039 
00040 namespace Silverstone.Manticore.Browser
00041 {
00042   using System;
00043   using System.Drawing;
00044   using System.Collections;
00045   using System.ComponentModel;
00046   using System.Windows.Forms;
00047   
00051        public class OpenDialog : System.Windows.Forms.Form
00052        {
00053               private System.Windows.Forms.Label label1;
00054               private System.Windows.Forms.TextBox urlText;
00055               private System.Windows.Forms.Button openButton;
00056               private System.Windows.Forms.Button cancelButton;
00060               private System.ComponentModel.Container components = null;
00061  
00062               public OpenDialog()
00063               {
00064                      //
00065                      // Required for Windows Form Designer support
00066                      //
00067                      InitializeComponent();
00068 
00069                      openButton.DialogResult = DialogResult.OK;
00070               }
00071 
00072               public String URL 
00073               {
00074                 get {
00075                   return urlText.Text;
00076                 }
00077               }
00078 
00082               protected override void Dispose( bool disposing )
00083               {
00084                      if( disposing )
00085                      {
00086                             if(components != null)
00087                             {
00088                                    components.Dispose();
00089                             }
00090                      }
00091                      base.Dispose( disposing );
00092               }
00093 
00094               #region Windows Form Designer generated code
00095 
00096 
00097 
00098 
00099               private void InitializeComponent()
00100               {
00101                      this.urlText = new System.Windows.Forms.TextBox();
00102                      this.cancelButton = new System.Windows.Forms.Button();
00103                      this.label1 = new System.Windows.Forms.Label();
00104                      this.openButton = new System.Windows.Forms.Button();
00105                      this.SuspendLayout();
00106                      // 
00107                      // urlText
00108                      // 
00109                      this.urlText.Location = new System.Drawing.Point(16, 32);
00110                      this.urlText.Name = "urlText";
00111                      this.urlText.Size = new System.Drawing.Size(272, 20);
00112                      this.urlText.TabIndex = 1;
00113                      this.urlText.Text = "";
00114                      // 
00115                      // cancelButton
00116                      // 
00117                      this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
00118                      this.cancelButton.Location = new System.Drawing.Point(216, 64);
00119                      this.cancelButton.Name = "cancelButton";
00120                      this.cancelButton.Size = new System.Drawing.Size(72, 24);
00121                      this.cancelButton.TabIndex = 2;
00122                      this.cancelButton.Text = "Cancel";
00123       this.cancelButton.FlatStyle = FlatStyle.System;
00124                      // 
00125                      // label1
00126                      // 
00127                      this.label1.Location = new System.Drawing.Point(16, 8);
00128                      this.label1.Name = "label1";
00129                      this.label1.Size = new System.Drawing.Size(264, 24);
00130                      this.label1.TabIndex = 0;
00131                      this.label1.Text = "Enter a URL:";
00132                      // 
00133                      // openButton
00134                      // 
00135                      this.openButton.Location = new System.Drawing.Point(136, 64);
00136                      this.openButton.Name = "openButton";
00137                      this.openButton.Size = new System.Drawing.Size(72, 24);
00138                      this.openButton.TabIndex = 2;
00139                      this.openButton.Text = "Open";
00140       this.openButton.FlatStyle = FlatStyle.System;
00141                      // 
00142                      // OpenDialog
00143                      // 
00144                      this.AcceptButton = this.openButton;
00145                      this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
00146                      this.CancelButton = this.cancelButton;
00147                      this.ClientSize = new System.Drawing.Size(302, 98);
00148                      this.ControlBox = false;
00149                      this.Controls.AddRange(new System.Windows.Forms.Control[] {
00150                                                                                                                                 this.cancelButton,
00151                                                                                                                                 this.openButton,
00152                                                                                                                                 this.urlText,
00153                                                                                                                                 this.label1});
00154                      this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
00155                      this.MaximizeBox = false;
00156                      this.MinimizeBox = false;
00157                      this.Name = "OpenDialog";
00158                      this.ShowInTaskbar = false;
00159                      this.Text = "Open Location";
00160                      this.ResumeLayout(false);
00161 
00162               }
00163               #endregion
00164        }
00165 }