Back to index

lightning-sunbird  0.9+nobinonly
RestoreSessionSettings.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  *   Ben Goodger <ben@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   using Silverstone.Manticore.Toolkit;
00048 
00052        public class RestoreSessionSettings : ManticoreDialog
00053        {
00054     private System.Windows.Forms.Label label1;
00055     private System.Windows.Forms.CheckBox checkBox3;
00056     private System.Windows.Forms.Button okButton;
00057     private System.Windows.Forms.Button cancelButton;
00058     private System.Windows.Forms.RadioButton radioButton1;
00059     private System.Windows.Forms.RadioButton radioButton2;
00063               private System.ComponentModel.Container components = null;
00064 
00065               public RestoreSessionSettings(Form aOpener) : base(aOpener)
00066               {
00067                      //
00068                      // Required for Windows Form Designer support
00069                      //
00070                      InitializeComponent();
00071               }
00072 
00076               protected override void Dispose( bool disposing )
00077               {
00078                      if (disposing && components != null)
00079         components.Dispose();
00080                      base.Dispose( disposing );
00081               }
00082     
00083     public int WindowOpenMode
00084     {
00085       get {
00086         return radioButton1.Checked ? 0 : 1;
00087       }
00088       set {
00089         if (value == 0) 
00090           radioButton1.Checked = true;
00091         else 
00092           radioButton2.Checked = true;
00093       }
00094     }
00095 
00096     public bool SaveSessionHistory
00097     {
00098       get {
00099         return checkBox3.Checked;
00100       }
00101       set {
00102         checkBox3.Checked = value;
00103       }
00104     }
00105 
00106 
00107               #region Windows Form Designer generated code
00108 
00109 
00110 
00111 
00112               private void InitializeComponent()
00113               {
00114       this.checkBox3 = new System.Windows.Forms.CheckBox();
00115       this.cancelButton = new System.Windows.Forms.Button();
00116       this.label1 = new System.Windows.Forms.Label();
00117       this.okButton = new System.Windows.Forms.Button();
00118       this.radioButton1 = new System.Windows.Forms.RadioButton();
00119       this.radioButton2 = new System.Windows.Forms.RadioButton();
00120       this.SuspendLayout();
00121       // 
00122       // checkBox3
00123       // 
00124       this.checkBox3.Location = new System.Drawing.Point(32, 120);
00125       this.checkBox3.Name = "checkBox3";
00126       this.checkBox3.Size = new System.Drawing.Size(136, 24);
00127       this.checkBox3.TabIndex = 3;
00128       this.checkBox3.Text = "Recent pages history";
00129       this.checkBox3.FlatStyle = FlatStyle.System;
00130       // 
00131       // cancelButton
00132       // 
00133       this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
00134       this.cancelButton.Location = new System.Drawing.Point(176, 160);
00135       this.cancelButton.Name = "cancelButton";
00136       this.cancelButton.TabIndex = 5;
00137       this.cancelButton.Text = "Cancel";
00138       this.cancelButton.FlatStyle = FlatStyle.System;
00139       // 
00140       // label1
00141       // 
00142       this.label1.Location = new System.Drawing.Point(16, 16);
00143       this.label1.Name = "label1";
00144       this.label1.Size = new System.Drawing.Size(232, 48);
00145       this.label1.TabIndex = 0;
00146       this.label1.Text = "When you start Manticore, the following items from your previous browsing session" +
00147         " are restored.";
00148       // 
00149       // okButton
00150       // 
00151       this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
00152       this.okButton.Location = new System.Drawing.Point(96, 160);
00153       this.okButton.Name = "okButton";
00154       this.okButton.TabIndex = 4;
00155       this.okButton.Text = "OK";
00156       this.okButton.FlatStyle = FlatStyle.System;
00157       // 
00158       // radioButton1
00159       // 
00160       this.radioButton1.Location = new System.Drawing.Point(32, 72);
00161       this.radioButton1.Name = "radioButton1";
00162       this.radioButton1.Size = new System.Drawing.Size(144, 16);
00163       this.radioButton1.TabIndex = 6;
00164       this.radioButton1.Text = "Last page visited";
00165       this.radioButton1.FlatStyle = FlatStyle.System;
00166       // 
00167       // radioButton2
00168       // 
00169       this.radioButton2.Location = new System.Drawing.Point(32, 96);
00170       this.radioButton2.Name = "radioButton2";
00171       this.radioButton2.Size = new System.Drawing.Size(104, 16);
00172       this.radioButton2.TabIndex = 7;
00173       this.radioButton2.Text = "Open windows";
00174       this.radioButton2.FlatStyle = FlatStyle.System;
00175       // 
00176       // RestoreSessionSettings
00177       // 
00178       this.AcceptButton = this.okButton;
00179       this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
00180       this.CancelButton = this.cancelButton;
00181       this.ClientSize = new System.Drawing.Size(264, 192);
00182       this.ControlBox = false;
00183       this.Controls.AddRange(new System.Windows.Forms.Control[] {
00184                                                                   this.radioButton2,
00185                                                                   this.radioButton1,
00186                                                                   this.cancelButton,
00187                                                                   this.okButton,
00188                                                                   this.checkBox3,
00189                                                                   this.label1});
00190       this.Name = "RestoreSessionSettings";
00191       this.ShowInTaskbar = false;
00192       this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
00193       this.Text = "Restore Session";
00194       this.Load += new System.EventHandler(this.RestoreSessionSettings_Load);
00195       this.ResumeLayout(false);
00196 
00197     }
00198               #endregion
00199 
00200     private void RestoreSessionSettings_Load(object sender, System.EventArgs e)
00201     {
00202 
00203     }
00204        }
00205 }