From: <dos...@us...> - 2012-07-01 15:15:06
|
Revision: 4492 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4492&view=rev Author: doskabouter Date: 2012-07-01 15:14:59 +0000 (Sun, 01 Jul 2012) Log Message: ----------- cleanup old mouse stuff Modified Paths: -------------- trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/BrowseTheWeb.csproj trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/GUIPlugin.cs trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Properties/Resources.Designer.cs trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Properties/Resources.resx Removed Paths: ------------- trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Mouse.Designer.cs trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Mouse.cs trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Mouse.resx trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/res/icon-48x48-mouse.png Modified: trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/BrowseTheWeb.csproj =================================================================== --- trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/BrowseTheWeb.csproj 2012-05-25 10:34:08 UTC (rev 4491) +++ trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/BrowseTheWeb.csproj 2012-07-01 15:14:59 UTC (rev 4492) @@ -123,12 +123,6 @@ <Compile Include="ImportChrome.Designer.cs"> <DependentUpon>ImportChrome.cs</DependentUpon> </Compile> - <Compile Include="Mouse.cs"> - <SubType>UserControl</SubType> - </Compile> - <Compile Include="Mouse.Designer.cs"> - <DependentUpon>Mouse.cs</DependentUpon> - </Compile> <Compile Include="MyLog.cs" /> <Compile Include="OSD_LinkId.cs"> <SubType>UserControl</SubType> @@ -181,7 +175,6 @@ <ItemGroup> <None Include="res\edit-icon.png" /> <Content Include="res\fav-b-icon.png" /> - <None Include="res\icon-48x48-mouse.png" /> <Content Include="todo.txt" /> <EmbeddedResource Include="GetThumb.resx"> <DependentUpon>GetThumb.cs</DependentUpon> @@ -198,10 +191,6 @@ <DependentUpon>ImportChrome.cs</DependentUpon> <SubType>Designer</SubType> </EmbeddedResource> - <EmbeddedResource Include="Mouse.resx"> - <DependentUpon>Mouse.cs</DependentUpon> - <SubType>Designer</SubType> - </EmbeddedResource> <EmbeddedResource Include="OSD_LinkId.resx"> <DependentUpon>OSD_LinkId.cs</DependentUpon> <SubType>Designer</SubType> Modified: trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/GUIPlugin.cs =================================================================== --- trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/GUIPlugin.cs 2012-05-25 10:34:08 UTC (rev 4491) +++ trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/GUIPlugin.cs 2012-07-01 15:14:59 UTC (rev 4492) @@ -49,6 +49,7 @@ private const int MOUSEEVENTF_RIGHTDOWN = 0x08; private const int MOUSEEVENTF_RIGHTUP = 0x10; private const bool logHtml = false; + private bool mouseVisible = false; #region Links private Dictionary<int, HtmlLinkNumber> _htmlLinkNumbers = new Dictionary<int, HtmlLinkNumber>(); @@ -61,7 +62,6 @@ #region declare vars private GeckoWebBrowser webBrowser; private OSD_LinkId osd_linkID; - private Mouse mouse; private string linkId = string.Empty; private int linkTime = 0; private Timer timer = new Timer(); @@ -208,9 +208,6 @@ GUIGraphicsContext.form.Controls.Add(osd_linkID); osd_linkID.Visible = false; - mouse = new Mouse(); - GUIGraphicsContext.form.Controls.Add(mouse); - mouse.Visible = false; #endregion } @@ -302,7 +299,7 @@ timer.Start(); if (settings.UseMouse) - GUIGraphicsContext.form.Controls["BrowseTheWeb"].Select(); + webBrowser.Select(); } catch (Exception ex) { @@ -408,11 +405,7 @@ public override void OnAction(MediaPortal.GUI.Library.Action action) { - if (linkId != string.Empty) - GUIPropertyManager.SetProperty("#btWeb.linkid", "Link ID = " + linkId); - else - GUIPropertyManager.SetProperty("#btWeb.linkid", linkId); - + GUIPropertyManager.SetProperty("#btWeb.linkid", String.IsNullOrEmpty(linkId) ? String.Empty : "Link ID = " + linkId); #region remote diagnostic if (settings.Remote) { @@ -428,7 +421,7 @@ #region selectable buttons if (action.wID == settings.Remote_Confirm) { - if (!mouse.Visible) + if (!mouseVisible) { if (!settings.UseMouse) { @@ -461,7 +454,7 @@ //webBrowser.Enabled = false; GUIGraphicsContext.form.BringToFront(); - mouse.BringToFront(); + //mouse.BringToFront(); } } if (action.wID == settings.Remote_Bookmark) @@ -510,17 +503,17 @@ } break; case MediaPortal.GUI.Library.Action.ActionType.ACTION_NEXT_SUBTITLE: - if (mouse.Visible) + if (mouseVisible) { - mouse.Visible = false; + mouseVisible = false; } else { Point x = Cursor.Position; - mouse.Location = x; - mouse.Visible = true; - mouse.BringToFront(); - } + //mouse.Location = x; + mouseVisible = true; + //mouse.BringToFront(); + } break; case MediaPortal.GUI.Library.Action.ActionType.ACTION_KEY_PRESSED: if (!settings.UseMouse) @@ -593,13 +586,6 @@ OnMoveDown(); return; case MediaPortal.GUI.Library.Action.ActionType.ACTION_SELECT_ITEM: - if (mouse.Visible) - { - //Cursor.Show(); - int x = GUIGraphicsContext.form.Location.X + mouse.Location.X + 20; - int y = GUIGraphicsContext.form.Location.Y + mouse.Location.Y + 50; - Cursor.Position = new Point(x, y); - } return; #endregion } @@ -608,7 +594,7 @@ private void webBrowser_DomKeyDown(object sender, GeckoDomKeyEventArgs e) { - if (settings.UseMouse) + if (settings.UseMouse || mouseVisible) { //System.Diagnostics.Debug.WriteLine("DOM " + e.KeyCode.ToString()); @@ -690,7 +676,7 @@ webBrowser.Visible = true; if (settings.UseMouse) - GUIGraphicsContext.form.Controls["BrowseTheWeb"].Select(); + webBrowser.Select(); } private void OnAddBookmark() @@ -740,7 +726,7 @@ webBrowser.Visible = true; if (settings.UseMouse) - GUIGraphicsContext.form.Controls["BrowseTheWeb"].Select(); + webBrowser.Select(); } private void OnZoomIn() { @@ -756,55 +742,51 @@ } private void OnMoveLeft() { - if (!mouse.Visible) + if (!mouseVisible) { if (webBrowser.Window != null) ScrollTo(webBrowser.Window.ScrollX - 100, webBrowser.Window.ScrollY); } else { - mouse.Location = new Point(mouse.Location.X - 20, mouse.Location.Y); - Cursor.Position = new Point(mouse.Location.X, mouse.Location.Y); + Cursor.Position = new Point(Cursor.Position.X - 20, Cursor.Position.Y); } } private void OnMoveRight() { - if (!mouse.Visible) + if (!mouseVisible) { if (webBrowser.Window != null) ScrollTo(webBrowser.Window.ScrollX + 100, webBrowser.Window.ScrollY); } else { - mouse.Location = new Point(mouse.Location.X + 20, mouse.Location.Y); - Cursor.Position = new Point(mouse.Location.X, mouse.Location.Y); + Cursor.Position = new Point(Cursor.Position.X + 20, Cursor.Position.Y); } } private void OnMoveUp() { - if (!mouse.Visible) + if (!mouseVisible) { if (webBrowser.Window != null) ScrollTo(webBrowser.Window.ScrollX, webBrowser.Window.ScrollY - 100); } else { - mouse.Location = new Point(mouse.Location.X, mouse.Location.Y - 20); - Cursor.Position = new Point(mouse.Location.X, mouse.Location.Y); + Cursor.Position = new Point(Cursor.Position.X, Cursor.Position.Y - 20); } } private void OnMoveDown() { - if (!mouse.Visible) + if (!mouseVisible) { if (webBrowser.Window != null) ScrollTo(webBrowser.Window.ScrollX, webBrowser.Window.ScrollY + 100); } else { - mouse.Location = new Point(mouse.Location.X, mouse.Location.Y + 20); - Cursor.Position = new Point(mouse.Location.X, mouse.Location.Y); + Cursor.Position = new Point(Cursor.Position.X, Cursor.Position.Y + 20); } } private void OnPageUp() { - if (!mouse.Visible) + if (!mouseVisible) { int height = webBrowser.Size.Height; if (webBrowser.Window != null) ScrollTo(webBrowser.Window.ScrollX, webBrowser.Window.ScrollY - height + 100); @@ -812,13 +794,12 @@ else { //not yet tested - mouse.Location = new Point(mouse.Location.X, mouse.Location.Y - 20); - Cursor.Position = new Point(mouse.Location.X, mouse.Location.Y); + Cursor.Position = new Point(Cursor.Position.X, Cursor.Position.Y - 20); } } private void OnPageDown() { - if (!mouse.Visible) + if (!mouseVisible) { int height = webBrowser.Size.Height; if (webBrowser.Window != null) ScrollTo(webBrowser.Window.ScrollX, webBrowser.Window.ScrollY + height - 100); @@ -826,8 +807,7 @@ else { //not yet tested - mouse.Location = new Point(mouse.Location.X, mouse.Location.Y - 20); - Cursor.Position = new Point(mouse.Location.X, mouse.Location.Y); + Cursor.Position = new Point(Cursor.Position.X, Cursor.Position.Y + 20); } } @@ -919,6 +899,7 @@ { MyLog.debug("page completed : " + webBrowser.Url.ToString()); + GUIPropertyManager.SetProperty("#btWeb.linkid", webBrowser.Url.ToString()); try { #region MP gui stuff Deleted: trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Mouse.Designer.cs =================================================================== --- trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Mouse.Designer.cs 2012-05-25 10:34:08 UTC (rev 4491) +++ trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Mouse.Designer.cs 2012-07-01 15:14:59 UTC (rev 4492) @@ -1,64 +0,0 @@ -namespace BrowseTheWeb -{ - partial class Mouse - { - /// <summary> - /// Erforderliche Designervariable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Verwendete Ressourcen bereinigen. - /// </summary> - /// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Vom Komponenten-Designer generierter Code - - /// <summary> - /// Erforderliche Methode für die Designerunterstützung. - /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden. - /// </summary> - private void InitializeComponent() - { - this.pictureBox1 = new System.Windows.Forms.PictureBox(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); - this.SuspendLayout(); - // - // pictureBox1 - // - this.pictureBox1.Image = global::BrowseTheWeb.Properties.Resources.icon_48x48_mouse; - this.pictureBox1.Location = new System.Drawing.Point(0, 0); - this.pictureBox1.Name = "pictureBox1"; - this.pictureBox1.Size = new System.Drawing.Size(48, 48); - this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; - this.pictureBox1.TabIndex = 0; - this.pictureBox1.TabStop = false; - // - // Mouse - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.Color.White; - this.Controls.Add(this.pictureBox1); - this.Name = "Mouse"; - this.Size = new System.Drawing.Size(48, 48); - this.Load += new System.EventHandler(this.Mouse_Load); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.PictureBox pictureBox1; - - } -} Deleted: trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Mouse.cs =================================================================== --- trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Mouse.cs 2012-05-25 10:34:08 UTC (rev 4491) +++ trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Mouse.cs 2012-07-01 15:14:59 UTC (rev 4492) @@ -1,47 +0,0 @@ -#region Copyright (C) 2005-2010 Team MediaPortal - -/* - * Copyright (C) 2005-2010 Team MediaPortal - * http://www.team-mediaportal.com - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Make; see the file COPYING. If not, write to - * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - * http://www.gnu.org/copyleft/gpl.html - * - */ -#endregion - -using System; -using System.Windows.Forms; - -namespace BrowseTheWeb -{ - public partial class Mouse : UserControl - { - public Mouse() - { - InitializeComponent(); - } - - private void label1_Click(object sender, EventArgs e) - { - - } - - private void Mouse_Load(object sender, EventArgs e) - { - - } - } -} Deleted: trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Mouse.resx =================================================================== --- trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Mouse.resx 2012-05-25 10:34:08 UTC (rev 4491) +++ trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Mouse.resx 2012-07-01 15:14:59 UTC (rev 4492) @@ -1,120 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> -</root> \ No newline at end of file Modified: trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Properties/Resources.Designer.cs =================================================================== --- trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Properties/Resources.Designer.cs 2012-05-25 10:34:08 UTC (rev 4491) +++ trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Properties/Resources.Designer.cs 2012-07-01 15:14:59 UTC (rev 4492) @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. -// Runtime Version:4.0.30319.261 +// Runtime Version:4.0.30319.269 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -87,12 +87,5 @@ return ((System.Drawing.Bitmap)(obj)); } } - - internal static System.Drawing.Bitmap icon_48x48_mouse { - get { - object obj = ResourceManager.GetObject("icon-48x48-mouse", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } } } Modified: trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Properties/Resources.resx =================================================================== --- trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Properties/Resources.resx 2012-05-25 10:34:08 UTC (rev 4491) +++ trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Properties/Resources.resx 2012-07-01 15:14:59 UTC (rev 4492) @@ -117,7 +117,7 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> - <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> + <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <data name="edit-icon" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\res\edit-icon.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> @@ -130,7 +130,4 @@ <data name="file-icon" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\res\file-icon.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="icon-48x48-mouse" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\res\icon-48x48-mouse.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> - </data> </root> \ No newline at end of file Deleted: trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/res/icon-48x48-mouse.png =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |