From 3561d42d1b421fba0aeeb80783aba8c6fbe571c1 Mon Sep 17 00:00:00 2001 From: "yokoyama%netscape.com" Date: Fri, 16 May 2003 00:19:26 +0000 Subject: [PATCH] **Not part of the build** Microsoft Visual Studio .NET Test application git-svn-id: svn://10.0.0.236/trunk@142521 18797224-902f-48f8-a5cc-f745e15eee43 --- .../embedding/tests/MSDotNETCSEmbed/App.ico | Bin 0 -> 1078 bytes .../tests/MSDotNETCSEmbed/AssemblyInfo.cs | 97 +++++++++++ .../MSDotNETCSEmbed/MSDotNETCSEmbed.csproj | 116 +++++++++++++ .../MSDotNETCSEmbed.csproj.user | 48 ++++++ .../tests/MSDotNETCSEmbed/MSDotNETCSEmbed.sln | 21 +++ .../tests/MSDotNETCSEmbed/MSDotNETCSEmbed.suo | Bin 0 -> 7168 bytes .../MSDotNETCSEmbed/MSDotNETCSEmbedForm.cs | 157 ++++++++++++++++++ .../MSDotNETCSEmbed/MSDotNETCSEmbedForm.resx | 102 ++++++++++++ 8 files changed, 541 insertions(+) create mode 100644 mozilla/embedding/tests/MSDotNETCSEmbed/App.ico create mode 100644 mozilla/embedding/tests/MSDotNETCSEmbed/AssemblyInfo.cs create mode 100644 mozilla/embedding/tests/MSDotNETCSEmbed/MSDotNETCSEmbed.csproj create mode 100644 mozilla/embedding/tests/MSDotNETCSEmbed/MSDotNETCSEmbed.csproj.user create mode 100644 mozilla/embedding/tests/MSDotNETCSEmbed/MSDotNETCSEmbed.sln create mode 100644 mozilla/embedding/tests/MSDotNETCSEmbed/MSDotNETCSEmbed.suo create mode 100644 mozilla/embedding/tests/MSDotNETCSEmbed/MSDotNETCSEmbedForm.cs create mode 100644 mozilla/embedding/tests/MSDotNETCSEmbed/MSDotNETCSEmbedForm.resx diff --git a/mozilla/embedding/tests/MSDotNETCSEmbed/App.ico b/mozilla/embedding/tests/MSDotNETCSEmbed/App.ico new file mode 100644 index 0000000000000000000000000000000000000000..3a5525fd794f7a7c5c8e6187f470ea3af38cd2b6 GIT binary patch literal 1078 zcmeHHJr05}7=1t!Hp3A*8IHkVf+j?-!eHY14Gtcw1Eb*_9>Bq^zETJ@GKj{_2j4$w zo9}xCh!8{T3=X##Skq>ikMjsvB|y%crWBM2iW(4pI}c%z6%lW!=~4v77#3{z!dmB1 z__&l)-{KUYR+|8|;wB^R|9ET$J@(@=#rd^=)qs85?vAy(PSF5CyNkus435LVkZ$rj zNw|JG-P7^hF<(;#o*Vk}5R#e|^13tBbQkeF?djULtvqyxd3<{9 literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..55cd36174a2fa2f7b529291a205de6b647b56c03 GIT binary patch literal 7168 zcmeHL-A^1<6hFHKTM$~>N~x`_BbJJ_Y_?@fDO3{JU9<_?R-i(ZmxUd+OP3w8I}~W? zn-50cP2bdKKN27Hp_=G}iD}vw-;A;T0al;%#p3UGXD&M(*k$=pqv1}@%>9~s?)kXC zb7t<}+xydppB;K2zS1K*B{jFq=lUsWt=C&{aJG%;WdOpNoK9I z5l>}oE6)ivkF8Z3wWepRoSAc$sUOMYQr29d$gJws;lu#n+a1kjX2z{#K4lDMa%pz$ ze8tR}`DB*$l_jvUYh68jpG(K2OU4v-C1n~XIR{KLfu&=rbpt4p#g#%hO18Ub@Ke`E~4(Z%t8xk#d!oevVpi)l}7Ze(of*uGH>po^vvQ2^BrOp zi=RKGHnE3m(1fMzL#vc7t&pEKSdaY7vF6<+{ruw?VZ51v7Bb3@%5f)F1_R{Hc*du@ zY}tp-?KsKLzhB9mg3np7O1^CDPS_(apkG$i=ZS%$kt1Ksdf_<0IMpHV27LQ>zWnZm?V1Ir=@H?Q=`13U89&;CCo{@$9b&PZ3>?C|4jb6qdJ>tIL zdocd1z~|n4!>cwAq4y0JATJ^NoPq~3)|HC!t1jYp9tHpXs57UlRDQ}nYX>}k>*dcFssBF`j|=cr zX3IAGkze5U3Mor>9NYkZuly@=tDvN|b1RtR@6D}5PMubHn*aX}{=}{~Pvctckux34 g(S8no7f|_gYcWUr;QZY>f`&JL?tzVak@fZe1$RIfHUIzs literal 0 HcmV?d00001 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