From: <kro...@us...> - 2010-11-15 19:49:24
|
Revision: 3938 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=3938&view=rev Author: kroko_koenig Date: 2010-11-15 19:49:11 +0000 (Mon, 15 Nov 2010) Log Message: ----------- rework thumb section / bookmarks, remote can be configured Modified Paths: -------------- trunk/plugins/BrowseTheWeb/Release/Plugins/Windows/BrowseTheWeb.dll trunk/plugins/BrowseTheWeb/Release/Skin/Blue3/Media/hover_browsetheweb.png trunk/plugins/BrowseTheWeb/Release/Skin/Blue3wide/Media/hover_browsetheweb.png trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Bookmark.cs trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/BrowseTheWeb.csproj trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/GUIBookmark.cs trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/GUIPlugin.cs trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/GetThumb.cs trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/ImportFF.cs trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/ImportIE.cs trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Properties/AssemblyInfo.cs trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Setup.Designer.cs trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Setup.cs trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Setup.resx trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/todo.txt trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb.suo Added Paths: ----------- trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/BookmarkElement.cs trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/BookmarkXml.cs Modified: trunk/plugins/BrowseTheWeb/Release/Plugins/Windows/BrowseTheWeb.dll =================================================================== (Binary files differ) Modified: trunk/plugins/BrowseTheWeb/Release/Skin/Blue3/Media/hover_browsetheweb.png =================================================================== (Binary files differ) Modified: trunk/plugins/BrowseTheWeb/Release/Skin/Blue3wide/Media/hover_browsetheweb.png =================================================================== (Binary files differ) Modified: trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Bookmark.cs =================================================================== --- trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Bookmark.cs 2010-11-15 09:46:38 UTC (rev 3937) +++ trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Bookmark.cs 2010-11-15 19:49:11 UTC (rev 3938) @@ -38,19 +38,7 @@ public class Bookmark { private static XmlTextWriter textWriter; - private static XmlDocument xmlDocument; - // main - public string Name = string.Empty; - public string Url = string.Empty; - // statistics - public int Visited = 0; - public DateTime LastVisited; - public DateTime Created = DateTime.Now; - // helper for folder / sub-folder - public bool isFolder = false; - public bool isSubFolder = false; - public static bool Save(TreeView Treeview, string Path) { bool result = false; @@ -65,14 +53,14 @@ foreach (TreeNode t in Treeview.Nodes[0].Nodes) { - Bookmark bkm = (Bookmark)t.Tag; + BookmarkElement bkm = (BookmarkElement)t.Tag; if (bkm != null) { WriteOneEntry(bkm); foreach (TreeNode sub in t.Nodes) { - Bookmark bkm2 = (Bookmark)sub.Tag; + BookmarkElement bkm2 = (BookmarkElement)sub.Tag; WriteOneEntry(bkm2); } } @@ -106,16 +94,11 @@ try { - xmlDocument = new XmlDocument(); - xmlDocument.Load(Path); - + BookmarkXml.LoadBookmarks(Path); TreeNode akt = new TreeNode(); - XmlNodeList col = xmlDocument.GetElementsByTagName("Entry"); - foreach (XmlNode node in col) + foreach (BookmarkElement bkm in BookmarkXml.BookmarkItems) { - Bookmark bkm = GetData(node); - if (bkm.isFolder) { akt = main.Nodes.Add(bkm.Name); @@ -125,8 +108,7 @@ } if (bkm.isSubFolder) { - string name = bkm.Name.Replace("\0", ""); - TreeNode sub = akt.Nodes.Add(name); + TreeNode sub = akt.Nodes.Add(bkm.Name); sub.Tag = bkm; } if ((!bkm.isFolder) && (!bkm.isSubFolder)) @@ -134,7 +116,6 @@ TreeNode add = main.Nodes.Add(bkm.Name); add.Tag = bkm; } - } Treeview.Invalidate(); @@ -143,111 +124,8 @@ catch { } } - public static void AddFolder(string Path, string FolderName) + private static void WriteOneEntry(BookmarkElement bkm) { - if (!File.Exists(Path)) - { - string s = "<?xml version=\"1.0\"?>\n<Bookmarks />"; - StreamWriter sr = new StreamWriter(Path); - sr.Write(s); - sr.Close(); - } - try - { - xmlDocument = new XmlDocument(); - xmlDocument.Load(Path); - - bool found = false; - - foreach (XmlNode r in xmlDocument.ChildNodes) - { - foreach (XmlNode one in r.ChildNodes) - { - if (one.FirstChild.InnerText == FolderName) found = true; - } - } - - if (!found) - { - XmlElement childElement = xmlDocument.CreateElement("Entry"); - - XmlElement sub1 = xmlDocument.CreateElement("Name"); sub1.InnerText = FolderName; - childElement.AppendChild(sub1); - XmlElement sub2 = xmlDocument.CreateElement("URL"); sub2.InnerText = string.Empty; - childElement.AppendChild(sub2); - XmlElement sub3 = xmlDocument.CreateElement("Visited"); sub3.InnerText = "0"; - childElement.AppendChild(sub3); - XmlElement sub4 = xmlDocument.CreateElement("LastVisited"); sub4.InnerText = "0001-01-01T00:00:00"; - childElement.AppendChild(sub4); - XmlElement sub5 = xmlDocument.CreateElement("Created"); sub5.InnerText = DateTime.UtcNow.ToString("u", null); - childElement.AppendChild(sub5); - XmlElement sub6 = xmlDocument.CreateElement("isFolder"); sub6.InnerText = "true"; - childElement.AppendChild(sub6); - XmlElement sub7 = xmlDocument.CreateElement("isSubFolder"); sub7.InnerText = "false"; - childElement.AppendChild(sub7); - - XmlNode parentNode = xmlDocument.SelectSingleNode("Bookmarks"); - parentNode.InsertBefore(childElement, parentNode.FirstChild); - } - xmlDocument.Save(Path); - } - catch - { } - } - public static bool SavaBookmark(string Title, string Url, string Path) - { - try - { - xmlDocument = new XmlDocument(); - xmlDocument.Load(Path); - - bool found = false; - XmlNode folder = null; - - foreach (XmlNode r in xmlDocument.ChildNodes) - { - - foreach (XmlNode one in r.ChildNodes) - { - if (one.FirstChild.InnerText == Title) found = true; - if (one.FirstChild.InnerText == "Saved by MP") folder = one; - } - } - - if ((!found) && (folder != null)) - { - XmlElement childElement = xmlDocument.CreateElement("Entry"); - - XmlElement sub1 = xmlDocument.CreateElement("Name"); sub1.InnerText = Title; - childElement.AppendChild(sub1); - XmlElement sub2 = xmlDocument.CreateElement("URL"); sub2.InnerText = Url; - childElement.AppendChild(sub2); - XmlElement sub3 = xmlDocument.CreateElement("Visited"); sub3.InnerText = "0"; - childElement.AppendChild(sub3); - XmlElement sub4 = xmlDocument.CreateElement("LastVisited"); sub4.InnerText = "0001-01-01T00:00:00"; - childElement.AppendChild(sub4); - XmlElement sub5 = xmlDocument.CreateElement("Created"); sub5.InnerText = DateTime.UtcNow.ToString("u", null); - childElement.AppendChild(sub5); - XmlElement sub6 = xmlDocument.CreateElement("isFolder"); sub6.InnerText = "false"; - childElement.AppendChild(sub6); - XmlElement sub7 = xmlDocument.CreateElement("isSubFolder"); sub7.InnerText = "true"; - childElement.AppendChild(sub7); - - XmlNode parentNode = xmlDocument.SelectSingleNode("Bookmarks"); - parentNode.InsertAfter(childElement, folder); - - xmlDocument.Save(Path); - return true; - } - - } - catch - { } - return false; - } - - private static void WriteOneEntry(Bookmark bkm) - { textWriter.WriteStartElement("Entry"); textWriter.WriteStartElement("Name"); @@ -258,6 +136,10 @@ textWriter.WriteValue(bkm.Url); textWriter.WriteEndElement(); + textWriter.WriteStartElement("ID"); + textWriter.WriteValue(bkm.Id); + textWriter.WriteEndElement(); + textWriter.WriteStartElement("Visited"); textWriter.WriteValue(bkm.Visited); textWriter.WriteEndElement(); @@ -281,23 +163,7 @@ textWriter.WriteEndElement(); } - private static Bookmark GetData(XmlNode Node) - { - Bookmark result = new Bookmark(); - result.Name = Node.SelectSingleNode("Name").InnerText; - result.Url = Node.SelectSingleNode("URL").InnerText; - - result.Visited = Convert.ToInt32(Node.SelectSingleNode("Visited").InnerText); - result.LastVisited = Convert.ToDateTime(Node.SelectSingleNode("LastVisited").InnerText); - result.Created = Convert.ToDateTime(Node.SelectSingleNode("Created").InnerText); - - result.isFolder = Convert.ToBoolean(Node.SelectSingleNode("isFolder").InnerText); - result.isSubFolder = Convert.ToBoolean(Node.SelectSingleNode("isSubFolder").InnerText); - - return result; - } - public static bool Exists(TreeView Treeview, string Name) { foreach (TreeNode t in Treeview.Nodes[0].Nodes) @@ -332,75 +198,39 @@ return true; } - public static void SaveSnap(Bitmap Snap, string Url) + public static void SaveSnap(Bitmap Snap, long ID) { try { - string filename = Url; + string filename = ID.ToString() + ".png"; - if (filename.EndsWith("/")) filename = filename.Substring(0, filename.Length - 1); - - int x = filename.IndexOf("//"); - if (x > 0) - { - filename = filename.Substring(x + 2); - filename = filename.Replace("/", "_"); - filename = filename.Replace(".", "_"); - filename = filename.Replace("?", "_"); - filename = filename + ".png"; - - filename = Config.GetFolder(MediaPortal.Configuration.Config.Dir.Cache) + "\\BrowseTheWeb\\" + filename; - Snap.Save(filename); - } + filename = Config.GetFolder(MediaPortal.Configuration.Config.Dir.Cache) + "\\BrowseTheWeb\\" + filename; + Snap.Save(filename); } catch { } } - public static Bitmap GetSnap(string Url) + public static Bitmap GetSnap(long ID) { Bitmap snap = null; try { - string filename = Url; + string filename = ID.ToString() + ".png"; - if (filename.EndsWith("/")) filename = filename.Substring(0, filename.Length - 1); + filename = Config.GetFolder(MediaPortal.Configuration.Config.Dir.Cache) + "\\BrowseTheWeb\\" + filename; + if (File.Exists(filename)) + snap = (Bitmap)Bitmap.FromFile(filename); - int x = filename.IndexOf("//"); - if (x > 0) - { - filename = filename.Substring(x + 2); - filename = filename.Replace("/", "_"); - filename = filename.Replace(".", "_"); - filename = filename.Replace("?", "_"); - filename = filename + ".png"; - - filename = Config.GetFolder(MediaPortal.Configuration.Config.Dir.Cache) + "\\BrowseTheWeb\\" + filename; - if (File.Exists(filename)) - snap = (Bitmap)Bitmap.FromFile(filename); - - return snap; - } + return snap; } catch { } return snap; } - public static string GetSnapPath(string Url) + public static string GetSnapPath(long ID) { - string filename = Url; - if (filename.EndsWith("/")) filename = filename.Substring(0, filename.Length - 1); - - int x = filename.IndexOf("//"); - if (x > 0) - { - filename = filename.Substring(x + 2); - } - - filename = filename.Replace("/", "_"); - filename = filename.Replace(".", "_"); - filename = filename + ".png"; - + string filename = ID.ToString() + ".png"; filename = Config.GetFolder(MediaPortal.Configuration.Config.Dir.Cache) + "\\BrowseTheWeb\\" + filename; return filename; Added: trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/BookmarkElement.cs =================================================================== --- trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/BookmarkElement.cs (rev 0) +++ trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/BookmarkElement.cs 2010-11-15 19:49:11 UTC (rev 3938) @@ -0,0 +1,44 @@ +#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.Collections.Generic; +using System.Text; + +namespace BrowseTheWeb +{ + public class BookmarkElement + { + public string Name = string.Empty; + public string Url = string.Empty; + public Int64 Id = 0; + + public int Visited = 0; + public DateTime LastVisited; + public DateTime Created = DateTime.Now; + + public bool isFolder = false; + public bool isSubFolder = false; + } +} Added: trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/BookmarkXml.cs =================================================================== --- trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/BookmarkXml.cs (rev 0) +++ trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/BookmarkXml.cs 2010-11-15 19:49:11 UTC (rev 3938) @@ -0,0 +1,193 @@ +#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.Collections.Generic; +using System.Text; +using System.Xml; +using System.IO; + +namespace BrowseTheWeb +{ + public class BookmarkXml + { + public static List<BookmarkElement> BookmarkItems = new List<BookmarkElement>(); + + private static void InitBookmarks(string Path) + { + if (!File.Exists(Path)) + { + string s = "<?xml version=\"1.0\"?>\n<Bookmarks />"; + StreamWriter sr = new StreamWriter(Path); + sr.Write(s); + sr.Close(); + } + } + + public static bool LoadBookmarks(string Path) + { + InitBookmarks(Path); + + BookmarkItems = new List<BookmarkElement>(); + try + { + XmlDocument xmlDocument = new XmlDocument(); + xmlDocument.Load(Path); + + XmlNodeList col = xmlDocument.GetElementsByTagName("Entry"); + foreach (XmlNode node in col) + { + BookmarkElement elem = GetData(node); + BookmarkItems.Add(elem); + } + } + catch + { + return false; + } + return true; + } + public static BookmarkElement GetData(XmlNode Node) + { + BookmarkElement result = new BookmarkElement(); + + result.Name = Node.SelectSingleNode("Name").InnerText; + result.Url = Node.SelectSingleNode("URL").InnerText; + try + { + result.Id = Convert.ToInt64(Node.SelectSingleNode("ID").InnerText); + } + catch { } + + result.Visited = Convert.ToInt32(Node.SelectSingleNode("Visited").InnerText); + result.LastVisited = Convert.ToDateTime(Node.SelectSingleNode("LastVisited").InnerText); + result.Created = Convert.ToDateTime(Node.SelectSingleNode("Created").InnerText); + + result.isFolder = Convert.ToBoolean(Node.SelectSingleNode("isFolder").InnerText); + result.isSubFolder = Convert.ToBoolean(Node.SelectSingleNode("isSubFolder").InnerText); + + return result; + } + + public static void AddFolder(string Path, string FolderName) + { + InitBookmarks(Path); + + try + { + XmlDocument xmlDocument = new XmlDocument(); + xmlDocument.Load(Path); + + bool found = false; + + foreach (XmlNode r in xmlDocument.ChildNodes) + { + foreach (XmlNode one in r.ChildNodes) + { + if (one.FirstChild.InnerText == FolderName) found = true; + } + } + + if (!found) + { + XmlElement childElement = xmlDocument.CreateElement("Entry"); + + XmlElement sub1 = xmlDocument.CreateElement("Name"); sub1.InnerText = FolderName; + childElement.AppendChild(sub1); + XmlElement sub2 = xmlDocument.CreateElement("URL"); sub2.InnerText = string.Empty; + childElement.AppendChild(sub2); + XmlElement sub3 = xmlDocument.CreateElement("Visited"); sub3.InnerText = "0"; + childElement.AppendChild(sub3); + XmlElement sub4 = xmlDocument.CreateElement("LastVisited"); sub4.InnerText = "0001-01-01T00:00:00"; + childElement.AppendChild(sub4); + XmlElement sub5 = xmlDocument.CreateElement("Created"); sub5.InnerText = DateTime.UtcNow.ToString("u", null); + childElement.AppendChild(sub5); + XmlElement sub6 = xmlDocument.CreateElement("isFolder"); sub6.InnerText = "true"; + childElement.AppendChild(sub6); + XmlElement sub7 = xmlDocument.CreateElement("isSubFolder"); sub7.InnerText = "false"; + childElement.AppendChild(sub7); + + XmlNode parentNode = xmlDocument.SelectSingleNode("Bookmarks"); + parentNode.InsertBefore(childElement, parentNode.FirstChild); + } + xmlDocument.Save(Path); + } + catch + { } + } + public static bool AddBookmark(string Title, string Url, string Path, long ID) + { + try + { + XmlDocument xmlDocument = new XmlDocument(); + xmlDocument.Load(Path); + + bool found = false; + XmlNode folder = null; + + foreach (XmlNode r in xmlDocument.ChildNodes) + { + + foreach (XmlNode one in r.ChildNodes) + { + if (one.FirstChild.InnerText == Title) found = true; + if (one.FirstChild.InnerText == "Saved by MP") folder = one; + } + } + + if ((!found) && (folder != null)) + { + XmlElement childElement = xmlDocument.CreateElement("Entry"); + + XmlElement sub1 = xmlDocument.CreateElement("Name"); sub1.InnerText = Title; + childElement.AppendChild(sub1); + XmlElement sub2 = xmlDocument.CreateElement("URL"); sub2.InnerText = Url; + childElement.AppendChild(sub2); + XmlElement sub3 = xmlDocument.CreateElement("ID"); sub3.InnerText = ID.ToString(); + childElement.AppendChild(sub3); + XmlElement sub4 = xmlDocument.CreateElement("Visited"); sub4.InnerText = "0"; + childElement.AppendChild(sub4); + XmlElement sub5 = xmlDocument.CreateElement("LastVisited"); sub5.InnerText = "0001-01-01T00:00:00"; + childElement.AppendChild(sub5); + XmlElement sub6 = xmlDocument.CreateElement("Created"); sub6.InnerText = DateTime.UtcNow.ToString("u", null); + childElement.AppendChild(sub6); + XmlElement sub7 = xmlDocument.CreateElement("isFolder"); sub7.InnerText = "false"; + childElement.AppendChild(sub7); + XmlElement sub8 = xmlDocument.CreateElement("isSubFolder"); sub8.InnerText = "true"; + childElement.AppendChild(sub8); + + XmlNode parentNode = xmlDocument.SelectSingleNode("Bookmarks"); + parentNode.InsertAfter(childElement, folder); + + xmlDocument.Save(Path); + return true; + } + + } + catch + { } + return false; + } + } +} \ No newline at end of file Modified: trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/BrowseTheWeb.csproj =================================================================== --- trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/BrowseTheWeb.csproj 2010-11-15 09:46:38 UTC (rev 3937) +++ trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/BrowseTheWeb.csproj 2010-11-15 19:49:11 UTC (rev 3938) @@ -72,6 +72,8 @@ </ItemGroup> <ItemGroup> <Compile Include="Bookmark.cs" /> + <Compile Include="BookmarkElement.cs" /> + <Compile Include="BookmarkXml.cs" /> <Compile Include="GetFolder.cs"> <SubType>Form</SubType> </Compile> @@ -195,4 +197,7 @@ <Target Name="AfterBuild"> </Target> --> + <PropertyGroup> + <PostBuildEvent>copy $(TargetName).dll "C:\AAA\BrowseTheWeb\Release\Plugins\Windows\"</PostBuildEvent> + </PropertyGroup> </Project> \ No newline at end of file Modified: trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/GUIBookmark.cs =================================================================== --- trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/GUIBookmark.cs 2010-11-15 09:46:38 UTC (rev 3937) +++ trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/GUIBookmark.cs 2010-11-15 19:49:11 UTC (rev 3938) @@ -107,7 +107,7 @@ XmlNodeList col = xmlDocument.GetElementsByTagName("Entry"); foreach (XmlNode node in col) { - Bookmark bkm = GetData(node); + BookmarkElement bkm = BookmarkXml.GetData(node); string name = bkm.Name.Replace(" ", "_"); name = name.Replace(".", "_"); @@ -126,7 +126,7 @@ } else { - string file = Bookmark.GetSnapPath(bkm.Url); + string file = Bookmark.GetSnapPath(bkm.Id); item.IconImage = file; item.IconImageBig = file; } @@ -151,7 +151,7 @@ XmlNodeList col = xmlDocument.GetElementsByTagName("Entry"); foreach (XmlNode node in col) { - Bookmark bkm = GetData(node); + BookmarkElement bkm = BookmarkXml.GetData(node); if ((bkm.isFolder) || ((!bkm.isSubFolder && !bkm.isFolder))) found = false; @@ -168,7 +168,7 @@ item.Label = bkm.Name; item.Path = bkm.Url; - string file = Bookmark.GetSnapPath(bkm.Url); + string file = Bookmark.GetSnapPath(bkm.Id); item.IconImage = file; item.IconImageBig = file; @@ -182,21 +182,5 @@ } catch { } } - private static Bookmark GetData(XmlNode Node) - { - Bookmark result = new Bookmark(); - - result.Name = Node.SelectSingleNode("Name").InnerText; - result.Url = Node.SelectSingleNode("URL").InnerText; - - result.Visited = Convert.ToInt32(Node.SelectSingleNode("Visited").InnerText); - result.LastVisited = Convert.ToDateTime(Node.SelectSingleNode("LastVisited").InnerText); - result.Created = Convert.ToDateTime(Node.SelectSingleNode("Created").InnerText); - - result.isFolder = Convert.ToBoolean(Node.SelectSingleNode("isFolder").InnerText); - result.isSubFolder = Convert.ToBoolean(Node.SelectSingleNode("isSubFolder").InnerText); - - return result; - } } } Modified: trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/GUIPlugin.cs =================================================================== --- trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/GUIPlugin.cs 2010-11-15 09:46:38 UTC (rev 3937) +++ trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/GUIPlugin.cs 2010-11-15 19:49:11 UTC (rev 3938) @@ -83,7 +83,11 @@ private string lastDomain = string.Empty; private bool cacheThumbs = false; private bool remote = false; - private string remote_1 = string.Empty; + private string remote_confirm = string.Empty; + private string remote_bookmark = string.Empty; + private string remote_zoom_in = string.Empty; + private string remote_zoom_out = string.Empty; + private string remote_status = string.Empty; private bool useProxy = false; private string Server = string.Empty; @@ -187,7 +191,8 @@ #endregion LoadSettings(); - Bookmark.AddFolder(Config.GetFolder(MediaPortal.Configuration.Config.Dir.Config) + "\\bookmarks.xml", "Saved by MP"); + BookmarkXml.AddFolder(Config.GetFolder(MediaPortal.Configuration.Config.Dir.Config) + + "\\bookmarks.xml", "Saved by MP"); return Load(GUIGraphicsContext.Skin + @"\BrowseTheWeb.xml"); } @@ -288,8 +293,15 @@ cacheThumbs = xmlreader.GetValueAsBool("btWeb", "cachethumbs", false); remote = xmlreader.GetValueAsBool("btWeb", "remote", false); - remote_1 = xmlreader.GetValueAsString("btWeb", "key_1", "REMOTE_1"); + remote_confirm = xmlreader.GetValueAsString("btWeb", "key_1", "ACTION_SELECT_ITEM"); + remote_bookmark = xmlreader.GetValueAsString("btWeb", "key_2", "ACTION_SHOW_INFO"); + remote_zoom_in = xmlreader.GetValueAsString("btWeb", "key_3", "ACTION_PAGE_DOWN"); + remote_zoom_out = xmlreader.GetValueAsString("btWeb", "key_4", "ACTION_PAGE_UP"); + remote_status = xmlreader.GetValueAsString("btWeb", "key_5", "ACTION_SHOW_GUI"); + + Setup.actualID = Convert.ToInt64(xmlreader.GetValueAsString("btWeb", "actualID", "123")); + useProxy = xmlreader.GetValueAsBool("btWeb", "proxy", false); Server = xmlreader.GetValueAsString("btWeb", "proxy_server", "127.0.0.1"); Port = xmlreader.GetValueAsInt("btWeb", "proxy_port", 8888); @@ -375,40 +387,66 @@ public override void OnAction(Action action) { + base.OnAction(action); + + #region remote diagnostic if (remote) { if (action.wID != Action.ActionType.ACTION_KEY_PRESSED) - GUIPropertyManager.SetProperty("#btWeb.status", action.wID.ToString()); + GUIPropertyManager.SetProperty("#btWeb.status", DateTime.Now.ToLongTimeString() + " : " + + action.wID.ToString()); else - GUIPropertyManager.SetProperty("#btWeb.status", action.wID.ToString() + " / " + action.m_key.KeyChar.ToString()); + GUIPropertyManager.SetProperty("#btWeb.status", DateTime.Now.ToLongTimeString() + " : " + + action.wID.ToString() + " / " + action.m_key.KeyChar.ToString()); } + #endregion string strAction = action.wID.ToString(); - if (strAction == remote_1) + #region selectable buttons + if (strAction == remote_confirm) { if (linkId != string.Empty) { - MyLog.debug("confirm2 link pressed"); + MyLog.debug("confirm link pressed"); OnLinkId(linkId); } else { MyLog.debug("confirm2 link pressed, no link present"); } + return; } + if (strAction == remote_bookmark) + { + GUIWindowManager.ActivateWindow(54537688); + return; + } + if ((strAction == remote_zoom_in) || + (action.wID == Action.ActionType.ACTION_MUSIC_FORWARD)) + { + if (zoom < 2) zoom += 0.1f; + webBrowser.Zoom = zoom; + if (!remote) GUIPropertyManager.SetProperty("#btWeb.status", "Zoom set to " + (int)(zoom * 100)); + } + if ((strAction == remote_zoom_out) || + (action.wID == Action.ActionType.ACTION_MUSIC_REWIND)) + { + if (zoom > 0.1f) zoom -= 0.1f; + webBrowser.Zoom = zoom; + if (!remote) GUIPropertyManager.SetProperty("#btWeb.status", "Zoom set to " + (int)(zoom * 100)); + } + if (strAction == remote_status) + { + statusBar = !statusBar; + if (statusBar) + webBrowser.Size = new System.Drawing.Size(GUIGraphicsContext.form.Width, GUIGraphicsContext.form.Height - 100); + else + webBrowser.Size = new System.Drawing.Size(GUIGraphicsContext.form.Width, GUIGraphicsContext.form.Height); + } + #endregion switch (action.wID) { - case Action.ActionType.ACTION_VOLUME_MUTE: - /* - * test * - Cursor.Position = new Point(250, 350); - - Cursor.Show(); - mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP, Cursor.Position.X, Cursor.Position.Y, 0, 0); - Cursor.Hide(); - */ - break; case Action.ActionType.ACTION_KEY_PRESSED: linkTime = 0; MyLog.debug("action key press=" + action.m_key.KeyChar); @@ -451,7 +489,6 @@ case Action.ActionType.ACTION_PLAY: case Action.ActionType.ACTION_MUSIC_PLAY: webBrowser.Visible = false; - string selectedUrl = "http://"; if (ShowKeyboard(ref selectedUrl, false) == System.Windows.Forms.DialogResult.OK) { @@ -468,78 +505,29 @@ case Action.ActionType.ACTION_PAUSE: webBrowser.Navigate(homepage); MyLog.debug("load home page " + homepage); - GUIPropertyManager.SetProperty("#btWeb.status", "go to homepage"); + if (!remote) GUIPropertyManager.SetProperty("#btWeb.status", "go to homepage"); break; case Action.ActionType.ACTION_STOP: webBrowser.Navigate("about:blank"); - GUIPropertyManager.SetProperty("#btWeb.status", "Stop"); + if (!remote) GUIPropertyManager.SetProperty("#btWeb.status", "Stop"); break; - case Action.ActionType.ACTION_PARENT_DIR: - case Action.ActionType.ACTION_ASPECT_RATIO: - if (linkId != string.Empty) - { - MyLog.debug("confirm link pressed"); - OnLinkId(linkId); - } - else - { - MyLog.debug("confirm link pressed, no link present"); - } - break; - case Action.ActionType.ACTION_CONTEXT_MENU: - case Action.ActionType.ACTION_SHOW_INFO: - GUIWindowManager.ActivateWindow(54537688); - return; case Action.ActionType.ACTION_PREV_ITEM: + case Action.ActionType.ACTION_REWIND: webBrowser.GoBack(); - GUIPropertyManager.SetProperty("#btWeb.status", "go backward"); + if (!remote) GUIPropertyManager.SetProperty("#btWeb.status", "go backward"); MyLog.debug("navigate go back"); break; case Action.ActionType.ACTION_NEXT_ITEM: + case Action.ActionType.ACTION_FORWARD: webBrowser.GoForward(); - GUIPropertyManager.SetProperty("#btWeb.status", "go forward"); + if (!remote) GUIPropertyManager.SetProperty("#btWeb.status", "go forward"); MyLog.debug("navigate go forward"); break; case Action.ActionType.ACTION_RECORD: - string title = webBrowser.Document.Title; - string actualUrl = webBrowser.Document.Url.ToString(); - title = title.Replace("\0", ""); - - webBrowser.Visible = false; - - System.Windows.Forms.DialogResult result = ShowKeyboard(ref title, false); - if (result == System.Windows.Forms.DialogResult.OK) - { - bool hasSaved = Bookmark.SavaBookmark(title, actualUrl, Config.GetFolder(MediaPortal.Configuration.Config.Dir.Config) + "\\bookmarks.xml"); - if (hasSaved) - ShowAlert("Bookmark has been saved !", "Title : " + title, "URL : " + actualUrl, ""); - else - ShowAlert("Bookmark could not been saved !", "Title : " + title, "URL : " + actualUrl, ""); - } - - webBrowser.Visible = true; + OnAddBookmark(); break; - case Action.ActionType.ACTION_SHOW_GUI: - statusBar = !statusBar; - if (statusBar) - webBrowser.Size = new System.Drawing.Size(GUIGraphicsContext.form.Width, GUIGraphicsContext.form.Height - 100); - else - webBrowser.Size = new System.Drawing.Size(GUIGraphicsContext.form.Width, GUIGraphicsContext.form.Height); - break; - #region zoom & move - case Action.ActionType.ACTION_ZOOM_IN: - case Action.ActionType.ACTION_PAGE_UP: - if (zoom < 2) zoom += 0.1f; - webBrowser.Zoom = zoom; - GUIPropertyManager.SetProperty("#btWeb.status", "Zoom set to " + (int)(zoom * 100)); - break; - case Action.ActionType.ACTION_ZOOM_OUT: - case Action.ActionType.ACTION_PAGE_DOWN: - if (zoom > 0.1f) zoom -= 0.1f; - webBrowser.Zoom = zoom; - GUIPropertyManager.SetProperty("#btWeb.status", "Zoom set to " + (int)(zoom * 100)); - break; + #region move case Action.ActionType.ACTION_MOVE_RIGHT: if (webBrowser.Window != null) ScrollTo(webBrowser.Window.ScrollX + 100, webBrowser.Window.ScrollY); break; @@ -559,9 +547,65 @@ else GUIPropertyManager.SetProperty("#btWeb.linkid", linkId); - base.OnAction(action); + } + private void OnAddBookmark() + { + #region save snapshot + long id = Setup.actualID; + + if (webBrowser.Url.ToString() != "about:blank") + { + int y = webBrowser.Height; + int x = y / 4 * 3; + + int offset = (webBrowser.Width - x) / 2; + + Bitmap snap = new Bitmap(webBrowser.Width, webBrowser.Height); + webBrowser.DrawToBitmap(snap, new Rectangle(0, 0, webBrowser.Width, webBrowser.Height)); + + snap = CopyBitmap(snap, new Rectangle(offset, 0, x, y)); + + snap = MediaPortal.Util.BitmapResize.Resize(ref snap, 300, 400, false, true); + + Graphics g = Graphics.FromImage((Image)snap); + g.DrawRectangle(new Pen(Color.Black, 2), new Rectangle(1, 1, snap.Width - 2, snap.Height - 2)); + + Bookmark.SaveSnap(snap, id); + Setup.IncAndSaveID(); + } + #endregion + + webBrowser.Visible = false; + + string title = webBrowser.Document.Title; + string actualUrl = webBrowser.Document.Url.ToString(); + + title = title.Replace("\0", ""); + + System.Windows.Forms.DialogResult result = ShowKeyboard(ref title, false); + if (result == System.Windows.Forms.DialogResult.OK) + { + bool hasSaved = BookmarkXml.AddBookmark(title, actualUrl, Config.GetFolder(MediaPortal.Configuration.Config.Dir.Config) + "\\bookmarks.xml", id); + if (hasSaved) + ShowAlert("Bookmark has been saved !", "Title : " + title, "URL : " + actualUrl, ""); + else + ShowAlert("Bookmark could not been saved !", "Title : " + title, "URL : " + actualUrl, ""); + } + webBrowser.Visible = true; + } + private Bitmap CopyBitmap(Bitmap srcBitmap, Rectangle section) + { + Bitmap bmp = new Bitmap(section.Width, section.Height); + Graphics g = Graphics.FromImage(bmp); + + g.DrawImage(srcBitmap, 0, 0, section, GraphicsUnit.Pixel); + g.Dispose(); + + return bmp; + } + private void ScrollTo(int x, int y) { webBrowser.Window.ScrollTo(x, y); @@ -731,25 +775,6 @@ lastDomain = webBrowser.Document.Domain; } #endregion - - #region save snapshot - - if (webBrowser.Url.ToString() != "about:blank") - { - if (cacheThumbs) - { - Bitmap snap = new Bitmap(webBrowser.Width, webBrowser.Height); - webBrowser.DrawToBitmap(snap, new Rectangle(0, 0, webBrowser.Width, webBrowser.Height)); - - snap = MediaPortal.Util.BitmapResize.Resize(ref snap, 300, 400, false, true); - - Graphics g = Graphics.FromImage((Image)snap); - g.DrawRectangle(new Pen(Color.Black, 2), new Rectangle(1, 1, snap.Width - 2, snap.Height - 2)); - - Bookmark.SaveSnap(snap, webBrowser.Url.ToString()); - } - } - #endregion } catch (Exception ex) { Modified: trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/GetThumb.cs =================================================================== --- trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/GetThumb.cs 2010-11-15 09:46:38 UTC (rev 3937) +++ trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/GetThumb.cs 2010-11-15 19:49:11 UTC (rev 3938) @@ -13,6 +13,7 @@ public partial class GetThumb : Form { public string SelectedUrl = string.Empty; + private long id = 0; private GeckoWebBrowser browser; private Bitmap snap; @@ -20,12 +21,14 @@ private int time = 0; private int cancel = 0; - public GetThumb() + public GetThumb(long ID) { InitializeComponent(); browser = new GeckoWebBrowser(); this.Controls.Add(browser); + + id = ID; } private void GetThumb_Load(object sender, EventArgs e) { @@ -34,7 +37,7 @@ txtUrl.Text = SelectedUrl; - browser.Size = new Size(600, 800); + browser.Size = new Size(800, 1024); browser.DocumentCompleted += new EventHandler(browser_DocumentCompleted); browser.Navigate(SelectedUrl); } @@ -51,7 +54,7 @@ Graphics g = Graphics.FromImage((Image)snap); g.DrawRectangle(new Pen(Color.Black, 2), new Rectangle(1, 1, snap.Width - 2, snap.Height - 2)); - Bookmark.SaveSnap(snap, SelectedUrl); + Bookmark.SaveSnap(snap, id); received = true; chkGetThumb.Checked = true; } Modified: trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/ImportFF.cs =================================================================== --- trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/ImportFF.cs 2010-11-15 09:46:38 UTC (rev 3937) +++ trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/ImportFF.cs 2010-11-15 19:49:11 UTC (rev 3938) @@ -38,7 +38,7 @@ { public partial class ImportFF : Form { - private List<Bookmark> EntryList = new List<Bookmark>(); + private List<BookmarkElement> EntryList = new List<BookmarkElement>(); private TreeView tree; private bool select = true; @@ -79,7 +79,7 @@ prgState.Value = (counter * 100 / max); string name = (string)item; - Bookmark bkm = GetBookmark(name); + BookmarkElement bkm = GetBookmark(name); if (bkm != null) { @@ -87,17 +87,21 @@ { imported++; + long id = Setup.actualID; + Setup.IncAndSaveID(); + TreeNode add = node.Nodes.Add(bkm.Url, bkm.Name); - Bookmark addBkm = new Bookmark(); + BookmarkElement addBkm = new BookmarkElement(); addBkm.Name = bkm.Name; addBkm.Url = bkm.Url; addBkm.isSubFolder = true; + addBkm.Id = id; add.Tag = addBkm; if (chkThumbs.Checked) { - GetThumb thumb = new GetThumb(); + GetThumb thumb = new GetThumb(id); thumb.SelectedUrl = bkm.Url; thumb.ShowDialog(); } @@ -148,7 +152,7 @@ string title = row.fields[0].ToString(); string url = row.fields[1].ToString(); - Bookmark bkm = new Bookmark(); + BookmarkElement bkm = new BookmarkElement(); bkm.Url = url; bkm.Name = title; @@ -168,9 +172,9 @@ } } - private Bookmark GetBookmark(string Name) + private BookmarkElement GetBookmark(string Name) { - foreach (Bookmark bkm in EntryList) + foreach (BookmarkElement bkm in EntryList) { if (bkm.Name == Name) return bkm; } Modified: trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/ImportIE.cs =================================================================== --- trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/ImportIE.cs 2010-11-15 09:46:38 UTC (rev 3937) +++ trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/ImportIE.cs 2010-11-15 19:49:11 UTC (rev 3938) @@ -36,7 +36,7 @@ { public partial class ImportIE : Form { - private List<Bookmark> EntryList = new List<Bookmark>(); + private List<BookmarkElement> EntryList = new List<BookmarkElement>(); private TreeView tree; private bool select = true; @@ -77,7 +77,7 @@ prgState.Value = (counter * 100 / max); string name = (string)item; - Bookmark bkm = GetBookmark(name); + BookmarkElement bkm = GetBookmark(name); if (bkm != null) { @@ -85,17 +85,21 @@ { imported++; + long id = Setup.actualID; + Setup.IncAndSaveID(); + TreeNode add = node.Nodes.Add(bkm.Url, bkm.Name); - Bookmark addBkm = new Bookmark(); + BookmarkElement addBkm = new BookmarkElement(); addBkm.Name = bkm.Name; addBkm.Url = bkm.Url; addBkm.isSubFolder = true; + addBkm.Id = id; add.Tag = addBkm; if (chkThumbs.Checked) { - GetThumb thumb = new GetThumb(); + GetThumb thumb = new GetThumb(id); thumb.SelectedUrl = bkm.Url; thumb.ShowDialog(); } @@ -143,7 +147,7 @@ if (url != null) { - Bookmark bkm = new Bookmark(); + BookmarkElement bkm = new BookmarkElement(); bkm.Url = url; bkm.Name = name; @@ -167,7 +171,7 @@ if (url != null) { - Bookmark bkm = new Bookmark(); + BookmarkElement bkm = new BookmarkElement(); bkm.Url = url; bkm.Name = name; @@ -195,9 +199,9 @@ } return null; } - private Bookmark GetBookmark(string Name) + private BookmarkElement GetBookmark(string Name) { - foreach (Bookmark bkm in EntryList) + foreach (BookmarkElement bkm in EntryList) { if (bkm.Name == Name) return bkm; } Modified: trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Properties/AssemblyInfo.cs 2010-11-15 09:46:38 UTC (rev 3937) +++ trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Properties/AssemblyInfo.cs 2010-11-15 19:49:11 UTC (rev 3938) @@ -32,5 +32,5 @@ // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern // übernehmen, indem Sie "*" eingeben: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.2.4.2")] -[assembly: AssemblyFileVersion("0.2.4.2")] +[assembly: AssemblyVersion("0.2.5.0")] +[assembly: AssemblyFileVersion("0.2.5.0")] Modified: trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Setup.Designer.cs =================================================================== --- trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Setup.Designer.cs 2010-11-15 09:46:38 UTC (rev 3937) +++ trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/Setup.Designer.cs 2010-11-15 19:49:11 UTC (rev 3938) @@ -88,10 +88,48 @@ this.label5 = new System.Windows.Forms.Label(); this.chkProxy = new System.Windows.Forms.CheckBox(); this.tabPage4 = new System.Windows.Forms.TabPage(); + this.btnDefault = new System.Windows.Forms.Button(); + this.groupBox11 = new System.Windows.Forms.GroupBox(); + this.label33 = new System.Windows.Forms.Label(); + this.label34 = new System.Windows.Forms.Label(); + this.cmbZoomOut = new System.Windows.Forms.ComboBox(); + this.label31 = new System.Windows.Forms.Label(); + this.label32 = new System.Windows.Forms.Label(); + this.cmbZoomIn = new System.Windows.Forms.ComboBox(); + this.groupBox10 = new System.Windows.Forms.GroupBox(); + this.label35 = new System.Windows.Forms.Label(); + this.cmbShowBookmarks = new System.Windows.Forms.ComboBox(); + this.label29 = new System.Windows.Forms.Label(); + this.label30 = new System.Windows.Forms.Label(); + this.label27 = new System.Windows.Forms.Label(); + this.label28 = new System.Windows.Forms.Label(); + this.label25 = new System.Windows.Forms.Label(); + this.label26 = new System.Windows.Forms.Label(); + this.label23 = new System.Windows.Forms.Label(); + this.label24 = new System.Windows.Forms.Label(); + this.label13 = new System.Windows.Forms.Label(); + this.label14 = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.label12 = new System.Windows.Forms.Label(); + this.groupBox9 = new System.Windows.Forms.GroupBox(); + this.cmbStatusBar = new System.Windows.Forms.ComboBox(); + this.label10 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.label8 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); - this.comboBox1 = new System.Windows.Forms.ComboBox(); + this.cmbConfirmLink = new System.Windows.Forms.ComboBox(); this.chkRemote = new System.Windows.Forms.CheckBox(); - this.listBox1 = new System.Windows.Forms.ListBox(); + this.label15 = new System.Windows.Forms.Label(); + this.label16 = new System.Windows.Forms.Label(); + this.label17 = new System.Windows.Forms.Label(); + this.label18 = new System.Windows.Forms.Label(); + this.comboBox3 = new System.Windows.Forms.ComboBox(); + this.label19 = new System.Windows.Forms.Label(); + this.label20 = new System.Windows.Forms.Label(); + this.label21 = new System.Windows.Forms.Label(); + this.label22 = new System.Windows.Forms.Label(); + this.comboBox4 = new System.Windows.Forms.ComboBox(); + this.checkBox1 = new System.Windows.Forms.CheckBox(); this.contextMenuStrip1.SuspendLayout(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); @@ -111,6 +149,9 @@ this.tabPage5.SuspendLayout(); this.groupBox8.SuspendLayout(); this.tabPage4.SuspendLayout(); + this.groupBox11.SuspendLayout(); + this.groupBox10.SuspendLayout(); + this.groupBox9.SuspendLayout(); this.SuspendLayout(); // // treeView1 @@ -434,6 +475,7 @@ this.chkThumbsOnVisit.TabIndex = 1; this.chkThumbsOnVisit.Text = "cache thumb if a page is visited"; this.chkThumbsOnVisit.UseVisualStyleBackColor = true; + this.chkThumbsOnVisit.Visible = false; // // chkUseThumbs // @@ -711,10 +753,11 @@ // // tabPage4 // - this.tabPage4.Controls.Add(this.label1); - this.tabPage4.Controls.Add(this.comboBox1); + this.tabPage4.Controls.Add(this.btnDefault); + this.tabPage4.Controls.Add(this.groupBox11); + this.tabPage4.Controls.Add(this.groupBox10); + this.tabPage4.Controls.Add(this.groupBox9); this.tabPage4.Controls.Add(this.chkRemote); - this.tabPage4.Controls.Add(this.listBox1); this.tabPage4.Location = new System.Drawing.Point(4, 25); this.tabPage4.Name = "tabPage4"; this.tabPage4.Padding = new System.Windows.Forms.Padding(3); @@ -722,42 +765,406 @@ this.tabPage4.TabIndex = 3; this.tabPage4.Text = "Keyboard"; // + // btnDefault + // + this.btnDefault.Location = new System.Drawing.Point(417, 439); + this.btnDefault.Name = "btnDefault"; + this.btnDefault.Size = new System.Drawing.Size(119, 31); + this.btnDefault.TabIndex = 33; + this.btnDefault.Text = "set to default"; + this.btnDefault.UseVisualStyleBackColor = true; + this.btnDefault.Click += new System.EventHandler(this.btnDefault_Click); + // + // groupBox11 + // + this.groupBox11.Controls.Add(this.label33); + this.groupBox11.Controls.Add(this.label34); + this.groupBox11.Controls.Add(this.cmbZoomOut); + this.groupBox11.Controls.Add(this.label31); + this.groupBox11.Controls.Add(this.label32); + this.groupBox11.Controls.Add(this.cmbZoomIn); + this.groupBox11.Location = new System.Drawing.Point(25, 309); + this.groupBox11.Name = "groupBox11"; + this.groupBox11.Size = new System.Drawing.Size(511, 124); + this.groupBox11.TabIndex = 32; + this.groupBox11.TabStop = false; + this.groupBox11.Text = "Move/Zoom"; + // + // label33 + // + this.label33.AutoSize = true; + this.label33.Location = new System.Drawing.Point(180, 96); + this.label33.Name = "label33"; + this.label33.Size = new System.Drawing.Size(149, 16); + this.label33.TabIndex = 29; + this.label33.Text = "cursor up/down/left/right"; + // + // label34 + // + this.label34.AutoSize = true; + this.label34.Location = new System.Drawing.Point(5, 96); + this.label34.Name = "label34"; + this.label34.Size = new System.Drawing.Size(42, 16); + this.label34.TabIndex = 28; + this.label34.Text = "move"; + // + // cmbZoomOut + // + this.cmbZoomOut.FormattingEnabled = true; + this.cmbZoomOut.Location = new System.Drawing.Point(183, 67); + this.cmbZoomOut.Name = "cmbZoomOut"; + this.cmbZoomOut.Size = new System.Drawing.Size(272, 24); + this.cmbZoomOut.TabIndex = 27; + // + // label31 + // + this.label31.AutoSize = true; + this.label31.Location = new System.Drawing.Point(5, 75); + this.label31.Name = "label31"; + this.label31.Size = new System.Drawing.Size(62, 16); + this.label31.TabIndex = 26; + this.label31.Text = "zoom out"; + // + // label32 + // + this.label32.AutoSize = true; + this.label32.Location = new System.Drawing.Point(5, 37); + this.label32.Name = "label32"; + this.label32.Size = new System.Drawing.Size(54, 16); + this.label32.TabIndex = 25; + this.label32.Text = "zoom in"; + // + // cmbZoomIn + // + this.cmbZoomIn.FormattingEnabled = true; + this.cmbZoomIn.Location = new System.Drawing.Point(183, 34); + this.cmbZoomIn.Name = "cmbZoomIn"; + this.cmbZoomIn.Size = new System.Drawing.Size(272, 24); + this.cmbZoomIn.TabIndex = 24; + // + // groupBox10 + // + this.groupBox10.Controls.Add(this.label35); + this.groupBox10.Controls.Add(this.cmbShowBookmarks); + this.groupBox10.Controls.Add(this.label29); + this.groupBox10.Controls.Add(this.label30); + this.groupBox10.Controls.Add(this.label27); + this.groupBox10.Controls.Add(this.label28); + this.groupBox10.Controls.Add(this.label25); + this.groupBox10.Controls.Add(this.label26); + this.groupBox10.Controls.Add(this.label23); + this.groupBox10.Controls.Add(this.label24); + this.groupBox10.Controls.Add(this.label13); + this.groupBox10.Controls.Add(this.label14); + this.groupBox10.Controls.Add(this.label11); + this.groupBox10.Controls.Add(this.label12); + this.groupBox10.Location = new System.Drawing.Point(25, 6); + this.groupBox10.Name = "groupBox10"; + this.groupBox10.Size = new System.Drawing.Size(511, 169); + this.groupBox10.TabIndex = 31; + this.groupBox10.TabStop = false; + this.groupBox10.Text = "Navigation"; + // + // label35 + // + this.label35.AutoSize = true; + this.label35.Location = new System.Drawing.Point(6, 126); + this.label35.Name = "label35"; + this.label35.Size = new System.Drawing.Size(112, 16); + this.label35.TabIndex = 25; + this.label35.Text = "Show bookmarks"; + // + // cmbShowBookmarks + // + this.cmbShowBookmarks.FormattingEnabled = true; + this.cmbShowBookmarks.Location = new System.Drawing.Point(184, 123); + this.cmbShowBookmarks.Name = "cmbShowBookmarks"; + this.cmbShowBookmarks.Size = new System.Drawing.Size(272, 24); + this.cmbShowBookmarks.TabIndex = 24; + // + // label29 + // + this.label29.AutoSize = true; + this.label29.Location = new System.Drawing.Point(181, 101); + this.label29.Name = "label29"; + this.label29.Size = new System.Drawing.Size(74, 16); + this.label29.TabIndex = 23; + this.label29.Text = "(R) Record"; + // + // label30 + // + this.label30.AutoSize = true; + this.label30.Location = new System.Drawing.Point(6, 101); + this.label30.Name = "label30"; + this.label30.Size = new System.Drawing.Size(96, 16); + this.label30.TabIndex = 22; + this.label30.Text = "add bookmark"; + // + // label27 + // + this.label27.AutoSize = true; + this.label27.Location = new System.Drawing.Point(181, 85); + this.label27.Name = "label27"; + this.label27.Size = new System.Drawing.Size(124, 16); + this.label27.TabIndex = 21; + this.label27.Text = "(F8) Step backward"; + // + // label28 + // + this.label28.AutoSize = true; + this.label28.Location = new System.Drawing.Point(6, 85); + this.label28.Name = "label28"; + this.label28.Size = new System.Drawing.Size(86, 16); + this.label28.TabIndex = 20; + this.label28.Text = "go backward"; + // + // label25 + // + this.label25.AutoSize = true; + this.label25.Location = new System.Drawing.Point(181, 69); + this.label25.Name = "label25"; + this.label25.Size = new System.Drawing.Size(109, 16); + this.label25.TabIndex = 19; + this.label25.Text = "(F7) Step forward"; + // + // label26 + // + this.label26.AutoSize = true; + this.label26.Location = new System.Drawing.Point(6, 69); + this.label26.Name = "label26"; + this.label26.Size = new System.Drawing.Size(71, 16); + this.label26.TabIndex = 18; + this.label26.Text = "go forward"; + // + // label23 + // + this.label23.AutoSize = true; + this.label23.Location = new System.Drawing.Point(181, 53); + this.label23.Name = "label23"; + this.label23.Size = new System.Drawing.Size(56, 16); + this.label23.TabIndex = 17; + this.label23.Text = "(B) Stop"; + // + // label24 + // + this.label24.AutoSize = true; + this.label24.Location = new System.Drawing.Point(6, 53); + this.label24.Name = "label24"; + this.label24.Size = new System.Drawing.Size(85, 16); + this.label24.TabIndex = 16; + this.label24.Text = "blank screen"; + // + // label13 + // + this.label13.AutoSize = true; + this.label13.Location = new System.Drawing.Point(181, 37); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(98, 16); + this.label13.TabIndex = 15; + this.label13.Text = "(Space) Pause"; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.Location = new System.Drawing.Point(6, 37); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(75, 16); + this.label14.TabIndex = 14; + this.label14.Text = "go to home"; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.Location = new System.Drawing.Point(181, 21); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(55, 16); + this.label11.TabIndex = 13; + this.label11.Text = "(P) Play"; + // + // label12 + // + this.label12.AutoSize = true; + this.label12.Location = new System.Drawing.Point(6, 21); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(85, 16); + this.label12.TabIndex = 12; + this.label12.Text = "select a URL"; + // + // groupBox9 + // + this.groupBox9.Controls.Add(this.cmbStatusBar); + this.groupBox9.Controls.Add(this.label10); + this.groupBox9.Controls.Add(this.label9); + this.groupBox9.Controls.Add(this.label8); + this.groupBox9.Controls.Add(this.label1); + this.groupBox9.Controls.Add(this.cmbConfirmLink); + this.groupBox9.Location = new System.Drawing.Point(25, 181); + this.groupBox9.Name = "groupBox9"; + this.groupBox9.Size = new System.Drawing.Size(511, 122); + this.groupBox9.TabIndex = 30; + this.groupBox9.TabStop = false; + this.groupBox9.Text = "Link ID"; + // + // cmbStatusBar + // + this.cmbStatusBar.FormattingEnabled = true; + this.cmbStatusBar.Location = new System.Drawing.Point(183, 78); + this.cmbStatusBar.Name = "cmbStatusBar"; + this.cmbStatusBar.Size = new System.Drawing.Size(272, 24); + this.cmbStatusBar.TabIndex = 11; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(5, 86); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(102, 16); + this.label10.TabIndex = 10; + this.label10.Text = "Show status bar"; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(180, 20); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(52, 16); + this.label9.TabIndex = 9; + this.label9.Text = "Key 0-9"; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(5, 20); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(78, 16); + this.label8.TabIndex = 8; + this.label8.Text = "Enter link ID"; + // // label1 // this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(284, 397); + this.label1.Location = new System.Drawing.Point(5, 48); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(92, 16); this.label1.TabIndex = 7; this.label1.Text = "Confirm link ID"; // - // comboBox1 + // cmbConfirmLink // - this.comboBox1.FormattingEnabled = true; - this.comboBox1.Location = new System.Drawing.Point(6, 393); - this.comboBox1.Name = "comboBox1"; - this.comboBox1.Size = new System.Drawing.Size(272, 24); - this.comboBox1.TabIndex = 6; + this.cmbConfirmLink.FormattingEnabled = true; + this.cmbConfirmLink.Location = new System.Drawing.Point(183, 45); + this.cmbConfirmLink.Name = "cmbConfirmLink"; + this.cmbConfirmLink.Size = new System.Drawing.Size(272, 24); + this.cmbConfirmLink.TabIndex = 6; // // chkRemote // this.chkRemote.AutoSize = true; - this.chkRemote.Location = new System.Drawing.Point(6, 441); + this.chkRemote.Location = new System.Drawing.Point(25, 445); this.chkRemote.Name = "chkRemote"; this.chkRemote.Size = new System.Drawing.Size(199, 20); this.chkRemote.TabIndex = 5; t... [truncated message content] |