commit e8d53be9a719c6357b422bb2053e8414ac0d73f0 Author: mjjo Date: Sat Jul 5 15:42:31 2014 +0000 diff --git a/Form1.Designer.cs b/Form1.Designer.cs new file mode 100644 index 0000000..9539abf --- /dev/null +++ b/Form1.Designer.cs @@ -0,0 +1,177 @@ +namespace MultitabBrowser +{ + partial class Form1 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if(disposing && (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() + { + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.webBrowser1 = new System.Windows.Forms.WebBrowser(); + this.splitContainer2 = new System.Windows.Forms.SplitContainer(); + this.webBrowser2 = new System.Windows.Forms.WebBrowser(); + this.splitContainer3 = new System.Windows.Forms.SplitContainer(); + this.webBrowser3 = new System.Windows.Forms.WebBrowser(); + this.webBrowser4 = new System.Windows.Forms.WebBrowser(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + this.splitContainer2.Panel1.SuspendLayout(); + this.splitContainer2.Panel2.SuspendLayout(); + this.splitContainer2.SuspendLayout(); + this.splitContainer3.Panel1.SuspendLayout(); + this.splitContainer3.Panel2.SuspendLayout(); + this.splitContainer3.SuspendLayout(); + this.SuspendLayout(); + // + // splitContainer1 + // + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer1.Location = new System.Drawing.Point(0, 0); + this.splitContainer1.Name = "splitContainer1"; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.webBrowser1); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.splitContainer2); + this.splitContainer1.Size = new System.Drawing.Size(848, 614); + this.splitContainer1.SplitterDistance = 203; + this.splitContainer1.TabIndex = 0; + // + // webBrowser1 + // + this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill; + this.webBrowser1.Location = new System.Drawing.Point(0, 0); + this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20); + this.webBrowser1.Name = "webBrowser1"; + this.webBrowser1.Size = new System.Drawing.Size(203, 614); + this.webBrowser1.TabIndex = 0; + this.webBrowser1.Url = new System.Uri("http://www.gagalive.kr/livechatr.swf", System.UriKind.Absolute); + this.webBrowser1.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.webBrowser1_PreviewKeyDown); + // + // splitContainer2 + // + this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer2.Location = new System.Drawing.Point(0, 0); + this.splitContainer2.Name = "splitContainer2"; + // + // splitContainer2.Panel1 + // + this.splitContainer2.Panel1.Controls.Add(this.webBrowser2); + // + // splitContainer2.Panel2 + // + this.splitContainer2.Panel2.Controls.Add(this.splitContainer3); + this.splitContainer2.Size = new System.Drawing.Size(641, 614); + this.splitContainer2.SplitterDistance = 219; + this.splitContainer2.TabIndex = 0; + // + // webBrowser2 + // + this.webBrowser2.Dock = System.Windows.Forms.DockStyle.Fill; + this.webBrowser2.Location = new System.Drawing.Point(0, 0); + this.webBrowser2.MinimumSize = new System.Drawing.Size(20, 20); + this.webBrowser2.Name = "webBrowser2"; + this.webBrowser2.Size = new System.Drawing.Size(219, 614); + this.webBrowser2.TabIndex = 0; + this.webBrowser2.Url = new System.Uri("http://www.gagalive.kr/livechatr.swf", System.UriKind.Absolute); + this.webBrowser2.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.webBrowser2_PreviewKeyDown); + // + // splitContainer3 + // + this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer3.Location = new System.Drawing.Point(0, 0); + this.splitContainer3.Name = "splitContainer3"; + // + // splitContainer3.Panel1 + // + this.splitContainer3.Panel1.Controls.Add(this.webBrowser3); + // + // splitContainer3.Panel2 + // + this.splitContainer3.Panel2.Controls.Add(this.webBrowser4); + this.splitContainer3.Size = new System.Drawing.Size(418, 614); + this.splitContainer3.SplitterDistance = 214; + this.splitContainer3.TabIndex = 0; + // + // webBrowser3 + // + this.webBrowser3.Dock = System.Windows.Forms.DockStyle.Fill; + this.webBrowser3.Location = new System.Drawing.Point(0, 0); + this.webBrowser3.MinimumSize = new System.Drawing.Size(20, 20); + this.webBrowser3.Name = "webBrowser3"; + this.webBrowser3.Size = new System.Drawing.Size(214, 614); + this.webBrowser3.TabIndex = 0; + this.webBrowser3.Url = new System.Uri("http://www.gagalive.kr/livechatr.swf", System.UriKind.Absolute); + this.webBrowser3.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.webBrowser3_PreviewKeyDown); + // + // webBrowser4 + // + this.webBrowser4.Dock = System.Windows.Forms.DockStyle.Fill; + this.webBrowser4.Location = new System.Drawing.Point(0, 0); + this.webBrowser4.MinimumSize = new System.Drawing.Size(20, 20); + this.webBrowser4.Name = "webBrowser4"; + this.webBrowser4.Size = new System.Drawing.Size(200, 614); + this.webBrowser4.TabIndex = 0; + this.webBrowser4.Url = new System.Uri("http://www.gagalive.kr/livechatr.swf", System.UriKind.Absolute); + this.webBrowser4.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.webBrowser4_PreviewKeyDown); + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(848, 614); + this.Controls.Add(this.splitContainer1); + this.Name = "Form1"; + this.Text = "Multi Viewer"; + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel2.ResumeLayout(false); + this.splitContainer1.ResumeLayout(false); + this.splitContainer2.Panel1.ResumeLayout(false); + this.splitContainer2.Panel2.ResumeLayout(false); + this.splitContainer2.ResumeLayout(false); + this.splitContainer3.Panel1.ResumeLayout(false); + this.splitContainer3.Panel2.ResumeLayout(false); + this.splitContainer3.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.SplitContainer splitContainer1; + private System.Windows.Forms.WebBrowser webBrowser1; + private System.Windows.Forms.SplitContainer splitContainer2; + private System.Windows.Forms.WebBrowser webBrowser2; + private System.Windows.Forms.SplitContainer splitContainer3; + private System.Windows.Forms.WebBrowser webBrowser3; + private System.Windows.Forms.WebBrowser webBrowser4; + + } +} + diff --git a/Form1.cs b/Form1.cs new file mode 100644 index 0000000..0cd5884 --- /dev/null +++ b/Form1.cs @@ -0,0 +1,118 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using System.Runtime.InteropServices; + +namespace MultitabBrowser +{ + public partial class Form1 : Form + { + [DllImport("user32.dll",CharSet=CharSet.Auto, CallingConvention=CallingConvention.StdCall)] + public static extern void mouse_event(uint dwFlags, int dx, int dy, uint cButtons, uint dwExtraInfo); + + private const int MOUSEEVENTF_MOVE = 0x01; + private const int MOUSEEVENTF_LEFTDOWN = 0x02; + private const int MOUSEEVENTF_LEFTUP = 0x04; + private const int MOUSEEVENTF_RIGHTDOWN = 0x08; + private const int MOUSEEVENTF_RIGHTUP = 0x10; + + + + public Form1() + { + InitializeComponent(); + } + + public void DoMouseClick(int iX, int iY) + { + //Call the imported function with the cursor's current position + mouse_event(MOUSEEVENTF_MOVE, -10000, -10000, 0, 0); + mouse_event(MOUSEEVENTF_MOVE, iX, iY, 0, 0); + mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP, iX, iY, 0, 0); + + } + + private void CheckKeyDown(PreviewKeyDownEventArgs e, int iViewIdx) + { + Console.WriteLine(iViewIdx); + + if((e.Modifiers & Keys.Control) == Keys.Control) + { + if(e.KeyCode == Keys.D1) + webBrowser1.Refresh(); + else if(e.KeyCode == Keys.D2) + webBrowser2.Refresh(); + else if(e.KeyCode == Keys.D3) + webBrowser3.Refresh(); + else if(e.KeyCode == Keys.D4) + webBrowser4.Refresh(); + + System.Windows.Forms.WebBrowser[] aWebView = { + webBrowser1, + webBrowser2, + webBrowser3, + webBrowser4 }; + + if(e.KeyCode == Keys.U || e.KeyCode == Keys.H) + iViewIdx = 0; + else if(e.KeyCode == Keys.I || e.KeyCode == Keys.J) + iViewIdx = 1; + else if(e.KeyCode == Keys.O || e.KeyCode == Keys.K) + iViewIdx = 2; + else if(e.KeyCode == Keys.P || e.KeyCode == Keys.L) + iViewIdx = 3; + + int iBaseX = this.Left; + int iBaseY = this.Top; + for(int i=0; i + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/MultitabBrowser.csproj b/MultitabBrowser.csproj new file mode 100644 index 0000000..dcca07a --- /dev/null +++ b/MultitabBrowser.csproj @@ -0,0 +1,89 @@ + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {67C02235-A6B9-488D-A8B4-40976A557023} + WinExe + Properties + MultitabBrowser + MultitabBrowser + v3.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + 3.5 + + + 3.5 + + + 3.5 + + + + + + + + + + Form + + + Form1.cs + + + + + Form1.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + \ No newline at end of file diff --git a/MultitabBrowser.sln b/MultitabBrowser.sln new file mode 100644 index 0000000..1cb924f --- /dev/null +++ b/MultitabBrowser.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MultitabBrowser", "MultitabBrowser.csproj", "{67C02235-A6B9-488D-A8B4-40976A557023}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {67C02235-A6B9-488D-A8B4-40976A557023}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {67C02235-A6B9-488D-A8B4-40976A557023}.Debug|Any CPU.Build.0 = Debug|Any CPU + {67C02235-A6B9-488D-A8B4-40976A557023}.Release|Any CPU.ActiveCfg = Release|Any CPU + {67C02235-A6B9-488D-A8B4-40976A557023}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Program.cs b/Program.cs new file mode 100644 index 0000000..9dbdd15 --- /dev/null +++ b/Program.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Forms; + +namespace MultitabBrowser +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..c3132b5 --- /dev/null +++ b/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 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("MultitabBrowser")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("MultitabBrowser")] +[assembly: AssemblyCopyright("Copyright © 2014")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("74a6a2b8-fecf-4516-8343-090a6535dac3")] + +// 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 Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs new file mode 100644 index 0000000..b13e166 --- /dev/null +++ b/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.6387 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace MultitabBrowser.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MultitabBrowser.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/Properties/Resources.resx b/Properties/Resources.resx new file mode 100644 index 0000000..ffecec8 --- /dev/null +++ b/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Properties/Settings.Designer.cs b/Properties/Settings.Designer.cs new file mode 100644 index 0000000..c44da25 --- /dev/null +++ b/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.6387 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace MultitabBrowser.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/Properties/Settings.settings b/Properties/Settings.settings new file mode 100644 index 0000000..abf36c5 --- /dev/null +++ b/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/content.html b/content.html new file mode 100644 index 0000000..3525e12 --- /dev/null +++ b/content.html @@ -0,0 +1 @@ + \ No newline at end of file