diff --git a/mozilla/embedding/tests/MSDotNETCSEmbed/App.ico b/mozilla/embedding/tests/MSDotNETCSEmbed/App.ico new file mode 100644 index 00000000000..3a5525fd794 Binary files /dev/null and b/mozilla/embedding/tests/MSDotNETCSEmbed/App.ico differ diff --git a/mozilla/embedding/tests/MSDotNETCSEmbed/AssemblyInfo.cs b/mozilla/embedding/tests/MSDotNETCSEmbed/AssemblyInfo.cs new file mode 100644 index 00000000000..d4e5019fd93 --- /dev/null +++ b/mozilla/embedding/tests/MSDotNETCSEmbed/AssemblyInfo.cs @@ -0,0 +1,97 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape 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/NPL/ + * + * 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2003 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Roy Yokoyama (original author) + * + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the NPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +using System.Reflection; +using System.Runtime.CompilerServices; + +// +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +// +[assembly: AssemblyTitle("")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: + +[assembly: AssemblyVersion("1.0.*")] + +// +// In order to sign your assembly you must specify a key to use. Refer to the +// Microsoft .NET Framework documentation for more information on assembly signing. +// +// Use the attributes below to control which key is used for signing. +// +// Notes: +// (*) If no key is specified, the assembly is not signed. +// (*) KeyName refers to a key that has been installed in the Crypto Service +// Provider (CSP) on your machine. KeyFile refers to a file which contains +// a key. +// (*) If the KeyFile and the KeyName values are both specified, the +// following processing occurs: +// (1) If the KeyName can be found in the CSP, that key is used. +// (2) If the KeyName does not exist and the KeyFile does exist, the key +// in the KeyFile is installed into the CSP and used. +// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. +// When specifying the KeyFile, the location of the KeyFile should be +// relative to the project output directory which is +// %Project Directory%\obj\. For example, if your KeyFile is +// located in the project directory, you would specify the AssemblyKeyFile +// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] +// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework +// documentation for more information on this. +// +[assembly: AssemblyDelaySign(false)] +[assembly: AssemblyKeyFile("")] +[assembly: AssemblyKeyName("")] diff --git a/mozilla/embedding/tests/MSDotNETCSEmbed/MSDotNETCSEmbed.csproj b/mozilla/embedding/tests/MSDotNETCSEmbed/MSDotNETCSEmbed.csproj new file mode 100644 index 00000000000..a7f71d1c79f --- /dev/null +++ b/mozilla/embedding/tests/MSDotNETCSEmbed/MSDotNETCSEmbed.csproj @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mozilla/embedding/tests/MSDotNETCSEmbed/MSDotNETCSEmbed.csproj.user b/mozilla/embedding/tests/MSDotNETCSEmbed/MSDotNETCSEmbed.csproj.user new file mode 100644 index 00000000000..9da3d9ab73d --- /dev/null +++ b/mozilla/embedding/tests/MSDotNETCSEmbed/MSDotNETCSEmbed.csproj.user @@ -0,0 +1,48 @@ + + + + + + + + + + + + diff --git a/mozilla/embedding/tests/MSDotNETCSEmbed/MSDotNETCSEmbed.sln b/mozilla/embedding/tests/MSDotNETCSEmbed/MSDotNETCSEmbed.sln new file mode 100644 index 00000000000..4bb583954f5 --- /dev/null +++ b/mozilla/embedding/tests/MSDotNETCSEmbed/MSDotNETCSEmbed.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 7.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MSDotNETCSEmbed", "MSDotNETCSEmbed.csproj", "{796A3EA3-D33E-46C8-AE6C-B6E40027BF36}" +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + ConfigName.0 = Debug + ConfigName.1 = Release + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {796A3EA3-D33E-46C8-AE6C-B6E40027BF36}.Debug.ActiveCfg = Debug|.NET + {796A3EA3-D33E-46C8-AE6C-B6E40027BF36}.Debug.Build.0 = Debug|.NET + {796A3EA3-D33E-46C8-AE6C-B6E40027BF36}.Release.ActiveCfg = Release|.NET + {796A3EA3-D33E-46C8-AE6C-B6E40027BF36}.Release.Build.0 = Release|.NET + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/mozilla/embedding/tests/MSDotNETCSEmbed/MSDotNETCSEmbed.suo b/mozilla/embedding/tests/MSDotNETCSEmbed/MSDotNETCSEmbed.suo new file mode 100644 index 00000000000..55cd36174a2 Binary files /dev/null and b/mozilla/embedding/tests/MSDotNETCSEmbed/MSDotNETCSEmbed.suo differ diff --git a/mozilla/embedding/tests/MSDotNETCSEmbed/MSDotNETCSEmbedForm.cs b/mozilla/embedding/tests/MSDotNETCSEmbed/MSDotNETCSEmbedForm.cs new file mode 100644 index 00000000000..af956ddfff2 --- /dev/null +++ b/mozilla/embedding/tests/MSDotNETCSEmbed/MSDotNETCSEmbedForm.cs @@ -0,0 +1,157 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape 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/NPL/ + * + * 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 mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2003 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Roy Yokoyama (original author) + * + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the NPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +using System; +using System.Drawing; +using System.Collections; +using System.ComponentModel; +using System.Windows.Forms; +using System.Data; + +// Gecko namespace +using Mozilla.Embedding; + +namespace MSDotNETCSEmbed +{ + /// + /// Summary description for Form1. + /// + public class MSDotNETCSEmbedForm : System.Windows.Forms.Form + { + /// + /// Required designer variable. + /// + private System.ComponentModel.Container components = null; + private Mozilla.Embedding.Gecko myGecko = null; + private String myURL = null; + + public MSDotNETCSEmbedForm() + { + // + // Required for Windows Form Designer support + // + InitializeComponent(); + + // + // TODO: Add any constructor code after InitializeComponent call + // + myGecko = new Gecko(); + } + + /// + /// 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() + { + // + // MSDotNETCSEmbedForm + // + this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); + this.ClientSize = new System.Drawing.Size(744, 374); + this.Name = "MSDotNETCSEmbed"; + this.Text = "MSDotNETCSEmbed [UNSUPPORTED]"; + this.Resize += new System.EventHandler(this.MSDotNETCSEmbedForm_Resize); + this.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.MSDotNETCSEmbedForm_KeyPress); + this.Load += new System.EventHandler(this.MSDotNETCSEmbedForm_Load); + + } + #endregion + + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + // initialize gecko + Gecko.InitEmbedding(); + + Application.Run(new MSDotNETCSEmbedForm()); + + // terminate gecko + Gecko.TermEmbedding(); + } + + private void MSDotNETCSEmbedForm_Load(object sender, System.EventArgs e) + { + myURL = "www.mozilla.org"; + myGecko.OpenURL(this.Handle, myURL); + this.Text = "MSDotNETCSEmbed [UNSUPPORTED] - " + myURL; + myURL = ""; + } + + private void MSDotNETCSEmbedForm_Resize(object sender, System.EventArgs e) + { + myGecko.Resize(this.Handle); + } + + private void MSDotNETCSEmbedForm_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e) + { + switch (e.KeyChar) + { + case '\r': + myGecko.OpenURL(this.Handle, myURL); + myURL = ""; + break; + + default: + myURL += e.KeyChar; + this.Text = "MSDotNETCSEmbed [UNSUPPORTED] - " + myURL; + break; + } + } + } +} diff --git a/mozilla/embedding/tests/MSDotNETCSEmbed/MSDotNETCSEmbedForm.resx b/mozilla/embedding/tests/MSDotNETCSEmbed/MSDotNETCSEmbedForm.resx new file mode 100644 index 00000000000..add6c98ec45 --- /dev/null +++ b/mozilla/embedding/tests/MSDotNETCSEmbed/MSDotNETCSEmbedForm.resx @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Form1 + + \ No newline at end of file