- center dialogs via new ManticoreDialog intermediate
- preferences dialog
- add project, resource and solution files for MSVC7
- coalesce namespaces for files and classes in subdirectories to
  be the subdirectory name
- support pref branch creation
- initial bookmarks work.
This commit is contained in:
ben%netscape.com 2001-06-30 01:11:21 +00:00
Родитель 868cdf9cc6
Коммит 2402178657
27 изменённых файлов: 1426 добавлений и 103 удалений

Просмотреть файл

@ -0,0 +1,198 @@
<VisualStudioProject>
<CSHARP
ProjectType = "Local"
ProductVersion = "7.0.9254"
SchemaVersion = "1.0"
ProjectGuid = "{B40F4C31-96AF-4E5F-A088-546389BC78C4}"
>
<Build>
<Settings
ApplicationIcon = ""
AssemblyKeyContainerName = ""
AssemblyName = "Project"
AssemblyOriginatorKeyFile = ""
DefaultClientScript = "JScript"
DefaultHTMLPageLayout = "Grid"
DefaultTargetSchema = "IE50"
DelaySign = "false"
NoStandardLibraries = "true"
OutputType = "WinExe"
RootNamespace = "Project"
StartupObject = ""
>
<Config
Name = "Debug"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = ""
DocumentationFile = ""
DebugSymbols = "true"
FileAlignment = "4096"
IncrementalBuild = "true"
Optimize = "false"
OutputPath = "bin\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "1"
/>
<Config
Name = "Release"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = ""
DocumentationFile = ""
DebugSymbols = "false"
FileAlignment = "4096"
IncrementalBuild = "true"
Optimize = "false"
OutputPath = "bin\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "1"
/>
</Settings>
<References>
<Reference
Name = "System"
AssemblyName = "System"
/>
<Reference
Name = "System.Data"
AssemblyName = "System.Data"
/>
<Reference
Name = "System.Drawing"
AssemblyName = "System.Drawing"
/>
<Reference
Name = "System.Windows.Forms"
AssemblyName = "System.Windows.Forms"
/>
<Reference
Name = "System.XML"
AssemblyName = "System.Xml"
/>
</References>
</Build>
<Files>
<Include>
<File
RelPath = "app.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "licenses.licx"
BuildAction = "Content"
/>
<File
RelPath = "makefile.win"
BuildAction = "None"
/>
<File
RelPath = "bookmarks\bookmarks.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "browser\aboutdialog.cs"
SubType = "Form"
BuildAction = "Compile"
/>
<File
RelPath = "browser\browser-menu.xml"
BuildAction = "Content"
/>
<File
RelPath = "browser\browser-toolbar.xml"
BuildAction = "Content"
/>
<File
RelPath = "browser\browserwindow.cs"
SubType = "Form"
BuildAction = "Compile"
/>
<File
RelPath = "browser\browserwindow.resx"
DependentUpon = "browserwindow.cs"
BuildAction = "EmbeddedResource"
/>
<File
RelPath = "browser\OpenLocDialog.cs"
SubType = "Form"
BuildAction = "Compile"
/>
<File
RelPath = "browser\OpenLocDialog.resx"
DependentUpon = "OpenLocDialog.cs"
BuildAction = "EmbeddedResource"
/>
<File
RelPath = "browser\PrefsDialog.cs"
SubType = "Form"
BuildAction = "Compile"
/>
<File
RelPath = "browser\PrefsDialog.resx"
DependentUpon = "PrefsDialog.cs"
BuildAction = "EmbeddedResource"
/>
<File
RelPath = "browser\RestoreSessionSettings.cs"
SubType = "Form"
BuildAction = "Compile"
/>
<File
RelPath = "browser\RestoreSessionSettings.resx"
DependentUpon = "RestoreSessionSettings.cs"
BuildAction = "EmbeddedResource"
/>
<File
RelPath = "core\preferences.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "layout\layoutabstraction.cs"
SubType = "Component"
BuildAction = "Compile"
/>
<File
RelPath = "resources\manticore.png"
BuildAction = "Content"
/>
<File
RelPath = "resources\manticore.psd"
BuildAction = "None"
/>
<File
RelPath = "toolkit\ManticoreDialog.cs"
SubType = "Form"
BuildAction = "Compile"
/>
<File
RelPath = "toolkit\toolkit.menus.cs"
SubType = "Component"
BuildAction = "Compile"
/>
<File
RelPath = "toolkit\toolkit.menus.resx"
DependentUpon = "toolkit.menus.cs"
BuildAction = "EmbeddedResource"
/>
<File
RelPath = "toolkit\toolkit.toolbars.cs"
SubType = "Component"
BuildAction = "Compile"
/>
</Include>
</Files>
</CSHARP>
</VisualStudioProject>

Просмотреть файл

@ -0,0 +1,43 @@
<VisualStudioProject>
<CSHARP>
<Build>
<Settings ReferencePath = "" >
<Config
Name = "Debug"
EnableASPDebugging = "false"
EnableASPXDebugging = "false"
EnableUnmanagedDebugging = "false"
EnableSQLServerDebugging = "false"
StartAction = "Project"
StartArguments = ""
StartPage = ""
StartProgram = ""
StartURL = ""
StartWorkingDirectory = ""
StartWithIE = "true"
/>
<Config
Name = "Release"
EnableASPDebugging = "false"
EnableASPXDebugging = "false"
EnableUnmanagedDebugging = "false"
EnableSQLServerDebugging = "false"
StartAction = "Project"
StartArguments = ""
StartPage = ""
StartProgram = ""
StartURL = ""
StartWorkingDirectory = ""
StartWithIE = "true"
/>
</Settings>
</Build>
<OtherProjectSettings
CopyProjectDestinationFolder = ""
CopyProjectUncPath = ""
CopyProjectOption = "0"
ProjectView = "ProjectFiles"
/>
</CSHARP>
</VisualStudioProject>

Просмотреть файл

@ -6,8 +6,9 @@ namespace Silverstone.Manticore.App
using System.Windows.Forms;
using System.Collections;
using Silverstone.Manticore.BrowserWindow;
using Silverstone.Manticore.Preferences;
using Silverstone.Manticore.Browser;
using Silverstone.Manticore.Core;
using Silverstone.Manticore.Bookmarks;
public class ManticoreApp
{
@ -16,6 +17,7 @@ namespace Silverstone.Manticore.App
// window types.
private Queue mBrowserWindows;
private Preferences mPreferences;
private Bookmarks mBookmarks;
public Preferences Prefs {
get {
@ -23,6 +25,12 @@ namespace Silverstone.Manticore.App
}
}
public Bookmarks BM {
get {
return mBookmarks;
}
}
public ManticoreApp()
{
mBrowserWindows = new Queue();
@ -32,11 +40,21 @@ namespace Silverstone.Manticore.App
mPreferences.InitializeDefaults("default-prefs.xml");
mPreferences.LoadPreferencesFile("user-prefs.xml");
// Initialize bookmarks
mBookmarks = new Bookmarks(this);
mBookmarks.LoadBookmarks();
OpenNewBrowser();
Application.Run();
}
~ManticoreApp()
{
// Flush preferences to disk.
mPreferences.FlushPreferencesFile("user-prefs.xml");
}
// Opens and displays a new browser window
public void OpenNewBrowser()
{

Просмотреть файл

@ -0,0 +1,15 @@
<?xml version="1.0"?>
<bookmarks xmlns="http://www.silverstone.net.nz/2001/manticore/uidl">
<bookmark type="Folder" name="Some Bookmarks">
<bookmark name="Foopy" location="http://www.nissan.co.jp/SILVIA/"/>
</bookmark>
<bookmark type="PersonalToolbarFolder" name="Personal Toolbar Folder">
<bookmark name="Goopy" location="http://www.goats.com/"/>
<bookmark name="Goopy" location="http://www.goats.com/"/>
<bookmark name="Goopy" location="http://www.goats.com/"/>
</bookmark>
<bookmark name="Goopy" location="http://www.goats.com/"/>
<bookmark name="Goopy" location="http://www.goats.com/"/>
<bookmark name="Goopy" location="http://www.goats.com/"/>
</bookmarks>

Просмотреть файл

@ -0,0 +1,118 @@
/* -*- Mode: C#; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Manticore.
*
* The Initial Developer of the Original Code is
* Silverstone Interactive. Portions created by Silverstone Interactive are
* Copyright (C) 2001 Silverstone Interactive.
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the MPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the MPL or the GPL.
*
* Contributor(s):
* Ben Goodger <ben@netscape.com>
*
*/
namespace Silverstone.Manticore.Bookmarks
{
using System;
using System.Xml;
using System.IO;
using Silverstone.Manticore.App;
public class Bookmarks
{
private XmlDocument mBookmarksDoc;
private String mBookmarksFile;
private ManticoreApp mApplication;
public Bookmarks(ManticoreApp aApplication)
{
mApplication = aApplication;
mBookmarksDoc = new XmlDocument();
mBookmarksFile = mApplication.Prefs.GetStringPref("browser.bookmarksfile");
// XXX Need to do windows profile stuff here
if (mBookmarksFile == "")
mBookmarksFile = "bookmarks.xml";
}
public void LoadBookmarks()
{
// Support remote bookmarks by setting up an asynchronous load & parse.
XmlTextReader reader = new XmlTextReader(mBookmarksFile);
reader.WhitespaceHandling = WhitespaceHandling.None;
reader.MoveToContent();
String xml = reader.ReadOuterXml();
reader.Close();
mBookmarksDoc.LoadXml(xml);
}
public void ImportBookmarks()
{
// Import a Netscape bookmarks file.
}
public void CreateBookmark(Bookmark aBookmark, Bookmark aBookmarkFolder)
{
}
public void DeleteBookmark(Bookmark aBookmark)
{
}
public String GenerateID()
{
// Generate a random ID for a bookmark item
return "";
}
}
public class Bookmark
{
public String Name;
public String URL;
public String ID;
public String Keyword;
public String Description;
public String IconURL;
public BookmarkType Type;
}
public enum BookmarkType
{
Bookmark,
Folder,
Separator,
IEFavoriteFolder,
IEFavorite,
FileSystemObject,
PersonalToolbarFolder
}
}

Просмотреть файл

@ -1,12 +1,46 @@
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
/* -*- Mode: C#; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Manticore.
*
* The Initial Developer of the Original Code is
* Silverstone Interactive. Portions created by Silverstone Interactive are
* Copyright (C) 2001 Silverstone Interactive.
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the MPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the MPL or the GPL.
*
* Contributor(s):
* David Hyatt <hyatt@netscape.com>
*
*/
namespace Silverstone.Manticore.OpenDialog
namespace Silverstone.Manticore.Browser
{
/// <summary>
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
/// <summary>
/// Summary description for OpenDialog.
/// </summary>
public class OpenDialog : System.Windows.Forms.Form

Просмотреть файл

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<xsd:schema id="root" targetNamespace="" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<data name="$this.Name">
<value>OpenDialog</value>
</data>
<resheader name="ResMimeType">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="Version">
<value>1.0.0.0</value>
</resheader>
<resheader name="Reader">
<value>System.Resources.ResXResourceReader</value>
</resheader>
<resheader name="Writer">
<value>System.Resources.ResXResourceWriter</value>
</resheader>
</root>

Просмотреть файл

@ -0,0 +1,108 @@
/* -*- Mode: C#; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Manticore.
*
* The Initial Developer of the Original Code is
* Silverstone Interactive. Portions created by Silverstone Interactive are
* Copyright (C) 2001 Silverstone Interactive.
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the MPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the MPL or the GPL.
*
* Contributor(s):
* Ben Goodger <ben@netscape.com>
*
*/
namespace Silverstone.Manticore.Browser
{
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;
/// <summary>
/// Summary description for UserControl1.
/// </summary>
public class PrefPanel : Panel
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
private bool mGenerated = false;
public PrefPanel()
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();
this.VisibleChanged += new EventHandler(OnVisibleChanged);
}
/// <summary>
/// Called when the visibility of the panel changes.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
public void OnVisibleChanged(Object sender, EventArgs e)
{
if (!mGenerated) {
// The first time we display the panel, read the values
// for UI elements from preferences and fill the controls.
}
}
public void Save()
{
}
/// <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 Component 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()
{
components = new System.ComponentModel.Container();
}
#endregion
}
}

Просмотреть файл

Просмотреть файл

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<panels xmlns="http://www.silverstone.net.nz/2001/manticore/uidl">
<panels label="Web Browser">
<panel label="Browser Display" id="browser"/>
</panels>
</panels>

Просмотреть файл

@ -0,0 +1,297 @@
/* -*- Mode: C#; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Manticore.
*
* The Initial Developer of the Original Code is
* Silverstone Interactive. Portions created by Silverstone Interactive are
* Copyright (C) 2001 Silverstone Interactive.
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the MPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the MPL or the GPL.
*
* Contributor(s):
* Ben Goodger <ben@netscape.com>
*
*/
namespace Silverstone.Manticore.Browser
{
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using Silverstone.Manticore.Toolkit;
/// <summary>
/// Summary description for Form1.
/// </summary>
public class PrefsDialog : ManticoreDialog
{
private System.Windows.Forms.TreeView treeView1;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Button cancelButton;
private System.Windows.Forms.Button okButton;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.RadioButton radioButton1;
private System.Windows.Forms.RadioButton radioButton2;
private System.Windows.Forms.RadioButton radioButton3;
private System.Windows.Forms.Button restoreSessionSettingsButton;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public PrefsDialog(Form aOpener) : base(aOpener)
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// Initialize the category list.
//
InitializeCategoryList();
}
/// <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.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.radioButton3 = new System.Windows.Forms.RadioButton();
this.restoreSessionSettingsButton = new System.Windows.Forms.Button();
this.cancelButton = new System.Windows.Forms.Button();
this.radioButton1 = new System.Windows.Forms.RadioButton();
this.treeView1 = new System.Windows.Forms.TreeView();
this.radioButton2 = new System.Windows.Forms.RadioButton();
this.panel1 = new System.Windows.Forms.Panel();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.label2 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.okButton = new System.Windows.Forms.Button();
this.panel1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// button1
//
this.button1.Location = new System.Drawing.Point(221, 72);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 24);
this.button1.TabIndex = 2;
this.button1.Text = "Browse...";
//
// button2
//
this.button2.Location = new System.Drawing.Point(136, 72);
this.button2.Name = "button2";
this.button2.TabIndex = 4;
this.button2.Text = "Use Current";
//
// radioButton3
//
this.radioButton3.Location = new System.Drawing.Point(16, 72);
this.radioButton3.Name = "radioButton3";
this.radioButton3.Size = new System.Drawing.Size(152, 16);
this.radioButton3.TabIndex = 2;
this.radioButton3.Text = "Restore previous session";
//
// restoreSessionSettingsButton
//
this.restoreSessionSettingsButton.Location = new System.Drawing.Point(224, 72);
this.restoreSessionSettingsButton.Name = "restoreSessionSettingsButton";
this.restoreSessionSettingsButton.TabIndex = 3;
this.restoreSessionSettingsButton.Text = "Settings...";
this.restoreSessionSettingsButton.Click += new System.EventHandler(this.restoreSessionSettingsButton_Click);
//
// cancelButton
//
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancelButton.Location = new System.Drawing.Point(408, 296);
this.cancelButton.Name = "cancelButton";
this.cancelButton.TabIndex = 2;
this.cancelButton.Text = "Cancel";
//
// radioButton1
//
this.radioButton1.Location = new System.Drawing.Point(16, 24);
this.radioButton1.Name = "radioButton1";
this.radioButton1.Size = new System.Drawing.Size(120, 16);
this.radioButton1.TabIndex = 0;
this.radioButton1.Text = "Show home page";
//
// treeView1
//
this.treeView1.ImageIndex = -1;
this.treeView1.Location = new System.Drawing.Point(16, 16);
this.treeView1.Name = "treeView1";
this.treeView1.SelectedImageIndex = -1;
this.treeView1.Size = new System.Drawing.Size(136, 264);
this.treeView1.TabIndex = 0;
//
// radioButton2
//
this.radioButton2.Location = new System.Drawing.Point(16, 48);
this.radioButton2.Name = "radioButton2";
this.radioButton2.Size = new System.Drawing.Size(112, 16);
this.radioButton2.TabIndex = 1;
this.radioButton2.Text = "Show blank page";
//
// panel1
//
this.panel1.Controls.AddRange(new System.Windows.Forms.Control[] {
this.groupBox2,
this.groupBox1});
this.panel1.Location = new System.Drawing.Point(160, 16);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(320, 264);
this.panel1.TabIndex = 1;
//
// groupBox2
//
this.groupBox2.Controls.AddRange(new System.Windows.Forms.Control[] {
this.restoreSessionSettingsButton,
this.radioButton3,
this.radioButton2,
this.radioButton1});
this.groupBox2.Location = new System.Drawing.Point(8, 0);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(312, 104);
this.groupBox2.TabIndex = 1;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "When Manticore starts, ";
//
// groupBox1
//
this.groupBox1.Controls.AddRange(new System.Windows.Forms.Control[] {
this.button2,
this.label2,
this.button1,
this.textBox1,
this.label1});
this.groupBox1.Location = new System.Drawing.Point(8, 112);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(312, 104);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Home Page";
//
// label2
//
this.label2.Location = new System.Drawing.Point(8, 48);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(56, 16);
this.label2.TabIndex = 3;
this.label2.Text = "Location:";
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(64, 48);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(232, 20);
this.textBox1.TabIndex = 1;
this.textBox1.Text = "http://www.silverstone.net.nz/";
//
// label1
//
this.label1.Location = new System.Drawing.Point(8, 24);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(280, 16);
this.label1.TabIndex = 0;
this.label1.Text = "Clicking the Home button takes you to this page:";
//
// okButton
//
this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
this.okButton.Location = new System.Drawing.Point(328, 296);
this.okButton.Name = "okButton";
this.okButton.TabIndex = 3;
this.okButton.Text = "OK";
//
// PrefsDialog
//
this.AcceptButton = this.okButton;
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.CancelButton = this.cancelButton;
this.ClientSize = new System.Drawing.Size(496, 328);
this.ControlBox = false;
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.okButton,
this.cancelButton,
this.panel1,
this.treeView1});
this.HelpButton = true;
this.Name = "PrefsDialog";
this.ShowInTaskbar = false;
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.Text = "Options";
this.Load += new System.EventHandler(this.PrefsDialog_Load);
this.panel1.ResumeLayout(false);
this.groupBox2.ResumeLayout(false);
this.groupBox1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private void restoreSessionSettingsButton_Click(object sender, System.EventArgs e)
{
RestoreSessionSettings dlg = new RestoreSessionSettings(this);
dlg.ShowDialog();
}
private void PrefsDialog_Load(object sender, System.EventArgs e)
{
}
}
}

Просмотреть файл

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<xsd:schema id="root" targetNamespace="" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<data name="$this.Name">
<value>PrefsDialog</value>
</data>
<data name="$this.Name1">
<value>PrefsDialog</value>
</data>
<resheader name="ResMimeType">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="Version">
<value>1.0.0.0</value>
</resheader>
<resheader name="Reader">
<value>System.Resources.ResXResourceReader</value>
</resheader>
<resheader name="Writer">
<value>System.Resources.ResXResourceWriter</value>
</resheader>
</root>

Просмотреть файл

@ -0,0 +1,180 @@
/* -*- Mode: C#; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Manticore.
*
* The Initial Developer of the Original Code is
* Silverstone Interactive. Portions created by Silverstone Interactive are
* Copyright (C) 2001 Silverstone Interactive.
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the MPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the MPL or the GPL.
*
* Contributor(s):
* Ben Goodger <ben@netscape.com>
*
*/
namespace Silverstone.Manticore.Browser
{
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using Silverstone.Manticore.Toolkit;
/// <summary>
/// Summary description for RestoreSessionSettings.
/// </summary>
public class RestoreSessionSettings : ManticoreDialog
{
private System.Windows.Forms.Label label1;
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.CheckBox checkBox2;
private System.Windows.Forms.CheckBox checkBox3;
private System.Windows.Forms.Button okButton;
private System.Windows.Forms.Button cancelButton;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public RestoreSessionSettings(Form aOpener) : base(aOpener)
{
//
// 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.checkBox3 = new System.Windows.Forms.CheckBox();
this.checkBox2 = new System.Windows.Forms.CheckBox();
this.cancelButton = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.okButton = new System.Windows.Forms.Button();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.SuspendLayout();
//
// checkBox3
//
this.checkBox3.Location = new System.Drawing.Point(32, 120);
this.checkBox3.Name = "checkBox3";
this.checkBox3.Size = new System.Drawing.Size(136, 24);
this.checkBox3.TabIndex = 3;
this.checkBox3.Text = "Recent pages history";
//
// checkBox2
//
this.checkBox2.Location = new System.Drawing.Point(32, 96);
this.checkBox2.Name = "checkBox2";
this.checkBox2.Size = new System.Drawing.Size(136, 24);
this.checkBox2.TabIndex = 2;
this.checkBox2.Text = "Open windows";
//
// cancelButton
//
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancelButton.Location = new System.Drawing.Point(176, 160);
this.cancelButton.Name = "cancelButton";
this.cancelButton.TabIndex = 5;
this.cancelButton.Text = "Cancel";
//
// label1
//
this.label1.Location = new System.Drawing.Point(16, 16);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(232, 48);
this.label1.TabIndex = 0;
this.label1.Text = "When you start Manticore, the following items from your previous browsing session" +
" are restored.";
//
// okButton
//
this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
this.okButton.Location = new System.Drawing.Point(96, 160);
this.okButton.Name = "okButton";
this.okButton.TabIndex = 4;
this.okButton.Text = "OK";
//
// checkBox1
//
this.checkBox1.Location = new System.Drawing.Point(32, 72);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(136, 24);
this.checkBox1.TabIndex = 1;
this.checkBox1.Text = "Last page(s) visited";
//
// RestoreSessionSettings
//
this.AcceptButton = this.okButton;
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.CancelButton = this.cancelButton;
this.ClientSize = new System.Drawing.Size(264, 192);
this.ControlBox = false;
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.cancelButton,
this.okButton,
this.checkBox3,
this.checkBox2,
this.checkBox1,
this.label1});
this.Name = "RestoreSessionSettings";
this.ShowInTaskbar = false;
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.Text = "Restore Session";
this.Load += new System.EventHandler(this.RestoreSessionSettings_Load);
this.ResumeLayout(false);
}
#endregion
private void RestoreSessionSettings_Load(object sender, System.EventArgs e)
{
}
}
}

Просмотреть файл

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<xsd:schema id="root" targetNamespace="" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<data name="$this.Name">
<value>RestoreSessionSettings</value>
</data>
<resheader name="ResMimeType">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="Version">
<value>1.0.0.0</value>
</resheader>
<resheader name="Reader">
<value>System.Resources.ResXResourceReader</value>
</resheader>
<resheader name="Writer">
<value>System.Resources.ResXResourceWriter</value>
</resheader>
</root>

Просмотреть файл

@ -32,48 +32,31 @@
*
*/
namespace Silverstone.Manticore.AboutDialog
namespace Silverstone.Manticore.Browser
{
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
public class AboutDialog : System.Windows.Forms.Form
using Silverstone.Manticore.Toolkit;
public class AboutDialog : ManticoreDialog
{
private System.ComponentModel.Container components;
private Form parentWindow;
public AboutDialog(Form parent)
public AboutDialog(Form aOpener) : base(aOpener)
{
parentWindow = parent;
InitializeComponent();
// Show the about dialog modally.
this.ShowDialog();
}
public override void Dispose()
{
base.Dispose();
components.Dispose();
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.ClientSize = new Size(253, 195);
this.ShowInTaskbar = false;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Width = 253;
this.Height = 195;
this.Left = parentWindow.Left + ((parentWindow.Width / 2) - (this.Width / 2));
this.Top = parentWindow.Top + ((parentWindow.Height / 2) - (this.Height / 2));
// Borderless dialog
this.FormBorderStyle = FormBorderStyle.None;
this.FormBorderStyle = FormBorderStyle.FixedDialog;
this.BackgroundImage = Image.FromFile("resources\\manticore.png");

Просмотреть файл

@ -32,7 +32,7 @@
*
*/
namespace Silverstone.Manticore.BrowserWindow
namespace Silverstone.Manticore.Browser
{
using System;
using System.ComponentModel;
@ -40,14 +40,10 @@ namespace Silverstone.Manticore.BrowserWindow
using System.Windows.Forms;
using Silverstone.Manticore.App;
using Silverstone.Manticore.Toolkit.Menus;
using Silverstone.Manticore.Toolkit.Toolbars;
using Silverstone.Manticore.AboutDialog;
using Silverstone.Manticore.OpenDialog;
using Silverstone.Manticore.Toolkit;
using Silverstone.Manticore.Layout;
using Silverstone.Manticore.LayoutAbstraction;
public class BrowserWindow : System.Windows.Forms.Form
public class BrowserWindow : Form
{
private System.ComponentModel.Container components;
@ -199,7 +195,12 @@ namespace Silverstone.Manticore.BrowserWindow
mBrowserWindow.webBrowser.SwitchLayoutEngine("trident");
break;
case "help-about":
AboutDialog dlg = new AboutDialog(mBrowserWindow);
AboutDialog aboutDialog = new AboutDialog(mBrowserWindow);
aboutDialog.ShowDialog();
break;
case "tools-options":
PrefsDialog prefsDialog = new PrefsDialog(mBrowserWindow);
prefsDialog.ShowDialog();
break;
}
}

Просмотреть файл

Просмотреть файл

@ -32,7 +32,7 @@
*
*/
namespace Silverstone.Manticore.Preferences
namespace Silverstone.Manticore.Core
{
using System;
using System.Collections;
@ -55,12 +55,42 @@ namespace Silverstone.Manticore.Preferences
public void InitializeDefaults(String aDefaults)
{
// Do we ever want to support multiple defaults files? For now, no.
mDefaultsDocument.Load(aDefaults);
ReadDocument(aDefaults, mDefaultsDocument);
}
private void ReadDocument(String aFile, XmlDocument aDocument)
{
XmlTextReader reader = new XmlTextReader(aFile);
reader.WhitespaceHandling = WhitespaceHandling.None;
reader.MoveToContent();
String xml = reader.ReadOuterXml();
reader.Close();
aDocument.LoadXml(xml);
}
// Called once at Startup
public void LoadPreferencesFile(String aFile)
{
mPrefsDocument.Load(aFile);
ReadDocument(aFile, mPrefsDocument);
mPrefsDocument.NodeChanged += new XmlNodeChangedEventHandler(OnNodeChanged);
mPrefsDocument.NodeRemoved += new XmlNodeChangedEventHandler(OnNodeRemoved);
mPrefsDocument.NodeInserted += new XmlNodeChangedEventHandler(OnNodeInserted);
}
public void OnNodeChanged(object sender, XmlNodeChangedEventArgs e)
{
Console.WriteLine(e.ToString());
}
public void OnNodeRemoved(object sender, XmlNodeChangedEventArgs e)
{
Console.WriteLine(e.ToString());
}
public void OnNodeInserted(object sender, XmlNodeChangedEventArgs e)
{
Console.WriteLine(e.ToString());
}
public void FlushPreferencesFile(String aFile)
@ -71,60 +101,112 @@ namespace Silverstone.Manticore.Preferences
mPrefsDocument.WriteTo(writer);
writer.Flush();
}
private XmlElement GetPrefElement(String aPrefType, String aPrefName)
//
// The Manticore preferences file takes the following (XML) format:
//
// <preferences>
// <foopy>
// <noopy type="int" value="42">
// <noo type="bool" value="true"/>
// <goo type="string" value="goats"/>
// </noopy>
// </foopy>
// </preferences>
//
// where this maps to preferences called:
// foopy.noopy (int pref, value 42)
// foopy.noopy.noo (bool pref, value true);
// foopy.noopy.goo (string pref, value "goats");
//
private XmlElement CreateBranch(String aPrefName)
{
return GetPrefElement(aPrefType, aPrefName, false);
String[] names = aPrefName.Split('.');
XmlElement elt = mPrefsDocument.DocumentElement;
for (int i = 0; i < names.Length; ++i)
elt = CreateBranch(names[i], elt);
return elt;
}
private XmlElement GetPrefElement(String aPrefType, String aPrefName,
bool aCreate)
private XmlElement CreateBranch(String aBranchName, XmlElement aRoot)
{
XmlDocument[] documents = {mPrefsDocument, mDefaultsDocument};
for (int i = 0; i < documents.Length; ++i) {
XmlNodeList prefs = documents[i].GetElementsByTagName(aPrefType);
int prefCount = prefs.Count;
for (int k = 0; k < prefCount; ++k) {
XmlNode currentNode = prefs[k];
if (currentNode is XmlElement) {
XmlElement elt = currentNode as XmlElement;
if (elt.GetAttribute("name") == aPrefName)
return elt;
}
}
XmlElement elt = GetBranch(aBranchName, aRoot);
if (elt == null) {
elt = mPrefsDocument.CreateElement(aBranchName);
aRoot.AppendChild(elt);
}
if (aCreate) {
// If an element is not found, create one.
XmlElement elt = mPrefsDocument.CreateElement(aPrefType);
elt.SetAttribute("name", aPrefName);
elt.SetAttribute("value", "");
mPrefsDocument.DocumentElement.AppendChild(elt);
return elt;
}
private XmlElement GetBranch(String aBranchName)
{
String[] names = aBranchName.Split('.');
XmlElement elt = mPrefsDocument.DocumentElement;
for (int i = 0; i < names.Length && elt != null; ++i)
elt = GetBranch(names[i], elt);
// The preference wasn't found in the user preferences
// file, look in the default preferences file.
if (elt == null) {
elt = mDefaultsDocument.DocumentElement;
for (int i = 0; i < names.Length; ++i)
elt = GetBranch(names[i], elt);
}
return elt;
}
private XmlElement GetBranch(String aBranchName, XmlElement aRoot)
{
// First, check to see if the specified root already has a branch
// specified. If it exists, hand that root back.
int childCount = aRoot.ChildNodes.Count;
for (int i = 0; i < childCount; ++i) {
if (aRoot.ChildNodes[i].LocalName == aBranchName)
return aRoot.ChildNodes[i] as XmlElement;
}
return null;
}
private void RemoveBranch(String aBranchName)
{
XmlElement elt = GetBranch(aBranchName);
XmlNode parent = elt.ParentNode;
parent.RemoveChild(elt);
while (parent != (mPrefsDocument.DocumentElement as XmlNode)) {
parent.RemoveChild(elt);
if (!parent.HasChildNodes)
parent = parent.ParentNode;
}
}
public bool GetBoolPref(String aPrefName)
{
XmlElement elt = GetPrefElement("boolpref", aPrefName);
return elt != null ? elt.GetAttribute("value") == "true" : false;
XmlElement elt = GetBranch(aPrefName);
return elt != null ? elt.GetAttribute("value") == "true" : false;
}
public void SetBoolPref(String aPrefName, bool aPrefValue)
{
XmlElement elt = GetPrefElement("boolpref", aPrefName, true);
if (elt != null)
elt.SetAttribute("value", aPrefValue ? "true" : "false");
XmlElement childElt = CreateBranch(aPrefName);
if (childElt != null)
childElt.SetAttribute("value", aPrefValue ? "true" : "false");
}
public void RemovePref(String aPrefName)
{
RemoveBranch(aPrefName);
}
public int GetIntPref(String aPrefName)
{
XmlElement elt = GetPrefElement("intpref", aPrefName);
XmlElement elt = GetBranch(aPrefName);
return elt != null ? Int32.Parse(elt.GetAttribute("value")) : 0;
}
public void SetIntPref(String aPrefName, int aPrefValue)
{
XmlElement elt = GetPrefElement("intpref", aPrefName, true);
XmlElement elt = CreateBranch(aPrefName);
if (elt != null) {
Object o = aPrefValue;
elt.SetAttribute("value", o.ToString());
@ -133,17 +215,24 @@ namespace Silverstone.Manticore.Preferences
public String GetStringPref(String aPrefName)
{
XmlElement elt = GetPrefElement("stringpref", aPrefName);
XmlElement elt = GetBranch(aPrefName);
return elt != null ? elt.GetAttribute("value") : "";
}
public void SetStringPref(String aPrefName, String aPrefValue)
{
XmlElement elt = GetPrefElement("stringpref", aPrefName, true);
if (elt != null)
XmlElement elt = CreateBranch(aPrefName);
if (elt != null)
elt.SetAttribute("value", aPrefValue);
}
}
public class PrefBranch
{
//private XmlElement mRoot;
public PrefBranch()
{
}
}
}

Просмотреть файл

@ -1,7 +1,10 @@
<?xml version="1.0"?>
<?xml version="1.0"?>
<prefs xmlns="http://www.silverstone.net.nz/2001/manticore/uidl">
<stringpref name="browser.homepage" value="http://www.nissan.co.jp/SILVIA/"/>
<intpref name="browser.homepage.mode" value="1"/>
<stringpref name="browser.layoutengine" value="gecko"/>
</prefs>
<preferences xmlns="http://www.silverstone.net.nz/2001/manticore/uidl">
<browser>
<homepage value="http://www.mozillazine.org/">
<mode value="1"/>
</homepage>
<layoutengine value="gecko"/>
</browser>
</preferences>

Просмотреть файл

@ -32,7 +32,7 @@
*
*/
namespace Silverstone.Manticore.LayoutAbstraction
namespace Silverstone.Manticore.Layout
{
using System;
using Microsoft.Win32;
@ -49,7 +49,7 @@ namespace Silverstone.Manticore.LayoutAbstraction
using AxMOZILLACONTROLLib;
using MOZILLACONTROLLib;
using Silverstone.Manticore.BrowserWindow;
using Silverstone.Manticore.Browser;
public class WebBrowser : ContainerControl
{
@ -116,6 +116,9 @@ namespace Silverstone.Manticore.LayoutAbstraction
this.Controls.Add(host);
}
mBrowserWindow.application.Prefs.SetStringPref("browser.layoutengine", id);
mBrowserWindow.application.Prefs.FlushPreferencesFile("user-prefs.xml");
LoadURL(url, false);
}

Просмотреть файл

@ -61,11 +61,15 @@ _COMPILE_CMD=csc /nologo /t:exe /out:$(_OUT_FILE) $(_DEBUG_FLAGS) $(_IMPORTS)
FILES = app.cs \
browser\browserwindow.cs \
browser\aboutdialog.cs \
layout\layoutabstraction.cs \
browser\PrefsDialog.cs \
browser\RestoreSessionSettings.cs \
browser\OpenLocDialog.cs \
layout\layoutabstraction.cs \
toolkit\toolkit.menus.cs \
toolkit\toolkit.toolbars.cs \
core\preferences.cs
toolkit\ManticoreDialog.cs \
core\preferences.cs \
bookmarks\bookmarks.cs
SUBDIR = WIN32_O.OBJ
!if defined(MOZ_DEBUG)

Просмотреть файл

@ -0,0 +1,21 @@
Microsoft Visual Studio Solution File, Format Version 7.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Manticore", "Manticore.csproj", "{B40F4C31-96AF-4E5F-A088-546389BC78C4}"
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
ConfigName.0 = Debug
ConfigName.1 = Release
EndGlobalSection
GlobalSection(ProjectDependencies) = postSolution
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{B40F4C31-96AF-4E5F-A088-546389BC78C4}.Debug.ActiveCfg = Debug|.NET
{B40F4C31-96AF-4E5F-A088-546389BC78C4}.Debug.Build.0 = Debug|.NET
{B40F4C31-96AF-4E5F-A088-546389BC78C4}.Release.ActiveCfg = Release|.NET
{B40F4C31-96AF-4E5F-A088-546389BC78C4}.Release.Build.0 = Release|.NET
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal

Просмотреть файл

@ -0,0 +1,62 @@
/* -*- Mode: C#; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Manticore.
*
* The Initial Developer of the Original Code is
* Silverstone Interactive. Portions created by Silverstone Interactive are
* Copyright (C) 2001 Silverstone Interactive.
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the MPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the MPL or the GPL.
*
* Contributor(s):
* Ben Goodger <ben@netscape.com>
*
*/
namespace Silverstone.Manticore.Toolkit
{
using System;
using System.Windows.Forms;
/// <summary>
/// Dialog that centers itself with respect to opening window
/// </summary>
public class ManticoreDialog : Form
{
private Form mOpener;
public ManticoreDialog(Form aOpener) : base()
{
mOpener = aOpener;
// Add a new event handler that centers the dialog when the
// visibility bit is flipped.
this.VisibleChanged += new EventHandler(VisibleChangedHandler);
}
public void VisibleChangedHandler(Object sender, EventArgs e)
{
this.Left = mOpener.Left + ((mOpener.Width / 2) - (this.Width / 2));
this.Top = mOpener.Top + ((mOpener.Height / 2) - (this.Height / 2));
}
}
}

Просмотреть файл

@ -32,7 +32,7 @@
*
*/
namespace Silverstone.Manticore.Toolkit.Menus
namespace Silverstone.Manticore.Toolkit
{
using System;
using System.ComponentModel;
@ -87,7 +87,7 @@ namespace Silverstone.Manticore.Toolkit.Menus
// Menuitem. Find the name, accesskey, command and id strings
String[] values = new String[3] {"", "", ""};
String[] names = new String[3] {"label", "accesskey", "command"};
for (Byte i = 0; i < names.Length; ++i) {
for (int i = 0; i < names.Length; ++i) {
if (reader2.MoveToAttribute(names[i]) &&
reader2.ReadAttributeValue())
values[i] = reader2.Value; // XXX need to handle entities

Просмотреть файл

Просмотреть файл

@ -32,7 +32,7 @@
*
*/
namespace Silverstone.Manticore.Toolkit.Toolbars
namespace Silverstone.Manticore.Toolkit
{
using System;
using System.ComponentModel;
@ -77,7 +77,7 @@ namespace Silverstone.Manticore.Toolkit.Toolbars
//
String[] tbvalues = new String[4] {"", "", "", ""};
String[] tbnames = new String[4] {"id", "label", "description", "visible"};
for (Byte i = 0; i < tbnames.Length; ++i)
for (int i = 0; i < tbnames.Length; ++i)
{
if (reader.MoveToAttribute(tbnames[i]) &&
reader.ReadAttributeValue())
@ -108,7 +108,7 @@ namespace Silverstone.Manticore.Toolkit.Toolbars
{
String[] tbbvalues = new String[2] {"", ""};
String[] tbbnames = new String[2] {"label", "command"};
for (Byte i = 0; i < tbbnames.Length; ++i)
for (int i = 0; i < tbbnames.Length; ++i)
{
if (reader.MoveToAttribute(tbbnames[i]) &&
reader.ReadAttributeValue())

Просмотреть файл

@ -1,6 +1,6 @@
<?xml version="1.0"?>
<prefs xmlns="http://www.silverstone.net.nz/2001/manticore/uidl">
<stringpref name="browser.homepage" value="http://www.nissan.co.jp/SILVIA/"/>
<intpref name="browser.homepage.mode" value="1"/>
</prefs>
<preferences xmlns="http://www.silverstone.net.nz/2001/manticore/uidl">
<browser>
<layoutengine value="trident" />
<bookmarksfile value="bookmarks.xml" />
</browser>
</preferences>