├── .gitignore
├── ChromeTest
├── ChromeTest.sln
└── ChromeTest
│ ├── App.config
│ ├── ChangeAddressForm.Designer.cs
│ ├── ChangeAddressForm.cs
│ ├── ChangeAddressForm.resx
│ ├── ChromeDevToolsSystemMenu.cs
│ ├── ChromeTest.csproj
│ ├── ChromeUtils.cs
│ ├── Demos
│ ├── BootStrapForm.Designer.cs
│ ├── BootStrapForm.cs
│ ├── BootStrapForm.resx
│ ├── BootStrapForm2.Designer.cs
│ ├── BootStrapForm2.cs
│ ├── BootStrapForm2.resx
│ ├── DemoLauncherForm.Designer.cs
│ ├── DemoLauncherForm.cs
│ ├── DemoLauncherForm.resx
│ ├── GenericHTMLForm.Designer.cs
│ ├── GenericHTMLForm.cs
│ └── GenericHTMLForm.resx
│ ├── FormTestJsCommunication.Designer.cs
│ ├── FormTestJsCommunication.cs
│ ├── FormTestJsCommunication.resx
│ ├── HTMLResources
│ ├── html
│ │ ├── BasicPage.html
│ │ ├── BootstrapExample.html
│ │ ├── BootstrapFormExample.html
│ │ ├── BootstrapFormExample2.html
│ │ ├── WinformInteractionExample.html
│ │ ├── amChartExample.html
│ │ ├── canvas-bubbles-with-bootstrap.html
│ │ ├── canvas-bubbles.html
│ │ ├── canvas-particle.html
│ │ ├── css3-demo.html
│ │ └── starter-template.css
│ ├── js
│ │ └── bubbles
│ │ │ ├── bubbles.js
│ │ │ └── index.php
│ └── libs
│ │ ├── amcharts
│ │ ├── amcharts.js
│ │ ├── amstock.js
│ │ ├── serial.js
│ │ ├── style.css
│ │ └── themes
│ │ │ ├── black.js
│ │ │ ├── chalk.js
│ │ │ ├── dark.js
│ │ │ ├── light.js
│ │ │ └── patterns.js
│ │ ├── bootstrap
│ │ ├── css
│ │ │ ├── bootstrap-theme.css
│ │ │ ├── bootstrap-theme.css.map
│ │ │ ├── bootstrap-theme.min.css
│ │ │ ├── bootstrap.css
│ │ │ ├── bootstrap.css.map
│ │ │ └── bootstrap.min.css
│ │ ├── fonts
│ │ │ ├── glyphicons-halflings-regular.eot
│ │ │ ├── glyphicons-halflings-regular.svg
│ │ │ ├── glyphicons-halflings-regular.ttf
│ │ │ ├── glyphicons-halflings-regular.woff
│ │ │ └── glyphicons-halflings-regular.woff2
│ │ └── js
│ │ │ ├── bootstrap.js
│ │ │ ├── bootstrap.min.js
│ │ │ └── npm.js
│ │ └── jquery
│ │ └── jquery-2.1.3.min.js
│ ├── JavaScriptInteractionObj.cs
│ ├── MainForm.Designer.cs
│ ├── MainForm.cs
│ ├── MainForm.resx
│ ├── Program.cs
│ ├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
│ └── packages.config
├── README.md
└── Screenshots
├── image001.gif
└── image002.png
/.gitignore:
--------------------------------------------------------------------------------
1 | /ChromeTest/packages
2 | /ChromeTest/ChromeTest/bin
3 | /ChromeTest/*.suo
4 | /ChromeTest/ChromeTest/obj
5 |
--------------------------------------------------------------------------------
/ChromeTest/ChromeTest.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2013
4 | VisualStudioVersion = 12.0.40629.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChromeTest", "ChromeTest\ChromeTest.csproj", "{2E1427FD-050E-44B6-8E15-0504630C3F40}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|x64 = Debug|x64
11 | Debug|x86 = Debug|x86
12 | Release|x64 = Release|x64
13 | Release|x86 = Release|x86
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {2E1427FD-050E-44B6-8E15-0504630C3F40}.Debug|x64.ActiveCfg = Debug|x64
17 | {2E1427FD-050E-44B6-8E15-0504630C3F40}.Debug|x64.Build.0 = Debug|x64
18 | {2E1427FD-050E-44B6-8E15-0504630C3F40}.Debug|x86.ActiveCfg = Debug|x86
19 | {2E1427FD-050E-44B6-8E15-0504630C3F40}.Debug|x86.Build.0 = Debug|x86
20 | {2E1427FD-050E-44B6-8E15-0504630C3F40}.Release|x64.ActiveCfg = Release|x64
21 | {2E1427FD-050E-44B6-8E15-0504630C3F40}.Release|x64.Build.0 = Release|x64
22 | {2E1427FD-050E-44B6-8E15-0504630C3F40}.Release|x86.ActiveCfg = Release|x86
23 | {2E1427FD-050E-44B6-8E15-0504630C3F40}.Release|x86.Build.0 = Release|x86
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | EndGlobal
29 |
--------------------------------------------------------------------------------
/ChromeTest/ChromeTest/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/ChromeTest/ChromeTest/ChangeAddressForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace ChromeTest
2 | {
3 | partial class ChangeAddressForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.buttonOK = new System.Windows.Forms.Button();
32 | this.textBoxAddress = new System.Windows.Forms.TextBox();
33 | this.label1 = new System.Windows.Forms.Label();
34 | this.SuspendLayout();
35 | //
36 | // buttonOK
37 | //
38 | this.buttonOK.Location = new System.Drawing.Point(237, 58);
39 | this.buttonOK.Name = "buttonOK";
40 | this.buttonOK.Size = new System.Drawing.Size(75, 23);
41 | this.buttonOK.TabIndex = 0;
42 | this.buttonOK.Text = "OK";
43 | this.buttonOK.UseVisualStyleBackColor = true;
44 | this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
45 | //
46 | // textBoxAddress
47 | //
48 | this.textBoxAddress.Location = new System.Drawing.Point(50, 25);
49 | this.textBoxAddress.Name = "textBoxAddress";
50 | this.textBoxAddress.Size = new System.Drawing.Size(262, 20);
51 | this.textBoxAddress.TabIndex = 1;
52 | this.textBoxAddress.Text = "https://html5test.com/";
53 | //
54 | // label1
55 | //
56 | this.label1.AutoSize = true;
57 | this.label1.Location = new System.Drawing.Point(12, 28);
58 | this.label1.Name = "label1";
59 | this.label1.Size = new System.Drawing.Size(32, 13);
60 | this.label1.TabIndex = 2;
61 | this.label1.Text = "URL:";
62 | //
63 | // ChangeAddressForm
64 | //
65 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
66 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
67 | this.ClientSize = new System.Drawing.Size(330, 93);
68 | this.Controls.Add(this.label1);
69 | this.Controls.Add(this.textBoxAddress);
70 | this.Controls.Add(this.buttonOK);
71 | this.Name = "ChangeAddressForm";
72 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
73 | this.Text = "ChangeAddressForm";
74 | this.Load += new System.EventHandler(this.ChangeAddressForm_Load);
75 | this.ResumeLayout(false);
76 | this.PerformLayout();
77 |
78 | }
79 |
80 | #endregion
81 |
82 | private System.Windows.Forms.Button buttonOK;
83 | public System.Windows.Forms.TextBox textBoxAddress;
84 | private System.Windows.Forms.Label label1;
85 | }
86 | }
--------------------------------------------------------------------------------
/ChromeTest/ChromeTest/ChangeAddressForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace ChromeTest
12 | {
13 | public partial class ChangeAddressForm : Form
14 | {
15 | public ChangeAddressForm()
16 | {
17 | InitializeComponent();
18 | }
19 |
20 | private void buttonOK_Click(object sender, EventArgs e)
21 | {
22 | DialogResult = System.Windows.Forms.DialogResult.OK;
23 | }
24 |
25 | private void ChangeAddressForm_Load(object sender, EventArgs e)
26 | {
27 |
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/ChromeTest/ChromeTest/ChangeAddressForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/ChromeTest/ChromeTest/ChromeDevToolsSystemMenu.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Runtime.InteropServices;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using System.Windows.Forms;
8 |
9 | namespace ChromeTest
10 | {
11 | static class ChromeDevToolsSystemMenu
12 | {
13 | // P/Invoke constants
14 | public static int WM_SYSCOMMAND = 0x112;
15 | public static int MF_STRING = 0x0;
16 | public static int MF_SEPARATOR = 0x800;
17 |
18 | // P/Invoke declarations
19 | [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
20 | private static extern IntPtr GetSystemMenu(IntPtr hWnd, bool bRevert);
21 |
22 | [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
23 | private static extern bool AppendMenu(IntPtr hMenu, int uFlags, int uIDNewItem, string lpNewItem);
24 |
25 | [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
26 | private static extern bool InsertMenu(IntPtr hMenu, int uPosition, int uFlags, int uIDNewItem, string lpNewItem);
27 |
28 | // ID for the Chrome dev tools item on the system menu
29 | public static int SYSMENU_CHROME_DEV_TOOLS = 0x1;
30 |
31 | public static void CreateSysMenu(Form frm)
32 | {
33 | // in your form override the OnHandleCreated function and call this method e.g:
34 | // protected override void OnHandleCreated(EventArgs e)
35 | // {
36 | // ChromeDevToolsSystemMenu.CreateSysMenu(frm,e);
37 | // }
38 |
39 | // Get a handle to a copy of this form's system (window) menu
40 | IntPtr hSysMenu = GetSystemMenu(frm.Handle, false);
41 |
42 | // Add a separator
43 | AppendMenu(hSysMenu, MF_SEPARATOR, 0, string.Empty);
44 |
45 | // Add the About menu item
46 | AppendMenu(hSysMenu, MF_STRING, SYSMENU_CHROME_DEV_TOOLS, "&Chrome Dev Tools");
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/ChromeTest/ChromeTest/ChromeTest.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Debug
8 | AnyCPU
9 | {2E1427FD-050E-44B6-8E15-0504630C3F40}
10 | WinExe
11 | Properties
12 | ChromeTest
13 | ChromeTest
14 | v4.5
15 | 512
16 | publish\
17 | true
18 | Disk
19 | false
20 | Foreground
21 | 7
22 | Days
23 | false
24 | false
25 | true
26 | 0
27 | 1.0.0.%2a
28 | false
29 | false
30 | true
31 | f9934477
32 |
33 |
34 | x86
35 | true
36 | full
37 | false
38 | bin\Debug\
39 | DEBUG;TRACE
40 | prompt
41 | 4
42 |
43 |
44 | AnyCPU
45 | pdbonly
46 | true
47 | bin\Release\
48 | TRACE
49 | prompt
50 | 4
51 |
52 |
53 | true
54 | bin\x64\Debug\
55 | DEBUG;TRACE
56 | full
57 | x64
58 | prompt
59 | MinimumRecommendedRules.ruleset
60 | true
61 |
62 |
63 | bin\x64\Release\
64 | TRACE
65 | true
66 | pdbonly
67 | x64
68 | prompt
69 | MinimumRecommendedRules.ruleset
70 | true
71 |
72 |
73 | true
74 | bin\x86\Debug\
75 | DEBUG;TRACE
76 | full
77 | x86
78 | prompt
79 | MinimumRecommendedRules.ruleset
80 | true
81 |
82 |
83 | bin\x86\Release\
84 | TRACE
85 | true
86 | pdbonly
87 | x86
88 | prompt
89 | MinimumRecommendedRules.ruleset
90 | true
91 |
92 |
93 |
94 | ..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | Form
110 |
111 |
112 | ChangeAddressForm.cs
113 |
114 |
115 |
116 |
117 | Form
118 |
119 |
120 | BootStrapForm.cs
121 |
122 |
123 | Form
124 |
125 |
126 | BootStrapForm2.cs
127 |
128 |
129 | Form
130 |
131 |
132 | DemoLauncherForm.cs
133 |
134 |
135 | Form
136 |
137 |
138 | GenericHTMLForm.cs
139 |
140 |
141 | Form
142 |
143 |
144 | MainForm.cs
145 |
146 |
147 | Form
148 |
149 |
150 | FormTestJsCommunication.cs
151 |
152 |
153 |
154 |
155 |
156 | ChangeAddressForm.cs
157 |
158 |
159 | BootStrapForm.cs
160 |
161 |
162 | BootStrapForm2.cs
163 |
164 |
165 | DemoLauncherForm.cs
166 |
167 |
168 | GenericHTMLForm.cs
169 |
170 |
171 | MainForm.cs
172 |
173 |
174 | FormTestJsCommunication.cs
175 |
176 |
177 | ResXFileCodeGenerator
178 | Resources.Designer.cs
179 | Designer
180 |
181 |
182 | True
183 | Resources.resx
184 |
185 |
186 | Always
187 |
188 |
189 | Always
190 |
191 |
192 | Always
193 |
194 |
195 | Always
196 |
197 |
198 | Always
199 |
200 |
201 | Always
202 |
203 |
204 | Always
205 |
206 |
207 | Always
208 |
209 |
210 | Always
211 |
212 |
213 | Always
214 |
215 |
216 | Always
217 |
218 |
219 | Always
220 |
221 |
222 | Always
223 |
224 |
225 | Always
226 |
227 |
228 | Always
229 |
230 |
231 | Always
232 |
233 |
234 | Always
235 |
236 |
237 | Always
238 |
239 |
240 | Always
241 |
242 |
243 | Always
244 |
245 |
246 | Always
247 |
248 |
249 | Always
250 |
251 |
252 | Always
253 |
254 |
255 |
256 |
257 | SettingsSingleFileGenerator
258 | Settings.Designer.cs
259 |
260 |
261 | True
262 | Settings.settings
263 | True
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 | False
272 | Microsoft .NET Framework 4.5 %28x86 and x64%29
273 | true
274 |
275 |
276 | False
277 | .NET Framework 3.5 SP1 Client Profile
278 | false
279 |
280 |
281 | False
282 | .NET Framework 3.5 SP1
283 | false
284 |
285 |
286 |
287 |
288 |
289 | Always
290 |
291 |
292 | Always
293 |
294 |
295 | Always
296 |
297 |
298 | Always
299 |
300 |
301 | Always
302 |
303 |
304 | Always
305 |
306 |
307 | Always
308 |
309 |
310 | Always
311 |
312 |
313 | Always
314 |
315 |
316 | Always
317 |
318 |
319 | Always
320 |
321 |
322 |
323 |
324 |
325 |
326 | This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
327 |
328 |
329 |
330 |
331 |
332 |
333 |
334 |
335 |
336 |
343 |
--------------------------------------------------------------------------------
/ChromeTest/ChromeTest/ChromeUtils.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Runtime.InteropServices;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace ChromeTest
9 | {
10 | class ChromeUtils
11 | {
12 | // P/Invoke constants
13 | private const int WM_SYSCOMMAND = 0x112;
14 | private const int MF_STRING = 0x0;
15 | private const int MF_SEPARATOR = 0x800;
16 |
17 | // P/Invoke declarations
18 | [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
19 | private static extern IntPtr GetSystemMenu(IntPtr hWnd, bool bRevert);
20 |
21 | [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
22 | private static extern bool AppendMenu(IntPtr hMenu, int uFlags, int uIDNewItem, string lpNewItem);
23 |
24 | [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
25 | private static extern bool InsertMenu(IntPtr hMenu, int uPosition, int uFlags, int uIDNewItem, string lpNewItem);
26 |
27 | // ID for the Chrome dev tools item on the system menu
28 | private int SYSMENU_CHROME_DEV_TOOLS = 0x1;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/ChromeTest/ChromeTest/Demos/BootStrapForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace ChromeTest.Demos
2 | {
3 | partial class BootStrapForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.SuspendLayout();
32 | //
33 | // BootStrapForm
34 | //
35 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
36 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
37 | this.ClientSize = new System.Drawing.Size(584, 309);
38 | this.Name = "BootStrapForm";
39 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
40 | this.Text = "BootStrapForm";
41 | this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.BootStrapForm_FormClosing);
42 | this.Load += new System.EventHandler(this.BootStrapForm_Load);
43 | this.ResumeLayout(false);
44 |
45 | }
46 |
47 | #endregion
48 | }
49 | }
--------------------------------------------------------------------------------
/ChromeTest/ChromeTest/Demos/BootStrapForm.cs:
--------------------------------------------------------------------------------
1 | using CefSharp;
2 | using CefSharp.WinForms;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.ComponentModel;
6 | using System.Data;
7 | using System.Drawing;
8 | using System.Linq;
9 | using System.Text;
10 | using System.Threading.Tasks;
11 | using System.Windows.Forms;
12 |
13 | namespace ChromeTest.Demos
14 | {
15 | public partial class BootStrapForm : Form
16 | {
17 | ChromiumWebBrowser m_chromeBrowser = null;
18 |
19 | public BootStrapForm()
20 | {
21 | InitializeComponent();
22 | }
23 |
24 | private void BootStrapForm_Load(object sender, EventArgs e)
25 | {
26 | // Cef.Initialize();
27 |
28 | string page = string.Format("{0}HTMLResources/html/BootstrapExample.html", GetAppLocation());
29 | m_chromeBrowser = new ChromiumWebBrowser(page);
30 |
31 | Controls.Add(m_chromeBrowser);
32 |
33 | ChromeDevToolsSystemMenu.CreateSysMenu(this);
34 | }
35 |
36 | protected override void WndProc(ref Message m)
37 | {
38 | base.WndProc(ref m);
39 |
40 | // Test if the About item was selected from the system menu
41 | if ((m.Msg == ChromeDevToolsSystemMenu.WM_SYSCOMMAND) && ((int)m.WParam == ChromeDevToolsSystemMenu.SYSMENU_CHROME_DEV_TOOLS))
42 | {
43 | m_chromeBrowser.ShowDevTools();
44 | }
45 | }
46 |
47 | private void BootStrapForm_FormClosing(object sender, FormClosingEventArgs e)
48 | {
49 | //Cef.Shutdown();
50 | }
51 |
52 | public static string GetAppLocation()
53 | {
54 | return AppDomain.CurrentDomain.BaseDirectory;
55 | }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/ChromeTest/ChromeTest/Demos/BootStrapForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/ChromeTest/ChromeTest/Demos/BootStrapForm2.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace ChromeTest.Demos
2 | {
3 | partial class BootStrapForm2
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.SuspendLayout();
32 | //
33 | // BootStrapForm2
34 | //
35 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
36 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
37 | this.ClientSize = new System.Drawing.Size(549, 341);
38 | this.Name = "BootStrapForm2";
39 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
40 | this.Text = "BootStrapForm2";
41 | this.Load += new System.EventHandler(this.BootStrapForm2_Load);
42 | this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.BootStrapForm2_KeyDown);
43 | this.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.BootStrapForm2_PreviewKeyDown);
44 | this.ResumeLayout(false);
45 |
46 | }
47 |
48 | #endregion
49 | }
50 | }
--------------------------------------------------------------------------------
/ChromeTest/ChromeTest/Demos/BootStrapForm2.cs:
--------------------------------------------------------------------------------
1 | using CefSharp;
2 | using CefSharp.WinForms;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.ComponentModel;
6 | using System.Data;
7 | using System.Drawing;
8 | using System.Linq;
9 | using System.Text;
10 | using System.Threading.Tasks;
11 | using System.Windows.Forms;
12 |
13 | namespace ChromeTest.Demos
14 | {
15 | public partial class BootStrapForm2 : Form
16 | {
17 | ChromiumWebBrowser m_chromeBrowser = null;
18 |
19 | SomeClass m_javascriptSvc = null;
20 |
21 | public BootStrapForm2()
22 | {
23 | InitializeComponent();
24 | this.KeyPreview = true;
25 | }
26 |
27 | public static string GetAppLocation()
28 | {
29 | return AppDomain.CurrentDomain.BaseDirectory;
30 | }
31 |
32 | private void BootStrapForm2_Load(object sender, EventArgs e)
33 | {
34 | string page = string.Format("{0}HTMLResources/html/BootstrapFormExample.html", GetAppLocation());
35 | m_chromeBrowser = new ChromiumWebBrowser(page);
36 | m_javascriptSvc = new SomeClass(m_chromeBrowser);
37 |
38 |
39 | // Register the JavaScriptInteractionObj class with JS
40 | m_chromeBrowser.RegisterJsObject("winformObj", m_javascriptSvc);
41 |
42 | Controls.Add(m_chromeBrowser);
43 |
44 | ChromeDevToolsSystemMenu.CreateSysMenu(this);
45 | }
46 |
47 | protected override void WndProc(ref Message m)
48 | {
49 | base.WndProc(ref m);
50 |
51 | // Test if the About item was selected from the system menu
52 | if ((m.Msg == ChromeDevToolsSystemMenu.WM_SYSCOMMAND) && ((int)m.WParam == ChromeDevToolsSystemMenu.SYSMENU_CHROME_DEV_TOOLS))
53 | {
54 | m_chromeBrowser.ShowDevTools();
55 | }
56 | }
57 |
58 | private void BootStrapForm2_KeyPress(object sender, KeyPressEventArgs e)
59 | {
60 | }
61 |
62 | private void BootStrapForm2_KeyDown(object sender, KeyEventArgs e)
63 | {
64 | if (e.KeyCode == Keys.F12)
65 | {
66 | m_chromeBrowser.ShowDevTools();
67 | }
68 | }
69 |
70 | private void BootStrapForm2_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
71 | {
72 |
73 | }
74 | }
75 |
76 | public class SomeClass
77 | {
78 | public Person m_theMan = null;
79 |
80 | [JavascriptIgnore]
81 | public ChromiumWebBrowser m_chromeBrowser { get; set; }
82 |
83 | public SomeClass(ChromiumWebBrowser webBrwsr )
84 | {
85 | m_chromeBrowser = webBrwsr;
86 | }
87 |
88 | public string SomeFunction()
89 | {
90 | return "yippieee";
91 | }
92 |
93 | public void ButtonPressed(string buttonName)
94 | {
95 | //MessageBox.Show(string.Format("Message box from C# winforms. Msg: {0}", buttonName));
96 |
97 | // var script = "document.body.style.backgroundColor = 'red';";
98 | //var script = "$('#inputEmail').val('a@a.com');";
99 |
100 | // var script = "var x = 1234";
101 | var script = "msgBoxFromJavaScript();";
102 |
103 | m_chromeBrowser.ExecuteScriptAsync(script);
104 |
105 | }
106 | }
107 | }
108 |
--------------------------------------------------------------------------------
/ChromeTest/ChromeTest/Demos/BootStrapForm2.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/ChromeTest/ChromeTest/Demos/DemoLauncherForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace ChromeTest.Demos
2 | {
3 | partial class DemoLauncherForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.buttonBootstrapDemo1 = new System.Windows.Forms.Button();
32 | this.buttonBootstrapDemo2 = new System.Windows.Forms.Button();
33 | this.buttonAmChartsDemo = new System.Windows.Forms.Button();
34 | this.buttonWebGLDemo = new System.Windows.Forms.Button();
35 | this.buttonCanvasParticleDemo = new System.Windows.Forms.Button();
36 | this.buttonJQWidgetsDemo = new System.Windows.Forms.Button();
37 | this.buttonCanvasBubblesDemo = new System.Windows.Forms.Button();
38 | this.buttonBootStrapDemo3 = new System.Windows.Forms.Button();
39 | this.SuspendLayout();
40 | //
41 | // buttonBootstrapDemo1
42 | //
43 | this.buttonBootstrapDemo1.Location = new System.Drawing.Point(39, 18);
44 | this.buttonBootstrapDemo1.Name = "buttonBootstrapDemo1";
45 | this.buttonBootstrapDemo1.Size = new System.Drawing.Size(180, 51);
46 | this.buttonBootstrapDemo1.TabIndex = 0;
47 | this.buttonBootstrapDemo1.Text = "Bootstrap Landing Page Demo 1";
48 | this.buttonBootstrapDemo1.UseVisualStyleBackColor = true;
49 | this.buttonBootstrapDemo1.Click += new System.EventHandler(this.buttonBootstrapDemo1_Click);
50 | //
51 | // buttonBootstrapDemo2
52 | //
53 | this.buttonBootstrapDemo2.Location = new System.Drawing.Point(39, 91);
54 | this.buttonBootstrapDemo2.Name = "buttonBootstrapDemo2";
55 | this.buttonBootstrapDemo2.Size = new System.Drawing.Size(180, 46);
56 | this.buttonBootstrapDemo2.TabIndex = 1;
57 | this.buttonBootstrapDemo2.Text = "Bootstrap Form Entry Demo 2";
58 | this.buttonBootstrapDemo2.UseVisualStyleBackColor = true;
59 | this.buttonBootstrapDemo2.Click += new System.EventHandler(this.buttonBootstrapDemo2_Click);
60 | //
61 | // buttonAmChartsDemo
62 | //
63 | this.buttonAmChartsDemo.Location = new System.Drawing.Point(458, 88);
64 | this.buttonAmChartsDemo.Name = "buttonAmChartsDemo";
65 | this.buttonAmChartsDemo.Size = new System.Drawing.Size(180, 46);
66 | this.buttonAmChartsDemo.TabIndex = 3;
67 | this.buttonAmChartsDemo.Text = "AM Charts Demo";
68 | this.buttonAmChartsDemo.UseVisualStyleBackColor = true;
69 | this.buttonAmChartsDemo.Click += new System.EventHandler(this.buttonAmChartsDemo_Click);
70 | //
71 | // buttonWebGLDemo
72 | //
73 | this.buttonWebGLDemo.Location = new System.Drawing.Point(250, 16);
74 | this.buttonWebGLDemo.Name = "buttonWebGLDemo";
75 | this.buttonWebGLDemo.Size = new System.Drawing.Size(180, 46);
76 | this.buttonWebGLDemo.TabIndex = 5;
77 | this.buttonWebGLDemo.Text = "WebGL Demo";
78 | this.buttonWebGLDemo.UseVisualStyleBackColor = true;
79 | this.buttonWebGLDemo.Click += new System.EventHandler(this.buttonWebGLDemo_Click);
80 | //
81 | // buttonCanvasParticleDemo
82 | //
83 | this.buttonCanvasParticleDemo.Location = new System.Drawing.Point(250, 88);
84 | this.buttonCanvasParticleDemo.Name = "buttonCanvasParticleDemo";
85 | this.buttonCanvasParticleDemo.Size = new System.Drawing.Size(180, 46);
86 | this.buttonCanvasParticleDemo.TabIndex = 6;
87 | this.buttonCanvasParticleDemo.Text = "Canvas Particle Demo";
88 | this.buttonCanvasParticleDemo.UseVisualStyleBackColor = true;
89 | this.buttonCanvasParticleDemo.Click += new System.EventHandler(this.buttonCanvasParticleDemo_Click);
90 | //
91 | // buttonJQWidgetsDemo
92 | //
93 | this.buttonJQWidgetsDemo.Location = new System.Drawing.Point(250, 163);
94 | this.buttonJQWidgetsDemo.Name = "buttonJQWidgetsDemo";
95 | this.buttonJQWidgetsDemo.Size = new System.Drawing.Size(180, 46);
96 | this.buttonJQWidgetsDemo.TabIndex = 7;
97 | this.buttonJQWidgetsDemo.Text = "JQWidgets Demo";
98 | this.buttonJQWidgetsDemo.UseVisualStyleBackColor = true;
99 | //
100 | // buttonCanvasBubblesDemo
101 | //
102 | this.buttonCanvasBubblesDemo.Location = new System.Drawing.Point(458, 16);
103 | this.buttonCanvasBubblesDemo.Name = "buttonCanvasBubblesDemo";
104 | this.buttonCanvasBubblesDemo.Size = new System.Drawing.Size(180, 46);
105 | this.buttonCanvasBubblesDemo.TabIndex = 8;
106 | this.buttonCanvasBubblesDemo.Text = "Canvas Bubbles Demo";
107 | this.buttonCanvasBubblesDemo.UseVisualStyleBackColor = true;
108 | this.buttonCanvasBubblesDemo.Click += new System.EventHandler(this.buttonCanvasBubblesDemo_Click);
109 | //
110 | // buttonBootStrapDemo3
111 | //
112 | this.buttonBootStrapDemo3.Location = new System.Drawing.Point(39, 163);
113 | this.buttonBootStrapDemo3.Name = "buttonBootStrapDemo3";
114 | this.buttonBootStrapDemo3.Size = new System.Drawing.Size(180, 46);
115 | this.buttonBootStrapDemo3.TabIndex = 9;
116 | this.buttonBootStrapDemo3.Text = "Bootstrap Form Entry Demo 3";
117 | this.buttonBootStrapDemo3.UseVisualStyleBackColor = true;
118 | this.buttonBootStrapDemo3.Click += new System.EventHandler(this.buttonBootStrapDemo3_Click);
119 | //
120 | // DemoLauncherForm
121 | //
122 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
123 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
124 | this.ClientSize = new System.Drawing.Size(691, 243);
125 | this.Controls.Add(this.buttonBootStrapDemo3);
126 | this.Controls.Add(this.buttonCanvasBubblesDemo);
127 | this.Controls.Add(this.buttonJQWidgetsDemo);
128 | this.Controls.Add(this.buttonCanvasParticleDemo);
129 | this.Controls.Add(this.buttonWebGLDemo);
130 | this.Controls.Add(this.buttonAmChartsDemo);
131 | this.Controls.Add(this.buttonBootstrapDemo2);
132 | this.Controls.Add(this.buttonBootstrapDemo1);
133 | this.Name = "DemoLauncherForm";
134 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
135 | this.Text = "DemoLauncherForm";
136 | this.Load += new System.EventHandler(this.DemoLauncherForm_Load);
137 | this.ResumeLayout(false);
138 |
139 | }
140 |
141 | #endregion
142 |
143 | private System.Windows.Forms.Button buttonBootstrapDemo1;
144 | private System.Windows.Forms.Button buttonBootstrapDemo2;
145 | private System.Windows.Forms.Button buttonAmChartsDemo;
146 | private System.Windows.Forms.Button buttonWebGLDemo;
147 | private System.Windows.Forms.Button buttonCanvasParticleDemo;
148 | private System.Windows.Forms.Button buttonJQWidgetsDemo;
149 | private System.Windows.Forms.Button buttonCanvasBubblesDemo;
150 | private System.Windows.Forms.Button buttonBootStrapDemo3;
151 | }
152 | }
--------------------------------------------------------------------------------
/ChromeTest/ChromeTest/Demos/DemoLauncherForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace ChromeTest.Demos
12 | {
13 | public partial class DemoLauncherForm : Form
14 | {
15 | public DemoLauncherForm()
16 | {
17 | InitializeComponent();
18 | }
19 |
20 | public static string GetAppLocation()
21 | {
22 | return AppDomain.CurrentDomain.BaseDirectory;
23 | }
24 |
25 | private void buttonBootstrapDemo1_Click(object sender, EventArgs e)
26 | {
27 | BootStrapForm form = new BootStrapForm();
28 | if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
29 | {
30 | MessageBox.Show("user pressed ok");
31 | }
32 | }
33 |
34 | private void buttonBootstrapDemo2_Click(object sender, EventArgs e)
35 | {
36 | BootStrapForm2 form = new BootStrapForm2();
37 | if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
38 | {
39 | MessageBox.Show("user pressed ok");
40 | }
41 | }
42 |
43 | private void DemoLauncherForm_Load(object sender, EventArgs e)
44 | {
45 |
46 | }
47 |
48 | private void buttonGenericHTMLForm_Click(object sender, EventArgs e)
49 | {
50 |
51 | }
52 |
53 | private void buttonCanvasParticleDemo_Click(object sender, EventArgs e)
54 | {
55 | string page = string.Format("{0}HTMLResources/html/canvas-particle.html", GetAppLocation());
56 |
57 | GenericHTMLForm form = new GenericHTMLForm("Canvas Particle Example", page);
58 | if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
59 | {
60 | MessageBox.Show("user pressed ok");
61 | }
62 | }
63 |
64 | private void buttonCanvasBubblesDemo_Click(object sender, EventArgs e)
65 | {
66 | string page = string.Format("{0}HTMLResources/html/canvas-bubbles.html", GetAppLocation());
67 |
68 | GenericHTMLForm form = new GenericHTMLForm("Canvas Bubbles Example", page);
69 | if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
70 | {
71 | MessageBox.Show("user pressed ok");
72 | }
73 | }
74 |
75 | private void buttonCSS3Demo_Click(object sender, EventArgs e)
76 | {
77 | GenericHTMLForm form = new GenericHTMLForm("CSS3 Demo", "http://daneden.github.io/animate.css/");
78 | if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
79 | {
80 | MessageBox.Show("user pressed ok");
81 | }
82 | }
83 |
84 | private void buttonWebGLDemo_Click(object sender, EventArgs e)
85 | {
86 | GenericHTMLForm form = new GenericHTMLForm("WebGL Demo", "http://www.bongiovi.tw/experiments/webgl/blossom/");// "http://myshards.com/");
87 | if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
88 | {
89 | MessageBox.Show("user pressed ok");
90 | }
91 | }
92 |
93 | private void buttonBootStrapDemo3_Click(object sender, EventArgs e)
94 | {
95 | string page = string.Format("{0}HTMLResources/html/BootstrapFormExample2.html", GetAppLocation());
96 |
97 | GenericHTMLForm form = new GenericHTMLForm("Bootstrap Form Example", page);
98 | if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
99 | {
100 | MessageBox.Show("user pressed ok");
101 | }
102 | }
103 |
104 | private void buttonAmChartsDemo_Click(object sender, EventArgs e)
105 | {
106 | string page = string.Format("{0}HTMLResources/html/amChartExample.html", GetAppLocation());
107 |
108 | GenericHTMLForm form = new GenericHTMLForm("AM Chart Example", page);
109 | if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
110 | {
111 | MessageBox.Show("user pressed ok");
112 | }
113 | }
114 | }
115 | }
116 |
--------------------------------------------------------------------------------
/ChromeTest/ChromeTest/Demos/DemoLauncherForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/ChromeTest/ChromeTest/Demos/GenericHTMLForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace ChromeTest.Demos
2 | {
3 | partial class GenericHTMLForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.SuspendLayout();
32 | //
33 | // GenericHTMLForm
34 | //
35 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
36 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
37 | this.ClientSize = new System.Drawing.Size(599, 312);
38 | this.Name = "GenericHTMLForm";
39 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
40 | this.Text = "GenericHTMLForm";
41 | this.Load += new System.EventHandler(this.GenericHTMLForm_Load);
42 | this.ResumeLayout(false);
43 |
44 | }
45 |
46 | #endregion
47 | }
48 | }
--------------------------------------------------------------------------------
/ChromeTest/ChromeTest/Demos/GenericHTMLForm.cs:
--------------------------------------------------------------------------------
1 | using CefSharp;
2 | using CefSharp.WinForms;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.ComponentModel;
6 | using System.Data;
7 | using System.Drawing;
8 | using System.Linq;
9 | using System.Text;
10 | using System.Threading.Tasks;
11 | using System.Windows.Forms;
12 |
13 | namespace ChromeTest.Demos
14 | {
15 | public partial class GenericHTMLForm : Form
16 | {
17 | ChromiumWebBrowser m_chromeBrowser = null;
18 |
19 | string m_htmlToDisplay = "";
20 |
21 | public GenericHTMLForm(string formTitle, string htmlToDisplay)
22 | {
23 | InitializeComponent();
24 |
25 | this.Text = formTitle;
26 |
27 | m_htmlToDisplay = htmlToDisplay;
28 | }
29 |
30 | public static string GetAppLocation()
31 | {
32 | return AppDomain.CurrentDomain.BaseDirectory;
33 | }
34 |
35 | private void GenericHTMLForm_Load(object sender, EventArgs e)
36 | {
37 | m_chromeBrowser = new ChromiumWebBrowser(m_htmlToDisplay);
38 |
39 | Controls.Add(m_chromeBrowser);
40 |
41 | ChromeDevToolsSystemMenu.CreateSysMenu(this);
42 | }
43 |
44 | protected override void WndProc(ref Message m)
45 | {
46 | base.WndProc(ref m);
47 |
48 | // Test if the About item was selected from the system menu
49 | if ((m.Msg == ChromeDevToolsSystemMenu.WM_SYSCOMMAND) && ((int)m.WParam == ChromeDevToolsSystemMenu.SYSMENU_CHROME_DEV_TOOLS))
50 | {
51 | m_chromeBrowser.ShowDevTools();
52 | }
53 | }
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/ChromeTest/ChromeTest/Demos/GenericHTMLForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/ChromeTest/ChromeTest/FormTestJsCommunication.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace ChromeTest
2 | {
3 | partial class FormTestJsCommunication
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.panel1 = new System.Windows.Forms.Panel();
32 | this.SuspendLayout();
33 | //
34 | // panel1
35 | //
36 | this.panel1.Location = new System.Drawing.Point(12, 12);
37 | this.panel1.Name = "panel1";
38 | this.panel1.Size = new System.Drawing.Size(433, 328);
39 | this.panel1.TabIndex = 0;
40 | //
41 | // FormTestJsCommunication
42 | //
43 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
44 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
45 | this.ClientSize = new System.Drawing.Size(527, 352);
46 | this.Controls.Add(this.panel1);
47 | this.Name = "FormTestJsCommunication";
48 | this.Text = "FormTestJsCommunication";
49 | this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FormTestJsCommunication_FormClosing);
50 | this.Load += new System.EventHandler(this.FormTestJsCommunication_Load);
51 | this.ResumeLayout(false);
52 |
53 | }
54 |
55 | #endregion
56 |
57 | private System.Windows.Forms.Panel panel1;
58 | }
59 | }
--------------------------------------------------------------------------------
/ChromeTest/ChromeTest/FormTestJsCommunication.cs:
--------------------------------------------------------------------------------
1 | using CefSharp;
2 | using CefSharp.WinForms;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.ComponentModel;
6 | using System.Data;
7 | using System.Drawing;
8 | using System.Linq;
9 | using System.Text;
10 | using System.Threading.Tasks;
11 | using System.Windows.Forms;
12 |
13 | namespace ChromeTest
14 | {
15 | public partial class FormTestJsCommunication : Form
16 | {
17 | ChromiumWebBrowser m_chromeBrowser = null;
18 |
19 | public FormTestJsCommunication()
20 | {
21 | InitializeComponent();
22 | }
23 |
24 | private void FormTestJsCommunication_Load(object sender, EventArgs e)
25 | {
26 | Cef.Initialize();
27 | m_chromeBrowser = new ChromiumWebBrowser("http://www.maps.google.com");
28 |
29 | panel1.Controls.Add(m_chromeBrowser);
30 |
31 | }
32 |
33 | private void FormTestJsCommunication_FormClosing(object sender, FormClosingEventArgs e)
34 | {
35 | Cef.Shutdown();
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/ChromeTest/ChromeTest/FormTestJsCommunication.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/ChromeTest/ChromeTest/HTMLResources/html/BasicPage.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Title of the document
6 |
7 |
8 |
9 | Hey Hey there and Howdy!
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/ChromeTest/ChromeTest/HTMLResources/html/BootstrapExample.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | Starter Template for Bootstrap
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
45 |
46 |
47 |
48 |
49 |
Bootstrap starter template
50 |
Use this document as a way to quickly start any new project.
All you get is this text and a mostly barebones HTML document.
51 |
52 |
53 |
54 |
55 |
56 |
58 |
59 |
60 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/ChromeTest/ChromeTest/HTMLResources/html/BootstrapFormExample.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Example of Bootstrap 3 Horizontal Form Layout
6 |
7 |
8 |
9 |
10 |
19 |
20 |
21 |
52 |
53 |
54 |
69 |
70 |
--------------------------------------------------------------------------------
/ChromeTest/ChromeTest/HTMLResources/html/BootstrapFormExample2.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Example of Bootstrap 3 Horizontal Form Layout
6 |
7 |
8 |
9 |
10 |
19 |
20 |
21 |
101 |
102 |
200 |
201 |
202 |
217 |
218 |
--------------------------------------------------------------------------------
/ChromeTest/ChromeTest/HTMLResources/html/WinformInteractionExample.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | Results
16 |
17 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/ChromeTest/ChromeTest/HTMLResources/html/amChartExample.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
107 |
108 |
109 |
110 |
--------------------------------------------------------------------------------
/ChromeTest/ChromeTest/HTMLResources/html/canvas-bubbles-with-bootstrap.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | hehehe
30 |
31 |
32 |
33 |
34 |
35 |
51 |
52 |
--------------------------------------------------------------------------------
/ChromeTest/ChromeTest/HTMLResources/html/canvas-bubbles.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
36 |
37 |
--------------------------------------------------------------------------------
/ChromeTest/ChromeTest/HTMLResources/html/canvas-particle.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
16 |
17 |
18 |
19 |
20 |
21 |
123 |
124 |
--------------------------------------------------------------------------------
/ChromeTest/ChromeTest/HTMLResources/html/starter-template.css:
--------------------------------------------------------------------------------
1 | body {
2 | padding-top: 50px;
3 | }
4 | .starter-template {
5 | padding: 40px 15px;
6 | text-align: center;
7 | }
--------------------------------------------------------------------------------
/ChromeTest/ChromeTest/HTMLResources/js/bubbles/bubbles.js:
--------------------------------------------------------------------------------
1 | //linear//radial
2 | function bubblesMain(obj){
3 | bubbleResize();
4 | bubbles = new bubbleObject(obj);
5 | bubbles.createBubbles();
6 | setInterval(start,1000/60);
7 | };
8 |
9 | //WHEN WINDOW HEIGHT IS CHANGED, REMAKE THE CANVAS ELEMENT
10 | window.onresize = function(event) {
11 | bubbleResize();
12 | }
13 |
14 |
15 | function bubbleResize(){
16 | var height = parseInt(document.getElementById("canvasBubbles").clientHeight);
17 | var width = parseInt(document.getElementById("canvasBubbles").clientWidth);
18 | document.getElementById("canvasBubbles").innerHTML = '';
19 | }
20 |
21 | function start(){
22 |
23 | var canvas = document.getElementById("canvas");
24 | canvas.width = canvas.width;
25 | bubbles.move();
26 | bubbles.draw();
27 | };
28 |
29 | function bubbleObject(options){
30 | (options.type) ? this.type = options.type : this.type = "linear";
31 | if(this.type == "radial"){
32 | (options.revolve) ? this.revolve = options.revolve : this.revolve = "";
33 | }
34 | (options.opacity) ? this.opacity = options.opacity : this.opacity = .1;
35 | (options.colors) ? this.colors = options.colors : this.colors = new Array("#DDDDDD");
36 |
37 | (options.minSize) ? this.minSize = options.minSize : this.minSize = 20;
38 | (options.maxSize) ? this.maxSize = options.maxSize : this.maxSize = 100;
39 |
40 | //THIS WAS SUPPOSED TO BE FOR CHANGING COLORS
41 | /*if(options.changeColors){
42 | for(var i = 0;i 360){
182 | this.bubbles[i].degree = this.bubbles[i].degree - 360;
183 | }else if(this.bubbles[i].degree < 0){
184 | this.bubbles[i].degree = 360 - this.bubbles[i].degree;
185 | }
186 |
187 |
188 |
189 | //COLOR CHANGING
190 | /*if(this.changeColors != 0){
191 | var num = (Math.floor(Math.random()*(3-1+1)+1));
192 |
193 |
194 | var goToColor = this.changeColors[this.bubbles[i].colorType];
195 |
196 |
197 |
198 |
199 | var fastChanging = 1;
200 |
201 | switch(num){
202 | case 1 :
203 | if(goToColor.r > this.bubbles[i].color.r){
204 | this.bubbles[i].color.r+=fastChanging;
205 | }else if(goToColor.r < this.bubbles[i].color.r){
206 | this.bubbles[i].color.r-=fastChanging;
207 | }
208 | break;
209 | case 2 :
210 | if(goToColor.g > this.bubbles[i].color.g){
211 | this.bubbles[i].color.g+=fastChanging;
212 | }else if(goToColor.g < this.bubbles[i].color.g){
213 | this.bubbles[i].color.g-=fastChanging;
214 | }
215 | break;
216 | case 3 :
217 | if(goToColor.b > this.bubbles[i].color.b){
218 | this.bubbles[i].color.b+=fastChanging;
219 | }else if(goToColor.b < this.bubbles[i].color.b){
220 | this.bubbles[i].color.b-=fastChanging;
221 | }
222 | break;
223 | }
224 |
225 |
226 |
227 | }*/
228 |
229 | /*if(this.revolve != "center"){
230 | //RESET
231 |
232 | if(this.bubbles[i].degree >= maxDeg && this.bubbles[i].speed > 0){
233 | this.bubbles[i].degree = minDeg;
234 | }
235 |
236 | //RESET
237 | if(this.bubbles[i].degreen <= minDeg && this.bubbles[i].speed < 0){
238 | this.bubbles[i].degree = maxDeg;
239 | }
240 | }*/
241 | }
242 |
243 | }else if(this.type =="linear"){
244 | for(var i = 0;i this.bubbles[i].color.r){
263 | this.bubbles[i].color.r+=fastChanging;
264 | }else if(goToColor.r < this.bubbles[i].color.r){
265 | this.bubbles[i].color.r-=fastChanging;
266 | }
267 | break;
268 | case 2 :
269 | if(goToColor.g > this.bubbles[i].color.g){
270 | this.bubbles[i].color.g+=fastChanging;
271 | }else if(goToColor.g < this.bubbles[i].color.g){
272 | this.bubbles[i].color.g-=fastChanging;
273 | }
274 | break;
275 | case 3 :
276 | if(goToColor.b > this.bubbles[i].color.b){
277 | this.bubbles[i].color.b+=fastChanging;
278 | }else if(goToColor.b < this.bubbles[i].color.b){
279 | this.bubbles[i].color.b-=fastChanging;
280 | }
281 | break;
282 | }
283 |
284 |
285 | }
286 | */
287 | var width = window.innerWidth;
288 | var height = window.innerHeight;
289 |
290 | //RESET
291 | if(this.bubbles[i].y < (0 - this.bubbles[i].size) && this.bubbles[i].yVel < 0){
292 | //RESET Y-;
293 | this.bubbles[i].y = height;
294 | }else if(this.bubbles[i].y > (height + this.bubbles[i].size) && this.bubbles[i].yVel > 0){
295 | //RESET Y+
296 | this.bubbles[i].y = 0 - this.bubbles[i].size;
297 | }else if(this.bubbles[i].x < (0 - this.bubbles[i].size) && this.bubbles[i].xVel < 0){
298 | //RESET X+
299 | this.bubbles[i].x = width;
300 | }else if(this.bubbles[i].x > (width + this.bubbles[i].size) && this.bubbles[i].xVel > 0){
301 | //RESET X-;
302 | this.bubbles[i].x = 0 - this.bubbles[i].size;
303 | }
304 |
305 |
306 | }
307 | }
308 | }
309 |
310 | this.draw = function(){
311 | var canvas = document.getElementById("canvas");
312 | var ctx = canvas.getContext("2d");
313 | var len = this.bubbles.length;
314 | if(this.type == "radial"){
315 | for(var i = 0;i
2 |
3 |
27 |
28 |
29 |
30 |
31 |
50 |
51 |
52 |
83 |
84 |