You can subscribe to this list here.
2007 |
Jan
(36) |
Feb
(79) |
Mar
(123) |
Apr
(95) |
May
(119) |
Jun
(172) |
Jul
(124) |
Aug
(100) |
Sep
(83) |
Oct
(52) |
Nov
(97) |
Dec
(87) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(131) |
Feb
(80) |
Mar
(163) |
Apr
(178) |
May
(73) |
Jun
(54) |
Jul
(106) |
Aug
(118) |
Sep
(50) |
Oct
(125) |
Nov
(100) |
Dec
(99) |
2009 |
Jan
(104) |
Feb
(99) |
Mar
(68) |
Apr
(81) |
May
(52) |
Jun
(87) |
Jul
(67) |
Aug
(33) |
Sep
(27) |
Oct
(37) |
Nov
(60) |
Dec
(116) |
2010 |
Jan
(82) |
Feb
(79) |
Mar
(38) |
Apr
(50) |
May
(45) |
Jun
(53) |
Jul
(23) |
Aug
(86) |
Sep
(22) |
Oct
(96) |
Nov
(97) |
Dec
(73) |
2011 |
Jan
(24) |
Feb
(45) |
Mar
(28) |
Apr
(31) |
May
(42) |
Jun
(25) |
Jul
|
Aug
(12) |
Sep
(28) |
Oct
(13) |
Nov
(43) |
Dec
(13) |
2012 |
Jan
(62) |
Feb
(28) |
Mar
(6) |
Apr
(16) |
May
(7) |
Jun
|
Jul
(16) |
Aug
(2) |
Sep
(1) |
Oct
(4) |
Nov
(1) |
Dec
(3) |
2013 |
Jan
(5) |
Feb
|
Mar
(34) |
Apr
(9) |
May
(6) |
Jun
(10) |
Jul
(32) |
Aug
(8) |
Sep
(11) |
Oct
(35) |
Nov
(24) |
Dec
(22) |
2014 |
Jan
(44) |
Feb
(9) |
Mar
(9) |
Apr
(15) |
May
(25) |
Jun
(34) |
Jul
(16) |
Aug
(11) |
Sep
(7) |
Oct
(6) |
Nov
(1) |
Dec
(12) |
2015 |
Jan
(33) |
Feb
(19) |
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(5) |
From: <che...@us...> - 2007-08-06 17:51:49
|
Revision: 798 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=798&view=rev Author: chef_koch Date: 2007-08-06 10:51:45 -0700 (Mon, 06 Aug 2007) Log Message: ----------- Added Paths: ----------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsRoot.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsRoot.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsRoot.resx Removed Paths: ------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.resx Deleted: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.Designer.cs 2007-08-06 10:06:44 UTC (rev 797) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.Designer.cs 2007-08-06 17:51:45 UTC (rev 798) @@ -1,139 +0,0 @@ -namespace GUIPrograms.Design -{ - partial class AppSettingsRoot - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { - this.button1 = new System.Windows.Forms.Button(); - this.SuspendLayout(); - // - // enabledCheckbox - // - this.toolTip.SetToolTip(this.enabledCheckbox, "Only enabled items will appear in MediaPortal"); - // - // titleLabel - // - this.titleLabel.Size = new System.Drawing.Size(92, 20); - // - // titleTextBox - // - this.toolTip.SetToolTip(this.titleTextBox, "This text will appear in the listitem of MediaPortal\r\n(mandatory)"); - // - // applicationExeButton - // - this.applicationExeButton.Location = new System.Drawing.Point(359, 70); - // - // shellexecuteCheckBox - // - this.toolTip.SetToolTip(this.shellexecuteCheckBox, "Enable this if you want to run a program that is associated with a specific file-" + - "extension.\r\nYou can omit the \"Launching Application\" in this case."); - // - // applicationArgumentsLabel - // - this.toolTip.SetToolTip(this.applicationArgumentsLabel, "Optional arguments that are needed to launch the program \r\n\r\n(advanced hint: Use " + - "%FILE% if the filename needs to be placed in some specific place between several" + - " arguments)"); - // - // applicationImageTextBox - // - this.toolTip.SetToolTip(this.applicationImageTextBox, "Optional filename for an image to display in MediaPortal"); - // - // winStyleComboBox - // - this.toolTip.SetToolTip(this.winStyleComboBox, "Appearance of the launched program. \r\nTry HIDDEN or MINIMIZED for a seamless inte" + - "gration in MediaPortal"); - // - // startupDirTextBox - // - this.toolTip.SetToolTip(this.startupDirComboBox, "Optional path that is passed as the launch-directory \r\n\r\n(advanced hint: Use %FIL" + - "EDIR% if you want to use the directory where the launched file is stored)"); - // - // quoteCheckBox - // - this.toolTip.SetToolTip(this.quoteCheckBox, "Quotes are usually needed to handle filenames with spaces correctly. \r\nAvoid doub" + - "le quotes though!"); - // - // applicationImageButton - // - this.applicationImageButton.Location = new System.Drawing.Point(356, 97); - // - // allowRefreshCheckBox - // - this.toolTip.SetToolTip(this.allowRefreshCheckBox, "Check this if users can run the import through the REFRESH button in MediaPortal." + - ""); - // - // button1 - // - this.button1.Location = new System.Drawing.Point(427, 43); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(44, 23); - this.button1.TabIndex = 32; - this.button1.Text = "Reset"; - this.button1.UseVisualStyleBackColor = true; - this.button1.Click += new System.EventHandler(this.button1_Click); - // - // AppSettingsRoot - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.button1); - this.Name = "AppSettingsRoot"; - this.Load += new System.EventHandler(this.AppSettingsRoot_Load); - this.Controls.SetChildIndex(this.button1, 0); - this.Controls.SetChildIndex(this.prePostButton, 0); - this.Controls.SetChildIndex(this.applicationImageButton, 0); - this.Controls.SetChildIndex(this.applicationExeButton, 0); - this.Controls.SetChildIndex(this.winTypeLabel, 0); - this.Controls.SetChildIndex(this.enabledCheckbox, 0); - this.Controls.SetChildIndex(this.titleLabel, 0); - this.Controls.SetChildIndex(this.applicationExeLabel, 0); - this.Controls.SetChildIndex(this.shellexecuteCheckBox, 0); - this.Controls.SetChildIndex(this.waitExitCheckBox, 0); - this.Controls.SetChildIndex(this.applicationExeTextBox, 0); - this.Controls.SetChildIndex(this.applicationImageLabel, 0); - this.Controls.SetChildIndex(this.applicationArgumentsLabel, 0); - this.Controls.SetChildIndex(this.applicationImageTextBox, 0); - this.Controls.SetChildIndex(this.applicationArgumentsTextBox, 0); - this.Controls.SetChildIndex(this.winStyleLabel, 0); - this.Controls.SetChildIndex(this.winStyleComboBox, 0); - this.Controls.SetChildIndex(this.startupDirComboBox, 0); - this.Controls.SetChildIndex(this.startupDirLabel, 0); - this.Controls.SetChildIndex(this.quoteCheckBox, 0); - this.Controls.SetChildIndex(this.startupDirButton, 0); - this.Controls.SetChildIndex(this.allowRefreshCheckBox, 0); - this.Controls.SetChildIndex(this.informationLabel, 0); - this.Controls.SetChildIndex(this.titleTextBox, 0); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Button button1; - } -} \ No newline at end of file Deleted: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.cs 2007-08-06 10:06:44 UTC (rev 797) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.cs 2007-08-06 17:51:45 UTC (rev 798) @@ -1,121 +0,0 @@ -#region Copyright (C) 2005-2007 Team MediaPortal - -/* - * Copyright (C) 2005-2007 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.ComponentModel; -using System.Data; -using System.Drawing; -using System.Text; -using System.Windows.Forms; - -using GUIPrograms; -using GUIPrograms.Items; -using GUIPrograms.Database; - -namespace GUIPrograms.Design -{ - public partial class AppSettingsRoot : AppSettingsBase - { - bool Loaded = false; - - public AppSettingsRoot() - { - InitializeComponent(); - } - - private void AppSettingsRoot_Load(object sender, EventArgs e) - { - AppItemToForm(null); - Loaded = true; - - enabledCheckbox.Visible = false; - winTypeLabel.Text = "my Programs Alt."; - titleLabel.Text = "Plugin title"; - titleTextBox.Text = " My Programs Alt."; - - applicationExeLabel.Visible = false; - applicationExeTextBox.Visible = false; - applicationExeButton.Visible = false; - - applicationImageLabel.Visible = false; - applicationImageTextBox.Visible = false; - applicationImageButton.Visible = false; - - applicationArgumentsTextBox.Visible = false; - applicationArgumentsLabel.Visible = false; - - winStyleLabel.Visible = false; - winStyleComboBox.Visible = false; - - startupDirButton.Visible = false; - startupDirLabel.Visible = false; - startupDirComboBox.Visible = false; - - - quoteCheckBox.Visible = false; - allowRefreshCheckBox.Visible = false; - waitExitCheckBox.Visible = false; - shellexecuteCheckBox.Visible = false; - informationLabel.Visible = false; - - this.prePostButton.Visible = false; - - } - - public override bool AppItemToForm(ApplicationItem curApp) - { - base.AppItemToForm(curApp); - titleTextBox.Text = DatabaseHandler.ReadSetting(ProgramUtils.cPLUGINTITLE); - if (titleTextBox.Text == "") - { - // PluginTitle.Text = GUILocalizeStrings.Get(0); - titleTextBox.Text = "My Programs Alt."; - } - return true; - } - - public override void FormToAppItem(ApplicationItem curApp) - { - // currentApplication is null! - if (Loaded) - { - if ((titleTextBox.Text != "")) - { - DatabaseHandler.WriteSetting(ProgramUtils.cPLUGINTITLE, titleTextBox.Text); - } - else - { - DatabaseHandler.DeleteSetting(ProgramUtils.cPLUGINTITLE); - } - } - } - - private void button1_Click(object sender, EventArgs e) - { - titleTextBox.Text = "My Programs Alt."; - } - } -} \ No newline at end of file Deleted: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.resx =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.resx 2007-08-06 10:06:44 UTC (rev 797) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.resx 2007-08-06 17:51:45 UTC (rev 798) @@ -1,129 +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> - <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>313, 17</value> - </metadata> - <metadata name="folderBrowserDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>150, 17</value> - </metadata> - <metadata name="openFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>17, 17</value> - </metadata> -</root> \ No newline at end of file Copied: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsRoot.Designer.cs (from rev 797, trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.Designer.cs) =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsRoot.Designer.cs (rev 0) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsRoot.Designer.cs 2007-08-06 17:51:45 UTC (rev 798) @@ -0,0 +1,139 @@ +namespace GUIPrograms.Design +{ + partial class AppSettingsRoot + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.button1 = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // enabledCheckbox + // + this.toolTip.SetToolTip(this.enabledCheckbox, "Only enabled items will appear in MediaPortal"); + // + // titleLabel + // + this.titleLabel.Size = new System.Drawing.Size(92, 20); + // + // titleTextBox + // + this.toolTip.SetToolTip(this.titleTextBox, "This text will appear in the listitem of MediaPortal\r\n(mandatory)"); + // + // applicationExeButton + // + this.applicationExeButton.Location = new System.Drawing.Point(359, 70); + // + // shellexecuteCheckBox + // + this.toolTip.SetToolTip(this.shellexecuteCheckBox, "Enable this if you want to run a program that is associated with a specific file-" + + "extension.\r\nYou can omit the \"Launching Application\" in this case."); + // + // applicationArgumentsLabel + // + this.toolTip.SetToolTip(this.applicationArgumentsLabel, "Optional arguments that are needed to launch the program \r\n\r\n(advanced hint: Use " + + "%FILE% if the filename needs to be placed in some specific place between several" + + " arguments)"); + // + // applicationImageTextBox + // + this.toolTip.SetToolTip(this.applicationImageTextBox, "Optional filename for an image to display in MediaPortal"); + // + // winStyleComboBox + // + this.toolTip.SetToolTip(this.winStyleComboBox, "Appearance of the launched program. \r\nTry HIDDEN or MINIMIZED for a seamless inte" + + "gration in MediaPortal"); + // + // startupDirTextBox + // + this.toolTip.SetToolTip(this.startupDirComboBox, "Optional path that is passed as the launch-directory \r\n\r\n(advanced hint: Use %FIL" + + "EDIR% if you want to use the directory where the launched file is stored)"); + // + // quoteCheckBox + // + this.toolTip.SetToolTip(this.quoteCheckBox, "Quotes are usually needed to handle filenames with spaces correctly. \r\nAvoid doub" + + "le quotes though!"); + // + // applicationImageButton + // + this.applicationImageButton.Location = new System.Drawing.Point(356, 97); + // + // allowRefreshCheckBox + // + this.toolTip.SetToolTip(this.allowRefreshCheckBox, "Check this if users can run the import through the REFRESH button in MediaPortal." + + ""); + // + // button1 + // + this.button1.Location = new System.Drawing.Point(427, 43); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(44, 23); + this.button1.TabIndex = 32; + this.button1.Text = "Reset"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // AppSettingsRoot + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.button1); + this.Name = "AppSettingsRoot"; + this.Load += new System.EventHandler(this.AppSettingsRoot_Load); + this.Controls.SetChildIndex(this.button1, 0); + this.Controls.SetChildIndex(this.prePostButton, 0); + this.Controls.SetChildIndex(this.applicationImageButton, 0); + this.Controls.SetChildIndex(this.applicationExeButton, 0); + this.Controls.SetChildIndex(this.winTypeLabel, 0); + this.Controls.SetChildIndex(this.enabledCheckbox, 0); + this.Controls.SetChildIndex(this.titleLabel, 0); + this.Controls.SetChildIndex(this.applicationExeLabel, 0); + this.Controls.SetChildIndex(this.shellexecuteCheckBox, 0); + this.Controls.SetChildIndex(this.waitExitCheckBox, 0); + this.Controls.SetChildIndex(this.applicationExeTextBox, 0); + this.Controls.SetChildIndex(this.applicationImageLabel, 0); + this.Controls.SetChildIndex(this.applicationArgumentsLabel, 0); + this.Controls.SetChildIndex(this.applicationImageTextBox, 0); + this.Controls.SetChildIndex(this.applicationArgumentsTextBox, 0); + this.Controls.SetChildIndex(this.winStyleLabel, 0); + this.Controls.SetChildIndex(this.winStyleComboBox, 0); + this.Controls.SetChildIndex(this.startupDirComboBox, 0); + this.Controls.SetChildIndex(this.startupDirLabel, 0); + this.Controls.SetChildIndex(this.quoteCheckBox, 0); + this.Controls.SetChildIndex(this.startupDirButton, 0); + this.Controls.SetChildIndex(this.allowRefreshCheckBox, 0); + this.Controls.SetChildIndex(this.informationLabel, 0); + this.Controls.SetChildIndex(this.titleTextBox, 0); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button button1; + } +} \ No newline at end of file Copied: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsRoot.cs (from rev 797, trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.cs) =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsRoot.cs (rev 0) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsRoot.cs 2007-08-06 17:51:45 UTC (rev 798) @@ -0,0 +1,121 @@ +#region Copyright (C) 2005-2007 Team MediaPortal + +/* + * Copyright (C) 2005-2007 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.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +using GUIPrograms; +using GUIPrograms.Items; +using GUIPrograms.Database; + +namespace GUIPrograms.Design +{ + public partial class AppSettingsRoot : AppSettingsBase + { + bool Loaded = false; + + public AppSettingsRoot() + { + InitializeComponent(); + } + + private void AppSettingsRoot_Load(object sender, EventArgs e) + { + AppItemToForm(null); + Loaded = true; + + enabledCheckbox.Visible = false; + winTypeLabel.Text = "my Programs Alt."; + titleLabel.Text = "Plugin title"; + titleTextBox.Text = " My Programs Alt."; + + applicationExeLabel.Visible = false; + applicationExeTextBox.Visible = false; + applicationExeButton.Visible = false; + + applicationImageLabel.Visible = false; + applicationImageTextBox.Visible = false; + applicationImageButton.Visible = false; + + applicationArgumentsTextBox.Visible = false; + applicationArgumentsLabel.Visible = false; + + winStyleLabel.Visible = false; + winStyleComboBox.Visible = false; + + startupDirButton.Visible = false; + startupDirLabel.Visible = false; + startupDirComboBox.Visible = false; + + + quoteCheckBox.Visible = false; + allowRefreshCheckBox.Visible = false; + waitExitCheckBox.Visible = false; + shellexecuteCheckBox.Visible = false; + informationLabel.Visible = false; + + this.prePostButton.Visible = false; + + } + + public override bool AppItemToForm(ApplicationItem curApp) + { + base.AppItemToForm(curApp); + titleTextBox.Text = DatabaseHandler.ReadSetting(ProgramUtils.cPLUGINTITLE); + if (titleTextBox.Text == "") + { + // PluginTitle.Text = GUILocalizeStrings.Get(0); + titleTextBox.Text = "My Programs Alt."; + } + return true; + } + + public override void FormToAppItem(ApplicationItem curApp) + { + // currentApplication is null! + if (Loaded) + { + if ((titleTextBox.Text != "")) + { + DatabaseHandler.WriteSetting(ProgramUtils.cPLUGINTITLE, titleTextBox.Text); + } + else + { + DatabaseHandler.DeleteSetting(ProgramUtils.cPLUGINTITLE); + } + } + } + + private void button1_Click(object sender, EventArgs e) + { + titleTextBox.Text = "My Programs Alt."; + } + } +} \ No newline at end of file Copied: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsRoot.resx (from rev 797, trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.resx) =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsRoot.resx (rev 0) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsRoot.resx 2007-08-06 17:51:45 UTC (rev 798) @@ -0,0 +1,129 @@ +<?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> + <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>313, 17</value> + </metadata> + <metadata name="folderBrowserDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>150, 17</value> + </metadata> + <metadata name="openFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> +</root> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-08-06 10:06:50
|
Revision: 797 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=797&view=rev Author: chef_koch Date: 2007-08-06 03:06:44 -0700 (Mon, 06 Aug 2007) Log Message: ----------- fixed toggles usage of thumbs dir -> request: would need to give the appItem as a parameter, could be solved by moving the OnRetrieveCoverArt() back to ApplicationItem Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/BaseItem.cs Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/BaseItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/BaseItem.cs 2007-08-06 09:46:45 UTC (rev 796) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/BaseItem.cs 2007-08-06 10:06:44 UTC (rev 797) @@ -72,19 +72,21 @@ string imgFile = String.Empty; - if (ProgramUtils.UseThumbsDir()) + // i need the applicationItem as a Parameter, so it would be cool, + // if we could move this method back to ApplicationItem, i only need to give this as a param then + // + //if (ProgramUtils.UseThumbsDir()) + // imgFile = ProgramUtils.GetFileImage( + // this, + // curFileItem); + //else imgFile = curFileItem.Imagefile; - else - imgFile = MediaPortal.Util.Utils.GetCoverArtName( - Config.GetSubFolder(Config.Dir.Thumbs, @"MyProgramsAlt\" + curFileItem.Title), - Path.GetFileNameWithoutExtension(curFileItem.Filename) - ); - if (imgFile != "") + if (File.Exists(imgFile)) { - guiListItem.ThumbnailImage = curFileItem.Imagefile; - guiListItem.IconImageBig = curFileItem.Imagefile; - guiListItem.IconImage = curFileItem.Imagefile; + guiListItem.ThumbnailImage = imgFile; + guiListItem.IconImageBig = imgFile; + guiListItem.IconImage = imgFile; } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-08-06 09:46:48
|
Revision: 796 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=796&view=rev Author: chef_koch Date: 2007-08-06 02:46:45 -0700 (Mon, 06 Aug 2007) Log Message: ----------- moved duplicated code to AppSettingsBase Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGrouper.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsMame.cs Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs 2007-08-05 22:21:57 UTC (rev 795) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs 2007-08-06 09:46:45 UTC (rev 796) @@ -189,9 +189,9 @@ this.winStyleComboBox.FormattingEnabled = true; this.winStyleComboBox.Items.AddRange(new object[] { "Normal", + "Hidden", "Minimized", - "Maximized", - "Hidden"}); + "Maximized"}); this.winStyleComboBox.Location = new System.Drawing.Point(94, 150); this.winStyleComboBox.Name = "winStyleComboBox"; this.winStyleComboBox.Size = new System.Drawing.Size(325, 21); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs 2007-08-05 22:21:57 UTC (rev 795) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs 2007-08-06 09:46:45 UTC (rev 796) @@ -56,94 +56,53 @@ { base.LoadSettings(curApp); - AppItemToForm(curApp); - } + enabledCheckbox.Checked = curApp.Enabled; + titleTextBox.Text = curApp.Title; - public override void SaveSettings(ApplicationItem curApp) - { - base.SaveSettings(curApp); + applicationExeTextBox.Text = curApp.Filename; + applicationArgumentsTextBox.Text = curApp.Arguments; + // Pre-Post-Launch + preLaunch = curApp.PreLaunch; + postLaunch = curApp.PostLaunch; + // ProcessWindowStyle + // The enumerator ProcessWindowStyle has these items: + //Normal = 0, + //Hidden = 1, + //Minimized = 2, + //Maximized = 3, + // In our comboBox we use now the same order, so we only need to use the integer of the enum. + winStyleComboBox.SelectedIndex = (int)curApp.WindowStyle; - FormToAppItem(curApp); - } - - - - - - - - - public virtual bool AppItemToForm(ApplicationItem curApp) - { - if (curApp != null) - { - preLaunch = curApp.PreLaunch; - postLaunch = curApp.PostLaunch; - } - + // Image settings if (ProgramUtils.UseThumbsDir()) - applicationImageTextBox.Text = MediaPortal.Util.Utils.GetCoverArtName( - Config.GetSubFolder(Config.Dir.Thumbs, @"MyProgramsAlt"), - titleTextBox.Text); + applicationImageTextBox.Text = ProgramUtils.GetApplicationImage(curApp); else applicationImageTextBox.Text = curApp.Imagefile; applicationImageTextBox.ReadOnly = ProgramUtils.UseThumbsDir(); applicationImageButton.Visible = !ProgramUtils.UseThumbsDir(); - - return true; } - public virtual void FormToAppItem(ApplicationItem curApp) + public override void SaveSettings(ApplicationItem curApp) { - if (curApp != null) - { - curApp.PreLaunch = preLaunch; - curApp.PostLaunch = postLaunch; - } + base.SaveSettings(curApp); + curApp.Enabled = enabledCheckbox.Checked; + curApp.Title = titleTextBox.Text; + + curApp.Filename = applicationExeTextBox.Text; + curApp.Arguments = applicationArgumentsTextBox.Text; + // Pre-Post-Launch + curApp.PreLaunch = preLaunch; + curApp.PostLaunch = postLaunch; + // ProcessWindowStyle + curApp.WindowStyle = (ProcessWindowStyle)winStyleComboBox.SelectedIndex; + + // Image settings if (!ProgramUtils.UseThumbsDir()) curApp.Imagefile = applicationImageTextBox.Text; } - protected void SetWindowStyle(ProcessWindowStyle val) - { - switch (val) - { - case ProcessWindowStyle.Normal: - winStyleComboBox.SelectedIndex = 0; - break; - case ProcessWindowStyle.Minimized: - winStyleComboBox.SelectedIndex = 1; - break; - case ProcessWindowStyle.Maximized: - winStyleComboBox.SelectedIndex = 2; - break; - case ProcessWindowStyle.Hidden: - winStyleComboBox.SelectedIndex = 3; - break; - } - } - - protected ProcessWindowStyle GetSelectedWindowStyle() - { - if (winStyleComboBox.SelectedIndex == 1) - { - return ProcessWindowStyle.Minimized; - } - else if (winStyleComboBox.SelectedIndex == 2) - { - return ProcessWindowStyle.Maximized; - } - else if (winStyleComboBox.SelectedIndex == 3) - { - return ProcessWindowStyle.Hidden; - } - else - return ProcessWindowStyle.Normal; - - } - private void InitDefault() { //{ Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs 2007-08-05 22:21:57 UTC (rev 795) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs 2007-08-06 09:46:45 UTC (rev 796) @@ -45,15 +45,11 @@ InitializeComponent(); } - public override bool AppItemToForm(ApplicationItem curApp) + public override void LoadSettings(ApplicationItem curApp) { ProgramUtils.FillComboBox("tblPlatform", "platform", platformComboBox); - base.AppItemToForm(curApp); - enabledCheckbox.Checked = curApp.Enabled; - titleTextBox.Text = curApp.Title; - applicationExeTextBox.Text = curApp.Filename; - applicationArgumentsTextBox.Text = curApp.Arguments; - SetWindowStyle(curApp.WindowStyle); + base.LoadSettings(curApp); + startupDirComboBox.Text = curApp.StartupDir; shellexecuteCheckBox.Checked = curApp.UseShellExecute; quoteCheckBox.Checked = curApp.UseQuotes; @@ -63,27 +59,22 @@ { platformComboBox.SelectedValue = curApp.PlatformId; } - - return true; } - public override void FormToAppItem(ApplicationItem curApp) + public override void SaveSettings(ApplicationItem curApp) { - base.FormToAppItem(curApp); - curApp.Enabled = this.enabledCheckbox.Checked; - curApp.Title = titleTextBox.Text; - curApp.Filename = applicationExeTextBox.Text; - curApp.Arguments = applicationArgumentsTextBox.Text; - curApp.WindowStyle = GetSelectedWindowStyle(); + base.SaveSettings(curApp); + curApp.StartupDir = startupDirComboBox.Text; curApp.UseShellExecute = shellexecuteCheckBox.Checked; curApp.UseQuotes = quoteCheckBox.Checked; curApp.WaitForExit = waitExitCheckBox.Checked; curApp.SourceType = ItemType.DIRCACHE; - curApp.RefreshGUIAllowed = (allowRefreshCheckBox.Checked); - curApp.PlatformId =(int) platformComboBox.SelectedValue; + curApp.RefreshGUIAllowed = allowRefreshCheckBox.Checked; + curApp.PlatformId = (int)platformComboBox.SelectedValue; } + public override bool EntriesOK(ApplicationItem curApp) { conditionChecker.Clear(); @@ -104,13 +95,13 @@ return conditionChecker.IsOk; } + public override void LoadFromAppItem(ApplicationItem applicationItem) { titleTextBox.Text = applicationItem.Title; applicationExeTextBox.Text = applicationItem.Filename; applicationArgumentsTextBox.Text = applicationItem.Arguments; - SetWindowStyle(applicationItem.WindowStyle); startupDirComboBox.Text = applicationItem.StartupDir; shellexecuteCheckBox.Checked = applicationItem.UseShellExecute; quoteCheckBox.Checked = applicationItem.UseQuotes; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.cs 2007-08-05 22:21:57 UTC (rev 795) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.cs 2007-08-06 09:46:45 UTC (rev 796) @@ -46,53 +46,41 @@ InitializeComponent(); } - private void AppSettingsGamebase_Load(object sender, EventArgs e) + public override void LoadSettings(ApplicationItem curApp) { - // this.validImagesCheckBox.Checked = true; - this.enabledCheckbox.Checked = true; - this.titleTextBox.Text = "GameBase ..."; - this.winTypeLabel.Text = "GameBase direct importer"; - this.applicationExeTextBox.Text = "<yourpath>gamebase database"; - this.quoteCheckBox.Visible = false; - this.shellexecuteCheckBox.Visible = false; - } + base.LoadSettings(curApp); - public override bool AppItemToForm(ApplicationItem curApp) - { - - base.AppItemToForm(curApp); - this.enabledCheckbox.Checked = curApp.Enabled; - this.titleTextBox.Text = curApp.Title; - this.applicationExeTextBox.Text = curApp.Filename; - this.applicationArgumentsTextBox.Text = curApp.Arguments; this.startupDirComboBox.Text = curApp.StartupDir; - this.quoteCheckBox.Checked = true; //(curApp.UseQuotes); this.waitExitCheckBox.Checked = (curApp.WaitForExit); - SetWindowStyle(curApp.WindowStyle); - this.allowRefreshCheckBox.Checked = curApp.RefreshGUIAllowed; - - return true; } - public override void FormToAppItem(ApplicationItem curApp) + public override void SaveSettings(ApplicationItem curApp) { - base.FormToAppItem(curApp); - curApp.Enabled = this.enabledCheckbox.Checked; - curApp.Title = this.titleTextBox.Text; - curApp.Filename = this.applicationExeTextBox.Text; - curApp.Arguments = this.applicationArgumentsTextBox.Text; - curApp.WindowStyle = GetSelectedWindowStyle(); + base.SaveSettings(curApp); + curApp.StartupDir = this.startupDirComboBox.Text; curApp.UseShellExecute = this.shellexecuteCheckBox.Checked; curApp.UseQuotes = this.quoteCheckBox.Checked; curApp.WaitForExit = this.waitExitCheckBox.Checked; curApp.SourceType = ItemType.GAMEBASE; - curApp.RefreshGUIAllowed = this.allowRefreshCheckBox.Checked; } + + private void AppSettingsGamebase_Load(object sender, EventArgs e) + { + // this.validImagesCheckBox.Checked = true; + this.enabledCheckbox.Checked = true; + this.titleTextBox.Text = "GameBase ..."; + this.winTypeLabel.Text = "GameBase direct importer"; + this.applicationExeTextBox.Text = "<yourpath>gamebase database"; + this.quoteCheckBox.Visible = false; + this.shellexecuteCheckBox.Visible = false; + } + + public override bool EntriesOK(ApplicationItem curApp) { conditionChecker.Clear(); @@ -113,6 +101,7 @@ return conditionChecker.IsOk; } + private void informationLabel_Click(object sender, EventArgs e) { ProcessStartInfo startInfo = new ProcessStartInfo(@"http://www.bu22.com/"); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGrouper.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGrouper.cs 2007-08-05 22:21:57 UTC (rev 795) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGrouper.cs 2007-08-06 09:46:45 UTC (rev 796) @@ -44,6 +44,19 @@ InitializeComponent(); } + public override void LoadSettings(ApplicationItem curApp) + { + base.LoadSettings(curApp); + } + + public override void SaveSettings(ApplicationItem curApp) + { + base.SaveSettings(curApp); + + curApp.SourceType = ItemType.GROUPER; + } + + private void AppSettingsGrouper_Load(object sender, EventArgs e) { winTypeLabel.Text = "Grouper."; @@ -68,25 +81,7 @@ shellexecuteCheckBox.Visible = false; informationLabel.Visible = false; - this.prePostButton.Visible = false; + prePostButton.Visible = false; } - - public override void FormToAppItem(ApplicationItem curApp) - { - base.FormToAppItem(curApp); - curApp.Enabled = enabledCheckbox.Checked; - curApp.Title = titleTextBox.Text; - curApp.SourceType = ItemType.GROUPER; - - } - - public override bool AppItemToForm(ApplicationItem curApp) - { - base.AppItemToForm(curApp); - this.enabledCheckbox.Checked = curApp.Enabled; - titleTextBox.Text = curApp.Title; - - return true; - } } } \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsMame.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsMame.cs 2007-08-05 22:21:57 UTC (rev 795) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsMame.cs 2007-08-06 09:46:45 UTC (rev 796) @@ -46,34 +46,20 @@ InitializeComponent(); } - public override bool AppItemToForm(ApplicationItem curApp) + public override void LoadSettings(ApplicationItem curApp) { - base.AppItemToForm(curApp); - this.enabledCheckbox.Checked = curApp.Enabled; - this.titleTextBox.Text = curApp.Title; - this.applicationExeTextBox.Text = curApp.Filename; - this.applicationArgumentsTextBox.Text = curApp.Arguments; - SetWindowStyle(curApp.WindowStyle); - - return true; + base.LoadSettings(curApp); } - public override void FormToAppItem(ApplicationItem curApp) + public override void SaveSettings(ApplicationItem curApp) { + base.SaveSettings(curApp); - base.FormToAppItem(curApp); - curApp.Enabled = this.enabledCheckbox.Checked; - curApp.Title = this.titleTextBox.Text; - curApp.Filename = this.applicationExeTextBox.Text; - curApp.Arguments = this.applicationArgumentsTextBox.Text; - curApp.WindowStyle = GetSelectedWindowStyle(); curApp.SourceType = ItemType.MAMEDIRECT; - - curApp.RefreshGUIAllowed = true; - } + void catverLink_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e) { LaunchLink(catverLink.Text); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-08-05 22:22:00
|
Revision: 795 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=795&view=rev Author: chef_koch Date: 2007-08-05 15:21:57 -0700 (Sun, 05 Aug 2007) Log Message: ----------- added many fixes/changes/improvements when using thumbsDirectory, most should be fine now Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/FileItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/FileItemInfo.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs 2007-08-05 17:23:42 UTC (rev 794) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs 2007-08-05 22:21:57 UTC (rev 795) @@ -72,21 +72,19 @@ public void Refresh(ApplicationItem curApp) { - if (curApp != null) + if (curApp == null) return; + + currentApplication = curApp; + if (!currentApplication.filesAreLoaded) { - currentApplication = curApp; - if (!currentApplication.filesAreLoaded) - { - currentApplication.LoadFiles(); - } - SyncListView(); + currentApplication.LoadFiles(); } + SyncListView(); } private void SyncListView() { - if (currentApplication == null) - return; + if (currentApplication == null) return; fileListView.BeginUpdate(); try @@ -172,8 +170,15 @@ { this.fileDirTextBox.Text = currentApplication.FileDirectory; - string imageDirectorys = string.Join(";", currentApplication.imageDirs); - this.imageDirsTextBox.Text = imageDirectorys; + if (ProgramUtils.UseThumbsDir()) + { + ProgramUtils.GetApplicationImageFolder(currentApplication); + } + else + { + string imageDirectorys = string.Join(";", currentApplication.imageDirs); + this.imageDirsTextBox.Text = imageDirectorys; + } this.fileExtensionsTextBox.Text = currentApplication.ValidExtensions; // filePathsLabel.Text = currentApplication.CurrentFilePath().Replace("&", "&&"); @@ -181,15 +186,8 @@ public string FileExtensionsText { - - get - { - return fileExtensionsTextBox.Text; - } - set - { - fileExtensionsTextBox.Text = value; - } + get { return fileExtensionsTextBox.Text; } + set { fileExtensionsTextBox.Text = value; } } public bool EntriesOK() @@ -349,118 +347,111 @@ return System.IO.Directory.Exists(firstDirectory); } } - } //scans all files in the fileviewlist //and look for matching imagenames in the imagefolders(if any) private void scanImageDirsButton_Click(object sender, EventArgs e) { - if (FirstImageDirectoryValid()) + if (!FirstImageDirectoryValid()) { + MessageBox.Show("Please set the first imagedirectory before rescanning folders for images!", "Missing or Invalid Imagedirectory"); + return; + } - SetEnabledComponents(false); - scanImageDirsButton.Enabled = false; - scanImageDirsButton.Text = "Scanning for images.."; - Application.DoEvents(); - List<string> imageDirsList = new List<string>(); - if (this.OnImageFolderSearch != null) - { + SetEnabledComponents(false); + scanImageDirsButton.Enabled = false; + scanImageDirsButton.Text = "Scanning for images.."; + Application.DoEvents(); + List<string> imageDirsList = new List<string>(); + if (this.OnImageFolderSearch != null) + { + OnImageFolderSearch(this, null); + } + //get all imagedirs + /* for (int i = 0; i < currentApplication.imageDirs.Length; i++) + { + if (!currentApplication.imageDirs[i].ToString().Equals("")) + { + imageDirsList.Add(currentApplication.imageDirs[i]); + } - OnImageFolderSearch(this, null); + } + */ - } + if (this.imageDirsTextBox.Text != string.Empty) + { + string[] imageDirs = this.imageDirsTextBox.Text.Split(';'); //get all imagedirs - /* for (int i = 0; i < currentApplication.imageDirs.Length; i++) - { - if (!currentApplication.imageDirs[i].ToString().Equals("")) - { - imageDirsList.Add(currentApplication.imageDirs[i]); - } - - } - */ - - if (this.imageDirsTextBox.Text != string.Empty) + for (int i = 0; i < imageDirs.Length; i++) { - string[] imageDirs = this.imageDirsTextBox.Text.Split(';'); - //get all imagedirs - for (int i = 0; i < imageDirs.Length; i++) + if (!imageDirs[i].ToString().Equals("")) { - if (!imageDirs[i].ToString().Equals("")) - { - imageDirsList.Add(imageDirs[i]); - } - + imageDirsList.Add(imageDirs[i]); } + } - try + try + { + //if any imagedirs given + if (imageDirsList.Count > 0) { - //if any imagedirs given - if (imageDirsList.Count > 0) + //for every dir fiven... + foreach (string directory in imageDirsList) { - //for every dir fiven... - foreach (string directory in imageDirsList) + + DirectoryInfo directoryInfo = new DirectoryInfo(directory); + //and for each file in dir + if (directoryInfo.Exists) { + System.IO.FileInfo[] files = directoryInfo.GetFiles(); - DirectoryInfo directoryInfo = new DirectoryInfo(directory); - //and for each file in dir - if (directoryInfo.Exists) + for (int z = 0; z < currentApplication.ItemList.Count; z++) { - System.IO.FileInfo[] files = directoryInfo.GetFiles(); + bool imageFound = false; + string foundImagePath = string.Empty; + FileItem fileItem = (FileItem)currentApplication.ItemList[z]; + string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(fileItem.Filename); - for (int z = 0; z < currentApplication.ItemList.Count; z++) + //check all files if same name can be found + int i = 0; + while ((imageFound == false) && (i < files.Length)) { - bool imageFound = false; - string foundImagePath = string.Empty; - FileItem fileItem = (FileItem)currentApplication.ItemList[z]; - string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(fileItem.Filename); - - //check all files if same name can be found - int i = 0; - while ((imageFound == false) && (i < files.Length)) + if (fileNameWithoutExtension.Equals(Path.GetFileNameWithoutExtension(files[i].ToString()))) { - if (fileNameWithoutExtension.Equals(Path.GetFileNameWithoutExtension(files[i].ToString()))) - { - //found - imageFound = true; - foundImagePath = Path.Combine(directory, files[i].ToString()); - } - i++; + //found + imageFound = true; + foundImagePath = Path.Combine(directory, files[i].ToString()); } + i++; + } - // if an image with same name as file was found - if (foundImagePath != string.Empty) - { - fileItem.Imagefile = foundImagePath; - fileItem.Write(); + // if an image with same name as file was found + if (foundImagePath != string.Empty) + { + fileItem.Imagefile = foundImagePath; + fileItem.Write(); - } } } } } } - catch (Exception ee) - { - - MessageBox.Show(ee.ToString()); - SetEnabledComponents(true); - } } - - scanImageDirsButton.Enabled = true; - scanImageDirsButton.Text = "(Re)Scan imagefolders"; - Application.DoEvents(); - SetEnabledComponents(true); - if (this.OnImageFolderSearch != null) + catch (Exception ee) { - OnImageFolderSearch(this, null); + MessageBox.Show(ee.ToString()); + SetEnabledComponents(true); } } - else + + scanImageDirsButton.Enabled = true; + scanImageDirsButton.Text = "(Re)Scan imagefolders"; + Application.DoEvents(); + SetEnabledComponents(true); + if (this.OnImageFolderSearch != null) { - MessageBox.Show("Please set the first imagedirectory before rescanning folders for images!", "Missing or Invalid Imagedirectory"); + OnImageFolderSearch(this, null); } } @@ -585,35 +576,30 @@ public void FillApplicationItem(ApplicationItem applicationItem) { - if (applicationItem != null) - { + if (applicationItem == null) return; - applicationItem.FileDirectory = fileDirTextBox.Text; + if (!ProgramUtils.UseThumbsDir()) + { applicationItem.ImageDirectory = imageDirsTextBox.Text; - applicationItem.ValidExtensions = fileExtensionsTextBox.Text; + } + applicationItem.FileDirectory = fileDirTextBox.Text; + applicationItem.ValidExtensions = fileExtensionsTextBox.Text; + if ((currentApplication is ApplicationItemMame) || ((currentApplication is ApplicationItemGameBase))) + { + applicationItem.ImportValidImagesOnly = this.validImagesCheckBox.Checked; + } + if ((currentApplication is ApplicationItemMame)) + { + ((ApplicationItemMame)applicationItem).ImportOriginalsOnly = this.importOriginalsCheckBox.Checked; + applicationItem.ImportMameMahjong = this.importMahjongCheckBox.Checked; + applicationItem.ImportMamePlaychoice10 = this.importPlaychoiceCheckBox.Checked; + } - if ((currentApplication is ApplicationItemMame) || ((currentApplication is ApplicationItemGameBase))) - { - applicationItem.ImportValidImagesOnly = this.validImagesCheckBox.Checked; - } - - if ((currentApplication is ApplicationItemMame)) - { - ((ApplicationItemMame)applicationItem).ImportOriginalsOnly = this.importOriginalsCheckBox.Checked; - applicationItem.ImportMameMahjong = this.importMahjongCheckBox.Checked; - applicationItem.ImportMamePlaychoice10 = this.importPlaychoiceCheckBox.Checked; - - } - - if ((currentApplication is ApplicationItemGameBase)) - { - applicationItem.Source = this.gamebaseDBTextBox.Text; - } - - - + if ((currentApplication is ApplicationItemGameBase)) + { + applicationItem.Source = this.gamebaseDBTextBox.Text; } } @@ -674,8 +660,14 @@ if (currentApplication != null) { + if (ProgramUtils.UseThumbsDir()) + imageDirsTextBox.Text = ProgramUtils.GetApplicationImageFolder(currentApplication); + else + imageDirsTextBox.Text = currentApplication.ImageDirectory; + imageDirsTextBox.ReadOnly = ProgramUtils.UseThumbsDir(); + imageDirButton.Visible = !ProgramUtils.UseThumbsDir(); + fileDirTextBox.Text = currentApplication.FileDirectory; - imageDirsTextBox.Text = currentApplication.ImageDirectory; fileExtensionsTextBox.Text = currentApplication.ValidExtensions; @@ -694,7 +686,6 @@ this.importOriginalsCheckBox.Checked = ((ApplicationItemMame)currentApplication).ImportOriginalsOnly; this.importMahjongCheckBox.Checked = currentApplication.ImportMameMahjong; this.importPlaychoiceCheckBox.Checked = currentApplication.ImportMamePlaychoice10; - } if ((currentApplication is ApplicationItemGameBase)) Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs 2007-08-05 17:23:42 UTC (rev 794) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs 2007-08-05 22:21:57 UTC (rev 795) @@ -48,26 +48,14 @@ public ApplicationItem CurApp { - get - { - return m_CurApp; - } - set - { - m_CurApp = value; - } + get { return m_CurApp; } + set { m_CurApp = value; } } public FileItem CurFile { - get - { - return m_CurFile; - } - set - { - m_CurFile = value; - } + get { return m_CurFile; } + set { m_CurFile = value; } } public FileDetailsForm() @@ -83,12 +71,21 @@ gbFileDetails.Text = CurApp.Title + ": " + CurFile.Title; txtTitle.Text = m_CurFile.Title; txtFilename.Text = m_CurFile.Filename; - txtImageFile.Text = m_CurFile.Imagefile; + + if (ProgramUtils.UseThumbsDir()) + { + txtImageFile.Text = ProgramUtils.GetFileImage(CurApp, CurFile); + } + else + { + txtImageFile.Text = m_CurFile.Imagefile; + } + FileItemToGenre(); manufacturerComboBox.SelectedValue = CurFile.ManufacturerId; //txtManufacturer.Text = m_CurFile.Manufacturer; - txtYear.Text = m_CurFile.Year.ToString(); + txtYear.Text = m_CurFile.Year.ToString(); cbRating.SelectedIndex = m_CurFile.Rating; txtCountry.Text = m_CurFile.Country; @@ -241,7 +238,8 @@ { CurFile.Title = txtTitle.Text; CurFile.Filename = txtFilename.Text; - CurFile.Imagefile = txtImageFile.Text; + if (!ProgramUtils.UseThumbsDir()) + CurFile.Imagefile = txtImageFile.Text; // CurFile.MainGenre = genreComboBox.SelectedText; CurFile.MainGenreId = (int)genreComboBox.SelectedValue; //CurFile.SubGenre = subGenreComboBox.SelectedText; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs 2007-08-05 17:23:42 UTC (rev 794) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs 2007-08-05 22:21:57 UTC (rev 795) @@ -941,7 +941,7 @@ // check whether to use thumbsdir or not string imgFile = String.Empty; if (ProgramUtils.UseThumbsDir()) - imgFile = ProgramUtils.GetApplicationImage(applicationItem.Title); + imgFile = ProgramUtils.GetApplicationImage(applicationItem); else imgFile = applicationItem.Imagefile; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs 2007-08-05 17:23:42 UTC (rev 794) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs 2007-08-05 22:21:57 UTC (rev 795) @@ -1043,8 +1043,8 @@ } else { - string candFolder = imageDirs[thumbFolderIndex]; - string candThumb = candFolder + "\\" + fileItem.ExtractImageFileNoPath(); + string candFolder = imageDirs[thumbFolderIndex]; + string candThumb = candFolder + "\\" + Path.GetFileName(fileItem.Imagefile); if ( candThumb.ToLower() != fileItem.Imagefile.ToLower() ) { foundThumb = ( System.IO.File.Exists( candThumb ) ); @@ -1060,7 +1060,7 @@ public virtual string GetCurThumb(GUIListItem item) { - if ( item.MusicTag == null ) return ""; + if ( item.MusicTag == null ) return ""; if ( item.MusicTag is FileItem ) { @@ -1073,9 +1073,12 @@ } else if ( item.MusicTag is ApplicationItem ) { - ApplicationItem curApp = item.MusicTag as ApplicationItem; + ApplicationItem curApp = item.MusicTag as ApplicationItem; - return curApp.Imagefile; + if ( ProgramUtils.UseThumbsDir() ) + return ProgramUtils.GetApplicationImage( curApp ); + else + return curApp.Imagefile; } else return ""; } @@ -1091,7 +1094,7 @@ else { string curFolder = imageDirs[thumbFolderIndex]; - curThumb = curFolder + "\\" + fileItem.ExtractImageFileNoPath(); + curThumb = curFolder + "\\" + Path.GetFileName(fileItem.Imagefile); } if ( thumbIndex > 0 ) @@ -1099,7 +1102,7 @@ // try to find another thumb.... // use the myGames convention: // every thumb has the postfix "_1", "_2", etc with the same file extension - string curExtension = fileItem.ExtractImageExtension(); + string curExtension = Path.GetExtension(fileItem.Imagefile); if ( curThumb != "" ) { string cand = curThumb.Replace( curExtension, "_" + thumbIndex.ToString() + curExtension ); @@ -1121,10 +1124,7 @@ public string GetCurThumbFromThumbsDir(FileItem fileItem) { - string curThumb = MediaPortal.Util.Utils.GetCoverArtName( - Config.GetSubFolder( Config.Dir.Thumbs, @"MyProgramsAlt\" + this.Title ), - Path.GetFileNameWithoutExtension( fileItem.Filename ) - ); + string curThumb = ProgramUtils.GetFileImage(this, fileItem); if ( File.Exists( curThumb ) ) if ( thumbIndex > 0 ) @@ -1132,10 +1132,7 @@ // try to find another thumb.... // use the myGames convention: // every thumb has the postfix "_1", "_2", etc with the same file extension - string cand = MediaPortal.Util.Utils.GetCoverArtName( - Config.GetSubFolder( Config.Dir.Thumbs, @"MyProgramsAlt\" + this.Title ), - Path.GetFileNameWithoutExtension( fileItem.Filename ) + "_" + thumbIndex.ToString() - ); + string cand = ProgramUtils.GetFileImage(this, fileItem, thumbIndex); if ( File.Exists( cand ) ) curThumb = cand; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/FileItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/FileItem.cs 2007-08-05 17:23:42 UTC (rev 794) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/FileItem.cs 2007-08-05 22:21:57 UTC (rev 795) @@ -401,28 +401,33 @@ return nRes; } - public string ExtractImageExtension() - { - string strRes = ""; - string[] parts = this.Imagefile.Split( '.' ); - if ( parts.Length >= 2 ) - { - // there was an extension - strRes = '.' + parts[parts.Length - 1]; - } - return strRes; - } + // + // no need for these methods anymore + // - public string ExtractImageFileNoPath() - { - string strRes = ""; - string[] parts = this.Imagefile.Split( '\\' ); - if ( parts.Length >= 1 ) - { - strRes = parts[parts.Length - 1]; - } - return strRes; - } + //public string ExtractImageExtension() + //{ + // string strRes = ""; + // string[] parts = this.Imagefile.Split( '.' ); + // if ( parts.Length >= 2 ) + // { + // // there was an extension + // strRes = '.' + parts[parts.Length - 1]; + // } + // return strRes; + //} + + //public string ExtractImageFileNoPath() + //{ + // string strRes = ""; + // string[] parts = this.Imagefile.Split( '\\' ); + // if ( parts.Length >= 1 ) + // { + // strRes = parts[parts.Length - 1]; + // } + // return strRes; + //} + public void SetProperties() { /* string strThumb = MediaPortal.Util.Utils.GetLargeCoverArtName(Thumbs.MovieTitle, Title);*/ @@ -752,6 +757,9 @@ public string GetNewValidImageFile(ApplicationItem curApp, string strExtension) { + if (ProgramUtils.UseThumbsDir()) + return GetNewValidImageFileFromThumbsDir(curApp, strExtension); + if ( curApp == null ) return ""; if ( curApp.imageDirs == null ) @@ -831,58 +839,43 @@ iImgIndex++; if ( iImgIndex == 0 ) { - strCand = String.Format( "{0}\\{1}{2}", strFolder, strFileName, strExtension ); + strCand = String.Format( "{0}\\{1}.{2}", strFolder, strFileName, strExtension ); } else { - strCand = String.Format( "{0}\\{1}_{2}{3}", strFolder, strFileName, iImgIndex, strExtension ); + strCand = String.Format( "{0}\\{1}_{2}.{3}", strFolder, strFileName, iImgIndex, strExtension ); } bFound = !File.Exists( strCand ); } return strCand; } - public string GetNewValidImageFileFromThumbsDir(ApplicationItem curApp, string strExtension) - { - if ( curApp == null ) return ""; - if ( ( this.Imagefile == "" ) && ( this.Filename == "" ) ) - return ""; + public string GetNewValidImageFileFromThumbsDir(ApplicationItem curApp, string strExtension) + { + if (curApp == null) return ""; + if (this.Filename == "") return ""; - string strCand = ""; - int iImgIndex = -1; - bool bFound = false; + string strCand = ""; + int iImgIndex = -1; + bool bFound = false; - string folder = Config.GetSubFolder( Config.Dir.Thumbs, @"MyProgramsAlt\" + curApp.Title ); - if ( !Directory.Exists( folder ) ) - Directory.CreateDirectory( folder ); + string folder = ProgramUtils.GetApplicationImageFolder(curApp); + if (!Directory.Exists(folder)) + Directory.CreateDirectory(folder); - while ( !bFound ) - { - iImgIndex++; - if ( iImgIndex == 0 ) - { - strCand = String.Format( "{0}\\{1}{2}", - folder, - Path.GetFileNameWithoutExtension( this.Filename ), - strExtension - ); - } - else - { - strCand = String.Format( "{0}\\{1}_{2}{3}", - folder, - Path.GetFileNameWithoutExtension( this.Filename ), - iImgIndex, - strExtension - ); - } - bFound = !File.Exists( strCand ); - } + while (!bFound) + { + iImgIndex++; + strCand = ProgramUtils.GetFileImage(curApp, this, iImgIndex); + strCand = Path.ChangeExtension(strCand, strExtension); - return strCand; - } + bFound = !File.Exists(strCand); + } + return strCand; + } + public void DeleteImages(ApplicationItem curApp) { if ( curApp == null ) Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/FileItemInfo.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/FileItemInfo.cs 2007-08-05 17:23:42 UTC (rev 794) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/FileItemInfo.cs 2007-08-05 22:21:57 UTC (rev 795) @@ -351,10 +351,7 @@ // imageUrl contains a full URL with one picture to download i++; - if (ProgramUtils.UseThumbsDir()) - strFile = curFile.GetNewValidImageFileFromThumbsDir(curApp, Path.GetExtension(imageUrl)); - else - strFile = curFile.GetNewValidImageFile(curApp, Path.GetExtension(imageUrl)); + strFile = curFile.GetNewValidImageFile(curApp, Path.GetExtension(imageUrl)); MediaPortal.Util.Utils.DownLoadImage(imageUrl, strFile); if ((File.Exists(strFile)) && (curFile.Imagefile == "")) { Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs 2007-08-05 17:23:42 UTC (rev 794) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs 2007-08-05 22:21:57 UTC (rev 795) @@ -47,6 +47,8 @@ using MediaPortal.Util; using GUIPrograms.Database; +using GUIPrograms.Items; + using MediaPortal.Configuration; namespace GUIPrograms @@ -423,11 +425,38 @@ return Config.GetSubFolder(Config.Dir.Thumbs, @"MyProgramsAlt"); } - public static string GetApplicationImage(string applicationTitle) + public static string GetApplicationImage(ApplicationItem appItem) { - return MediaPortal.Util.Utils.GetCoverArtName(GetPluginThumbFolder(), applicationTitle); + return MediaPortal.Util.Utils.GetCoverArtName(GetPluginThumbFolder(), appItem.Title); } + public static string GetApplicationImageFolder(ApplicationItem appItem) + { + string folder = String.Format(@"{0}\{1}", GetPluginThumbFolder(), appItem.Title); + + if (!Directory.Exists(folder)) + Directory.CreateDirectory(folder); + + return folder; + } + + public static string GetFileImage(ApplicationItem appItem, FileItem fileItem) + { + return GetFileImage(appItem, fileItem, 0); + } + + public static string GetFileImage(ApplicationItem appItem, FileItem fileItem, int index) + { + if (index > 0) + return MediaPortal.Util.Utils.GetCoverArtName( + GetApplicationImageFolder(appItem), + Path.GetFileNameWithoutExtension(fileItem.Filename) + "_" + index.ToString()); + else + return MediaPortal.Util.Utils.GetCoverArtName( + GetApplicationImageFolder(appItem), + Path.GetFileNameWithoutExtension(fileItem.Filename)); + } + #endregion } } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-08-05 17:23:44
|
Revision: 794 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=794&view=rev Author: chef_koch Date: 2007-08-05 10:23:42 -0700 (Sun, 05 Aug 2007) Log Message: ----------- added methods to ProgramUtils for loading and parsing: slideSpeed/SleepTime and UseThumbsDir -> no parsing in each LoadSettings of configForm or in GUIPrograms is needed Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs 2007-08-05 11:25:44 UTC (rev 793) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs 2007-08-05 17:23:42 UTC (rev 794) @@ -311,13 +311,8 @@ void LoadSettings() { - string _slideSpeed = DatabaseHandler.ReadSetting(ProgramUtils.cSLIDESPEED); + slideSpeed = ProgramUtils.GetSleepTime(); - if ((_slideSpeed != "") && (_slideSpeed != null)) - { - slideSpeed = int.Parse(_slideSpeed); - } - using (Settings xmlreader = new Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) { string curText = ""; @@ -935,29 +930,39 @@ int DisplayApps() { int totalApps = 0; + foreach (ApplicationItem applicationItem in AppsOfFatherID(GetCurrentFatherID())) { - if (applicationItem.Enabled) + if (!applicationItem.Enabled) continue; + + totalApps++; + GUIListItem item = new GUIListItem(applicationItem.Title); + + // check whether to use thumbsdir or not + string imgFile = String.Empty; + if (ProgramUtils.UseThumbsDir()) + imgFile = ProgramUtils.GetApplicationImage(applicationItem.Title); + else + imgFile = applicationItem.Imagefile; + + // use skin default image if file does not exist + if (File.Exists(imgFile)) { - totalApps = totalApps + 1; - GUIListItem item = new GUIListItem(applicationItem.Title); - if (applicationItem.Imagefile != "") - { - item.ThumbnailImage = applicationItem.Imagefile; - item.IconImageBig = applicationItem.Imagefile; - item.IconImage = applicationItem.Imagefile; - } - else - { - item.ThumbnailImage = GUIGraphicsContext.Skin + @"\media\DefaultFolderBig.png"; - item.IconImageBig = GUIGraphicsContext.Skin + @"\media\DefaultFolderBig.png"; - item.IconImage = GUIGraphicsContext.Skin + @"\media\DefaultFolderNF.png"; - } - item.MusicTag = applicationItem; - //item.IsFolder = true; // pseudo-folder.... - item.OnItemSelected += new GUIListItem.ItemSelectedHandler(OnItemSelected); - facadeView.Add(item); + item.ThumbnailImage = imgFile; + item.IconImageBig = imgFile; + item.IconImage = imgFile; } + else + { + item.ThumbnailImage = GUIGraphicsContext.Skin + @"\media\DefaultFolderBig.png"; + item.IconImageBig = GUIGraphicsContext.Skin + @"\media\DefaultFolderBig.png"; + item.IconImage = GUIGraphicsContext.Skin + @"\media\DefaultFolderNF.png"; + } + + item.MusicTag = applicationItem; + //item.IsFolder = true; // pseudo-folder.... + item.OnItemSelected += new GUIListItem.ItemSelectedHandler(OnItemSelected); + facadeView.Add(item); } return (totalApps); } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs 2007-08-05 11:25:44 UTC (rev 793) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs 2007-08-05 17:23:42 UTC (rev 794) @@ -125,16 +125,7 @@ } public string Imagefile { - get - { - if ( File.Exists( imageFile ) ) - return imageFile; - else - return MediaPortal.Util.Utils.GetCoverArtName( - Config.GetSubFolder( Config.Dir.Thumbs, @"MyProgramsAlt" ), - this.Title - ); - } + get { return imageFile; } set { imageFile = value; } } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs 2007-08-05 11:25:44 UTC (rev 793) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs 2007-08-05 17:23:42 UTC (rev 794) @@ -47,6 +47,7 @@ using MediaPortal.Util; using GUIPrograms.Database; +using MediaPortal.Configuration; namespace GUIPrograms { @@ -98,6 +99,7 @@ public const int ProgramInfoID = 1206; // some magic number, sync with DialogAppInfo.xml public const string cBackLabel = ".."; public const string cDefaultPluginTitle = "My Programs Alt."; + public const int cDefaultSleepTime = 3000; public const string cMAMEDIRECT = "MAME_DIRECT"; public const string cDIRCACHE = "DIR_CACHE"; @@ -394,12 +396,38 @@ } + #region Thumb/Image stuff + + public static int GetSleepTime() + { + int sleepTime; + + if (int.TryParse(DatabaseHandler.ReadSetting(ProgramUtils.cSLIDESPEED), out sleepTime)) + return sleepTime; + else + return cDefaultSleepTime; + } + public static bool UseThumbsDir() { - if (DatabaseHandler.KeyExists(ProgramUtils.cUSE_MP_THUMBS_DIR)) - return bool.Parse(DatabaseHandler.ReadSetting(ProgramUtils.cUSE_MP_THUMBS_DIR)); + bool useThumbsDir; + + if (bool.TryParse(DatabaseHandler.ReadSetting(ProgramUtils.cUSE_MP_THUMBS_DIR), out useThumbsDir)) + return useThumbsDir; else return true; } + + public static string GetPluginThumbFolder() + { + return Config.GetSubFolder(Config.Dir.Thumbs, @"MyProgramsAlt"); + } + + public static string GetApplicationImage(string applicationTitle) + { + return MediaPortal.Util.Utils.GetCoverArtName(GetPluginThumbFolder(), applicationTitle); + } + + #endregion } } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-08-05 11:25:46
|
Revision: 793 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=793&view=rev Author: chef_koch Date: 2007-08-05 04:25:44 -0700 (Sun, 05 Aug 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGrouper.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsMame.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/BaseItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/FileItemInfo.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs 2007-08-05 10:09:23 UTC (rev 792) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs 2007-08-05 11:25:44 UTC (rev 793) @@ -51,8 +51,6 @@ static List<ApplicationItem> globalApplicationItemList = new List<ApplicationItem>(); private const string DATABASEFILE = "myProgramsAltDatabaseV1.db3"; - public static bool useMPsThumbDirectory = false; - // singleton. Dont allow any instance of this class private DatabaseHandler() { } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs 2007-08-05 10:09:23 UTC (rev 792) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs 2007-08-05 11:25:44 UTC (rev 793) @@ -331,7 +331,7 @@ public bool FirstImageDirectoryValid() { - if (DatabaseHandler.useMPsThumbDirectory) return true; + if (ProgramUtils.UseThumbsDir()) return true; if (this.imageDirsTextBox.Text.Length == 0) { Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs 2007-08-05 10:09:23 UTC (rev 792) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs 2007-08-05 11:25:44 UTC (rev 793) @@ -55,6 +55,8 @@ this.applicationExeTextBox = new System.Windows.Forms.TextBox(); this.prePostButton = new System.Windows.Forms.Button(); this.startupDirComboBox = new System.Windows.Forms.ComboBox(); + this.pictureBox = new System.Windows.Forms.PictureBox(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit(); this.SuspendLayout(); // // winTypeLabel @@ -72,7 +74,7 @@ this.enabledCheckbox.AutoSize = true; this.enabledCheckbox.Location = new System.Drawing.Point(427, 17); this.enabledCheckbox.Name = "enabledCheckbox"; - this.enabledCheckbox.Size = new System.Drawing.Size(65, 17); + this.enabledCheckbox.Size = new System.Drawing.Size(64, 17); this.enabledCheckbox.TabIndex = 1; this.enabledCheckbox.Text = "Enabled"; this.enabledCheckbox.UseVisualStyleBackColor = true; @@ -100,8 +102,9 @@ this.titleTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.titleTextBox.Location = new System.Drawing.Point(94, 44); this.titleTextBox.Name = "titleTextBox"; - this.titleTextBox.Size = new System.Drawing.Size(325, 20); + this.titleTextBox.Size = new System.Drawing.Size(325, 21); this.titleTextBox.TabIndex = 4; + this.titleTextBox.TextChanged += new System.EventHandler(this.titleTextBox_TextChanged); // // applicationExeButton // @@ -118,7 +121,7 @@ this.shellexecuteCheckBox.AutoSize = true; this.shellexecuteCheckBox.Location = new System.Drawing.Point(7, 322); this.shellexecuteCheckBox.Name = "shellexecuteCheckBox"; - this.shellexecuteCheckBox.Size = new System.Drawing.Size(88, 17); + this.shellexecuteCheckBox.Size = new System.Drawing.Size(87, 17); this.shellexecuteCheckBox.TabIndex = 7; this.shellexecuteCheckBox.Text = "ShellExecute"; this.shellexecuteCheckBox.UseVisualStyleBackColor = true; @@ -129,7 +132,7 @@ this.waitExitCheckBox.AutoSize = true; this.waitExitCheckBox.Location = new System.Drawing.Point(7, 368); this.waitExitCheckBox.Name = "waitExitCheckBox"; - this.waitExitCheckBox.Size = new System.Drawing.Size(82, 17); + this.waitExitCheckBox.Size = new System.Drawing.Size(86, 17); this.waitExitCheckBox.TabIndex = 8; this.waitExitCheckBox.Text = "Wait for exit"; this.waitExitCheckBox.UseVisualStyleBackColor = true; @@ -157,15 +160,17 @@ this.applicationImageTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.applicationImageTextBox.Location = new System.Drawing.Point(94, 97); this.applicationImageTextBox.Name = "applicationImageTextBox"; - this.applicationImageTextBox.Size = new System.Drawing.Size(325, 20); + this.applicationImageTextBox.Size = new System.Drawing.Size(325, 21); this.applicationImageTextBox.TabIndex = 13; + this.applicationImageTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; + this.applicationImageTextBox.TextChanged += new System.EventHandler(this.applicationImageTextBox_TextChanged); // // applicationArgumentsTextBox // this.applicationArgumentsTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.applicationArgumentsTextBox.Location = new System.Drawing.Point(94, 123); this.applicationArgumentsTextBox.Name = "applicationArgumentsTextBox"; - this.applicationArgumentsTextBox.Size = new System.Drawing.Size(325, 20); + this.applicationArgumentsTextBox.Size = new System.Drawing.Size(325, 21); this.applicationArgumentsTextBox.TabIndex = 14; // // winStyleLabel @@ -206,7 +211,7 @@ this.quoteCheckBox.AutoSize = true; this.quoteCheckBox.Location = new System.Drawing.Point(7, 299); this.quoteCheckBox.Name = "quoteCheckBox"; - this.quoteCheckBox.Size = new System.Drawing.Size(102, 17); + this.quoteCheckBox.Size = new System.Drawing.Size(104, 17); this.quoteCheckBox.TabIndex = 19; this.quoteCheckBox.Text = "Quote filenames"; this.quoteCheckBox.UseVisualStyleBackColor = true; @@ -236,7 +241,7 @@ this.allowRefreshCheckBox.AutoSize = true; this.allowRefreshCheckBox.Location = new System.Drawing.Point(7, 345); this.allowRefreshCheckBox.Name = "allowRefreshCheckBox"; - this.allowRefreshCheckBox.Size = new System.Drawing.Size(154, 17); + this.allowRefreshCheckBox.Size = new System.Drawing.Size(159, 17); this.allowRefreshCheckBox.TabIndex = 30; this.allowRefreshCheckBox.Text = "Allow refresh in mediaportal"; this.allowRefreshCheckBox.UseVisualStyleBackColor = true; @@ -257,7 +262,7 @@ this.applicationExeTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.applicationExeTextBox.Location = new System.Drawing.Point(94, 71); this.applicationExeTextBox.Name = "applicationExeTextBox"; - this.applicationExeTextBox.Size = new System.Drawing.Size(325, 20); + this.applicationExeTextBox.Size = new System.Drawing.Size(325, 21); this.applicationExeTextBox.TabIndex = 32; this.applicationExeTextBox.TextChanged += new System.EventHandler(this.applicationExeTextBox_TextChanged); // @@ -279,10 +284,21 @@ this.startupDirComboBox.Size = new System.Drawing.Size(325, 21); this.startupDirComboBox.TabIndex = 36; // + // pictureBox + // + this.pictureBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.pictureBox.Location = new System.Drawing.Point(324, 203); + this.pictureBox.Name = "pictureBox"; + this.pictureBox.Size = new System.Drawing.Size(170, 170); + this.pictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pictureBox.TabIndex = 37; + this.pictureBox.TabStop = false; + // // AppSettingsBase // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.pictureBox); this.Controls.Add(this.startupDirComboBox); this.Controls.Add(this.prePostButton); this.Controls.Add(this.applicationExeTextBox); @@ -307,7 +323,7 @@ this.Controls.Add(this.enabledCheckbox); this.Controls.Add(this.winTypeLabel); this.Name = "AppSettingsBase"; - this.Size = new System.Drawing.Size(497, 550); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -341,5 +357,6 @@ protected System.Windows.Forms.TextBox applicationExeTextBox; protected System.Windows.Forms.Button prePostButton; protected System.Windows.Forms.ComboBox startupDirComboBox; + private System.Windows.Forms.PictureBox pictureBox; } } \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs 2007-08-05 10:09:23 UTC (rev 792) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs 2007-08-05 11:25:44 UTC (rev 793) @@ -37,6 +37,7 @@ using GUIPrograms; using GUIPrograms.Items; using GUIPrograms.Database; +using MediaPortal.Configuration; namespace GUIPrograms.Design { @@ -44,7 +45,6 @@ { string preLaunch = string.Empty; string postLaunch = string.Empty; - protected bool useThumbsDir = true; public AppSettingsBase() { @@ -57,11 +57,6 @@ base.LoadSettings(curApp); AppItemToForm(curApp); - - if (DatabaseHandler.KeyExists(ProgramUtils.cUSE_MP_THUMBS_DIR)) - useThumbsDir = bool.Parse(DatabaseHandler.ReadSetting(ProgramUtils.cUSE_MP_THUMBS_DIR)); - else - useThumbsDir = true; } public override void SaveSettings(ApplicationItem curApp) @@ -85,6 +80,16 @@ preLaunch = curApp.PreLaunch; postLaunch = curApp.PostLaunch; } + + if (ProgramUtils.UseThumbsDir()) + applicationImageTextBox.Text = MediaPortal.Util.Utils.GetCoverArtName( + Config.GetSubFolder(Config.Dir.Thumbs, @"MyProgramsAlt"), + titleTextBox.Text); + else + applicationImageTextBox.Text = curApp.Imagefile; + applicationImageTextBox.ReadOnly = ProgramUtils.UseThumbsDir(); + applicationImageButton.Visible = !ProgramUtils.UseThumbsDir(); + return true; } @@ -95,6 +100,9 @@ curApp.PreLaunch = preLaunch; curApp.PostLaunch = postLaunch; } + + if (!ProgramUtils.UseThumbsDir()) + curApp.Imagefile = applicationImageTextBox.Text; } protected void SetWindowStyle(ProcessWindowStyle val) @@ -231,9 +239,22 @@ startupDirComboBox.Items.Add(Path.GetDirectoryName(applicationExeTextBox.Text)); } + private void titleTextBox_TextChanged(object sender, EventArgs e) + { + if (ProgramUtils.UseThumbsDir()) + applicationImageTextBox.Text = MediaPortal.Util.Utils.GetCoverArtName( + Config.GetSubFolder(Config.Dir.Thumbs, @"MyProgramsAlt"), + titleTextBox.Text); + } + private void applicationImageTextBox_TextChanged(object sender, EventArgs e) + { + pictureBox.ImageLocation = applicationImageTextBox.Text; + } + + } } \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs 2007-08-05 10:09:23 UTC (rev 792) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs 2007-08-05 11:25:44 UTC (rev 793) @@ -58,11 +58,12 @@ shellexecuteCheckBox.Checked = curApp.UseShellExecute; quoteCheckBox.Checked = curApp.UseQuotes; waitExitCheckBox.Checked = (curApp.WaitForExit); - applicationImageTextBox.Text = curApp.Imagefile; allowRefreshCheckBox.Checked = curApp.RefreshGUIAllowed; - if(curApp.PlatformId != 0){ - platformComboBox.SelectedValue = curApp.PlatformId; - } + if (curApp.PlatformId != 0) + { + platformComboBox.SelectedValue = curApp.PlatformId; + } + return true; } @@ -79,10 +80,8 @@ curApp.UseQuotes = quoteCheckBox.Checked; curApp.WaitForExit = waitExitCheckBox.Checked; curApp.SourceType = ItemType.DIRCACHE; - curApp.Imagefile = applicationImageTextBox.Text; curApp.RefreshGUIAllowed = (allowRefreshCheckBox.Checked); curApp.PlatformId =(int) platformComboBox.SelectedValue; - } public override bool EntriesOK(ApplicationItem curApp) Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.cs 2007-08-05 10:09:23 UTC (rev 792) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.cs 2007-08-05 11:25:44 UTC (rev 793) @@ -70,7 +70,6 @@ this.quoteCheckBox.Checked = true; //(curApp.UseQuotes); this.waitExitCheckBox.Checked = (curApp.WaitForExit); SetWindowStyle(curApp.WindowStyle); - this.applicationImageTextBox.Text = curApp.Imagefile; this.allowRefreshCheckBox.Checked = curApp.RefreshGUIAllowed; @@ -90,7 +89,6 @@ curApp.UseQuotes = this.quoteCheckBox.Checked; curApp.WaitForExit = this.waitExitCheckBox.Checked; curApp.SourceType = ItemType.GAMEBASE; - curApp.Imagefile = this.applicationImageTextBox.Text; curApp.RefreshGUIAllowed = this.allowRefreshCheckBox.Checked; } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGrouper.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGrouper.cs 2007-08-05 10:09:23 UTC (rev 792) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGrouper.cs 2007-08-05 11:25:44 UTC (rev 793) @@ -77,7 +77,6 @@ curApp.Enabled = enabledCheckbox.Checked; curApp.Title = titleTextBox.Text; curApp.SourceType = ItemType.GROUPER; - curApp.Imagefile = applicationImageTextBox.Text; } @@ -86,7 +85,6 @@ base.AppItemToForm(curApp); this.enabledCheckbox.Checked = curApp.Enabled; titleTextBox.Text = curApp.Title; - applicationImageTextBox.Text = curApp.Imagefile; return true; } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsMame.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsMame.cs 2007-08-05 10:09:23 UTC (rev 792) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsMame.cs 2007-08-05 11:25:44 UTC (rev 793) @@ -54,7 +54,6 @@ this.applicationExeTextBox.Text = curApp.Filename; this.applicationArgumentsTextBox.Text = curApp.Arguments; SetWindowStyle(curApp.WindowStyle); - this.applicationImageTextBox.Text = curApp.Imagefile; return true; } @@ -69,7 +68,6 @@ curApp.Arguments = this.applicationArgumentsTextBox.Text; curApp.WindowStyle = GetSelectedWindowStyle(); curApp.SourceType = ItemType.MAMEDIRECT; - curApp.Imagefile = this.applicationImageTextBox.Text; curApp.RefreshGUIAllowed = true; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs 2007-08-05 10:09:23 UTC (rev 792) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs 2007-08-05 11:25:44 UTC (rev 793) @@ -1075,7 +1075,7 @@ { FileItem curFile = item.MusicTag as FileItem; - if ( DatabaseHandler.useMPsThumbDirectory ) + if ( ProgramUtils.UseThumbsDir() ) return GetCurThumbFromThumbsDir( curFile ); else return GetCurThumb( curFile ); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/BaseItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/BaseItem.cs 2007-08-05 10:09:23 UTC (rev 792) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/BaseItem.cs 2007-08-05 11:25:44 UTC (rev 793) @@ -72,7 +72,7 @@ string imgFile = String.Empty; - if (DatabaseHandler.useMPsThumbDirectory) + if (ProgramUtils.UseThumbsDir()) imgFile = curFileItem.Imagefile; else imgFile = MediaPortal.Util.Utils.GetCoverArtName( Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/FileItemInfo.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/FileItemInfo.cs 2007-08-05 10:09:23 UTC (rev 792) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/FileItemInfo.cs 2007-08-05 11:25:44 UTC (rev 793) @@ -351,7 +351,7 @@ // imageUrl contains a full URL with one picture to download i++; - if (DatabaseHandler.useMPsThumbDirectory) + if (ProgramUtils.UseThumbsDir()) strFile = curFile.GetNewValidImageFileFromThumbsDir(curApp, Path.GetExtension(imageUrl)); else strFile = curFile.GetNewValidImageFile(curApp, Path.GetExtension(imageUrl)); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs 2007-08-05 10:09:23 UTC (rev 792) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs 2007-08-05 11:25:44 UTC (rev 793) @@ -393,5 +393,13 @@ comboBox.DisplayMember = "Text"; } + + public static bool UseThumbsDir() + { + if (DatabaseHandler.KeyExists(ProgramUtils.cUSE_MP_THUMBS_DIR)) + return bool.Parse(DatabaseHandler.ReadSetting(ProgramUtils.cUSE_MP_THUMBS_DIR)); + else + return true; + } } } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-08-05 10:09:26
|
Revision: 792 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=792&view=rev Author: chef_koch Date: 2007-08-05 03:09:23 -0700 (Sun, 05 Aug 2007) Log Message: ----------- added new class SettingsBase - SettingsRoot & AppSettingsBase depend on it -> easier to use the designer and add new options Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs 2007-08-05 08:48:44 UTC (rev 791) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs 2007-08-05 10:09:23 UTC (rev 792) @@ -40,19 +40,44 @@ namespace GUIPrograms.Design { - public partial class AppSettingsBase : UserControl + public partial class AppSettingsBase : SettingsBase { string preLaunch = string.Empty; string postLaunch = string.Empty; + protected bool useThumbsDir = true; - protected ConditionChecker conditionChecker = new ConditionChecker(); - public AppSettingsBase() { InitializeComponent(); InitDefault(); } + public override void LoadSettings(ApplicationItem curApp) + { + base.LoadSettings(curApp); + + AppItemToForm(curApp); + + if (DatabaseHandler.KeyExists(ProgramUtils.cUSE_MP_THUMBS_DIR)) + useThumbsDir = bool.Parse(DatabaseHandler.ReadSetting(ProgramUtils.cUSE_MP_THUMBS_DIR)); + else + useThumbsDir = true; + } + + public override void SaveSettings(ApplicationItem curApp) + { + base.SaveSettings(curApp); + + FormToAppItem(curApp); + } + + + + + + + + public virtual bool AppItemToForm(ApplicationItem curApp) { if (curApp != null) @@ -72,16 +97,6 @@ } } - public virtual bool EntriesOK(ApplicationItem curApp) - { - return true; - } - - public virtual void LoadFromAppItem(ApplicationItem tempApp) - { - // virtual! - } - protected void SetWindowStyle(ProcessWindowStyle val) { switch (val) Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.cs 2007-08-05 08:48:44 UTC (rev 791) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.cs 2007-08-05 10:09:23 UTC (rev 792) @@ -63,10 +63,10 @@ private AppSettingsGamebase appSettingsGameBase = new AppSettingsGamebase(); private AppSettingsGrouper appSettingsGrouper = new AppSettingsGrouper(); private ProgramViews appSettingsProgramView = new ProgramViews(); - private AppSettingsRoot appSettingsRoot = new AppSettingsRoot(); + private SettingsRoot appSettingsRoot = new SettingsRoot(); private AppSettingsFilesView appSettingsFileEditView = new AppSettingsFilesView(); private AppSettingsFilesImportProgress filesProgress = new AppSettingsFilesImportProgress(); - private AppSettingsBase pageCurrentSettings = null; + private SettingsBase pageCurrentSettings = null; private bool profilesIsLoaded = false; private const string ROOTNODENAME = "Applications"; private const int POSITIONHOLDER = 10; @@ -363,34 +363,24 @@ - private AppSettingsBase GetCurrentSettingsPage() + private SettingsBase GetCurrentSettingsPage() { - AppSettingsBase appSettings = null; ApplicationItem currentApplication = GetTreeNodeApplicationItem(treeView.SelectedNode); + if (currentApplication == null) return appSettingsRoot; - if (currentApplication != null) + switch (currentApplication.SourceType) { - switch (currentApplication.SourceType) - { - case ItemType.DIRCACHE: - appSettings = appSettingsDirCache; - break; - case ItemType.MAMEDIRECT: - appSettings = appSettingsMame; - break; - case ItemType.GROUPER: - appSettings = appSettingsGrouper; - break; - case ItemType.GAMEBASE: - appSettings = this.appSettingsGameBase; - break; - } + case ItemType.DIRCACHE: + return appSettingsDirCache; + case ItemType.MAMEDIRECT: + return appSettingsMame; + case ItemType.GROUPER: + return appSettingsGrouper; + case ItemType.GAMEBASE: + return appSettingsGameBase; + default: + return appSettingsRoot; } - else - { - appSettings = appSettingsRoot; - } - return appSettings; } bool TabIsDisplayed(TabPage view) @@ -458,38 +448,38 @@ } - private void SyncPanel(AppSettingsBase pageSettings) + private void SyncPanel() { this.tabControl.TabPages["detailsTabPage"].Controls.Clear(); - if (pageSettings != null) - { - this.tabControl.TabPages["detailsTabPage"].Controls.Add(pageSettings); + pageCurrentSettings = GetCurrentSettingsPage(); + if (pageCurrentSettings == null) return; - ApplicationItem currentApplication = GetTreeNodeApplicationItem(treeView.SelectedNode); - pageSettings.AppItemToForm(currentApplication); + this.tabControl.TabPages["detailsTabPage"].Controls.Add(pageCurrentSettings); - if (currentApplication != null) + ApplicationItem currentApplication = GetTreeNodeApplicationItem(treeView.SelectedNode); + pageCurrentSettings.LoadSettings(currentApplication); + + if (currentApplication != null) + { + RemoveViewsPage(); + RemoveDBOptionsPage(); + if (currentApplication.FileEditorAllowed()) { - RemoveViewsPage(); - RemoveDBOptionsPage(); - if (currentApplication.FileEditorAllowed()) - { - AddFilesPage(currentApplication); - } - else - { - RemoveFilesPage(); - } + AddFilesPage(currentApplication); } else { - // special treatment for root node RemoveFilesPage(); - AddViewsPage(); - AddDBOptionsPage(); } } + else + { + // special treatment for root node + RemoveFilesPage(); + AddViewsPage(); + AddDBOptionsPage(); + } } private bool SaveAppItem() @@ -499,40 +489,37 @@ // currentApplication can be NULL for the root Element..... so don't catch this! pageCurrentSettings = GetCurrentSettingsPage(); - - if (pageCurrentSettings != null) + if (pageCurrentSettings == null) { - if (pageCurrentSettings.EntriesOK(currentApplication)) + Log.Debug("SetupForm: SaveAppItem() pageCurrentSettings == null"); + return false; + } + + if (pageCurrentSettings.EntriesOK(currentApplication)) + { + if (appSettingsFileEditView.EntriesOK()) { - if (appSettingsFileEditView.EntriesOK()) + pageCurrentSettings.SaveSettings(currentApplication); + appSettingsFileEditView.FillApplicationItem(currentApplication); + if (currentApplication != null) { - - pageCurrentSettings.FormToAppItem(currentApplication); - appSettingsFileEditView.FillApplicationItem(currentApplication); - - - if (currentApplication != null) - { - currentApplication.InsertOrUpdateSettings(); - treeView.SelectedNode.Text = currentApplication.Title;// +" " + currentApplication.Position; - success = true; - } + currentApplication.InsertOrUpdateSettings(); + treeView.SelectedNode.Text = currentApplication.Title;// +" " + currentApplication.Position; + success = true; } } - else - { + } + else + { // some of the entries are invalid success = false; - } } return success; } private void SyncDetails() { - pageCurrentSettings = GetCurrentSettingsPage(); - - SyncPanel(pageCurrentSettings); + SyncPanel(); SyncButtons(); } @@ -952,7 +939,7 @@ { if (pageCurrentSettings.EntriesOK(currentApplication)) { - pageCurrentSettings.FormToAppItem(currentApplication); + pageCurrentSettings.SaveSettings(currentApplication); if (currentApplication != null) { currentApplication.InsertOrUpdateSettings(); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj 2007-08-05 08:48:44 UTC (rev 791) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj 2007-08-05 10:09:23 UTC (rev 792) @@ -98,11 +98,11 @@ <Compile Include="Design\AppSettingsMame.Designer.cs"> <DependentUpon>AppSettingsMame.cs</DependentUpon> </Compile> - <Compile Include="Design\AppSettingsRoot.cs"> + <Compile Include="Design\SettingsRoot.cs"> <SubType>UserControl</SubType> </Compile> - <Compile Include="Design\AppSettingsRoot.Designer.cs"> - <DependentUpon>AppSettingsRoot.cs</DependentUpon> + <Compile Include="Design\SettingsRoot.Designer.cs"> + <DependentUpon>SettingsRoot.cs</DependentUpon> </Compile> <Compile Include="Design\FileInfoScraperForm.cs"> <SubType>Form</SubType> @@ -122,6 +122,12 @@ <Compile Include="Design\AppSettingsPrePost.Designer.cs"> <DependentUpon>AppSettingsPrePost.cs</DependentUpon> </Compile> + <Compile Include="Design\SettingsBase.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Include="Design\SettingsBase.Designer.cs"> + <DependentUpon>SettingsBase.cs</DependentUpon> + </Compile> <Compile Include="Design\SetupForm.cs"> <SubType>Form</SubType> </Compile> @@ -195,8 +201,8 @@ <DependentUpon>AppSettingsMame.cs</DependentUpon> <SubType>Designer</SubType> </EmbeddedResource> - <EmbeddedResource Include="Design\AppSettingsRoot.resx"> - <DependentUpon>AppSettingsRoot.cs</DependentUpon> + <EmbeddedResource Include="Design\SettingsRoot.resx"> + <DependentUpon>SettingsRoot.cs</DependentUpon> <SubType>Designer</SubType> </EmbeddedResource> <EmbeddedResource Include="Design\FileInfoScraperForm.resx"> @@ -211,6 +217,10 @@ <SubType>Designer</SubType> <DependentUpon>AppSettingsPrePost.cs</DependentUpon> </EmbeddedResource> + <EmbeddedResource Include="Design\SettingsBase.resx"> + <DependentUpon>SettingsBase.cs</DependentUpon> + <SubType>Designer</SubType> + </EmbeddedResource> <EmbeddedResource Include="Design\SetupForm.resx"> <DependentUpon>SetupForm.cs</DependentUpon> <SubType>Designer</SubType> Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs 2007-08-05 08:48:44 UTC (rev 791) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs 2007-08-05 10:09:23 UTC (rev 792) @@ -97,14 +97,17 @@ public const int GetID = (int)GUIWindow.Window.WINDOW_FILES; public const int ProgramInfoID = 1206; // some magic number, sync with DialogAppInfo.xml public const string cBackLabel = ".."; + public const string cDefaultPluginTitle = "My Programs Alt."; public const string cMAMEDIRECT = "MAME_DIRECT"; public const string cDIRCACHE = "DIR_CACHE"; public const string cGROUPER = "GROUPER"; public const string cGAMEBASE = "GAMEBASE"; - public const string cSLIDESPEED = "SLIDESPEED"; + // Settings public const string cPLUGINTITLE = "PLUGINTITLE"; + public const string cSLIDESPEED = "SLIDESPEED"; + public const string cUSE_MP_THUMBS_DIR = "USE_MP_THUMBS_DIR"; #endregion Variables This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-08-05 08:48:46
|
Revision: 791 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=791&view=rev Author: chef_koch Date: 2007-08-05 01:48:44 -0700 (Sun, 05 Aug 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/README.txt Modified: trunk/plugins/myGUIProgramsAlt/README.txt =================================================================== --- trunk/plugins/myGUIProgramsAlt/README.txt 2007-08-05 08:18:21 UTC (rev 790) +++ trunk/plugins/myGUIProgramsAlt/README.txt 2007-08-05 08:48:44 UTC (rev 791) @@ -30,6 +30,8 @@ ---------------- BUGS: + - deleting an AppItem throws an Exception + - AllGame-Import -> Do we want to import the Name of the game, too? --Will add some more options under save later.. so user can choose to overwrite title. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aba...@us...> - 2007-08-05 08:18:23
|
Revision: 790 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=790&view=rev Author: abavarian Date: 2007-08-05 01:18:21 -0700 (Sun, 05 Aug 2007) Log Message: ----------- fixing mantis bug 1086: No coverart displayed in "My Lyrics" if thumbnails generation is unselected Modified Paths: -------------- trunk/plugins/MyLyrics/My Lyrics/MyLyricsExternCode.cs Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyricsExternCode.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyricsExternCode.cs 2007-08-04 01:48:16 UTC (rev 789) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyricsExternCode.cs 2007-08-05 08:18:21 UTC (rev 790) @@ -34,6 +34,13 @@ GetTrackTags(); CurrentThumbFileName = GUIMusicFiles.GetCoverArt(false, CurrentTrackFileName, CurrentTrackTag); + + if (CurrentThumbFileName.Length < 1) // no ThumbFile currently -> check if there is a folder.jpg + { + CurrentThumbFileName = String.Format(@"{0}\folder.jpg", MediaPortal.Util.Utils.RemoveTrailingSlash(System.IO.Path.GetDirectoryName(CurrentTrackFileName))); + if (!System.IO.File.Exists(CurrentThumbFileName)) CurrentThumbFileName = string.Empty; + } + if (CurrentThumbFileName.Length > 0) { // let us test if there is a larger cover art image This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-08-04 01:48:19
|
Revision: 789 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=789&view=rev Author: chef_koch Date: 2007-08-03 18:48:16 -0700 (Fri, 03 Aug 2007) Log Message: ----------- reverted last change, need to spent more time on it Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs Added Paths: ----------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.resx Added: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.Designer.cs (rev 0) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.Designer.cs 2007-08-04 01:48:16 UTC (rev 789) @@ -0,0 +1,139 @@ +namespace GUIPrograms.Design +{ + partial class AppSettingsRoot + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.button1 = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // enabledCheckbox + // + this.toolTip.SetToolTip(this.enabledCheckbox, "Only enabled items will appear in MediaPortal"); + // + // titleLabel + // + this.titleLabel.Size = new System.Drawing.Size(92, 20); + // + // titleTextBox + // + this.toolTip.SetToolTip(this.titleTextBox, "This text will appear in the listitem of MediaPortal\r\n(mandatory)"); + // + // applicationExeButton + // + this.applicationExeButton.Location = new System.Drawing.Point(359, 70); + // + // shellexecuteCheckBox + // + this.toolTip.SetToolTip(this.shellexecuteCheckBox, "Enable this if you want to run a program that is associated with a specific file-" + + "extension.\r\nYou can omit the \"Launching Application\" in this case."); + // + // applicationArgumentsLabel + // + this.toolTip.SetToolTip(this.applicationArgumentsLabel, "Optional arguments that are needed to launch the program \r\n\r\n(advanced hint: Use " + + "%FILE% if the filename needs to be placed in some specific place between several" + + " arguments)"); + // + // applicationImageTextBox + // + this.toolTip.SetToolTip(this.applicationImageTextBox, "Optional filename for an image to display in MediaPortal"); + // + // winStyleComboBox + // + this.toolTip.SetToolTip(this.winStyleComboBox, "Appearance of the launched program. \r\nTry HIDDEN or MINIMIZED for a seamless inte" + + "gration in MediaPortal"); + // + // startupDirTextBox + // + this.toolTip.SetToolTip(this.startupDirComboBox, "Optional path that is passed as the launch-directory \r\n\r\n(advanced hint: Use %FIL" + + "EDIR% if you want to use the directory where the launched file is stored)"); + // + // quoteCheckBox + // + this.toolTip.SetToolTip(this.quoteCheckBox, "Quotes are usually needed to handle filenames with spaces correctly. \r\nAvoid doub" + + "le quotes though!"); + // + // applicationImageButton + // + this.applicationImageButton.Location = new System.Drawing.Point(356, 97); + // + // allowRefreshCheckBox + // + this.toolTip.SetToolTip(this.allowRefreshCheckBox, "Check this if users can run the import through the REFRESH button in MediaPortal." + + ""); + // + // button1 + // + this.button1.Location = new System.Drawing.Point(427, 43); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(44, 23); + this.button1.TabIndex = 32; + this.button1.Text = "Reset"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // AppSettingsRoot + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.button1); + this.Name = "AppSettingsRoot"; + this.Load += new System.EventHandler(this.AppSettingsRoot_Load); + this.Controls.SetChildIndex(this.button1, 0); + this.Controls.SetChildIndex(this.prePostButton, 0); + this.Controls.SetChildIndex(this.applicationImageButton, 0); + this.Controls.SetChildIndex(this.applicationExeButton, 0); + this.Controls.SetChildIndex(this.winTypeLabel, 0); + this.Controls.SetChildIndex(this.enabledCheckbox, 0); + this.Controls.SetChildIndex(this.titleLabel, 0); + this.Controls.SetChildIndex(this.applicationExeLabel, 0); + this.Controls.SetChildIndex(this.shellexecuteCheckBox, 0); + this.Controls.SetChildIndex(this.waitExitCheckBox, 0); + this.Controls.SetChildIndex(this.applicationExeTextBox, 0); + this.Controls.SetChildIndex(this.applicationImageLabel, 0); + this.Controls.SetChildIndex(this.applicationArgumentsLabel, 0); + this.Controls.SetChildIndex(this.applicationImageTextBox, 0); + this.Controls.SetChildIndex(this.applicationArgumentsTextBox, 0); + this.Controls.SetChildIndex(this.winStyleLabel, 0); + this.Controls.SetChildIndex(this.winStyleComboBox, 0); + this.Controls.SetChildIndex(this.startupDirComboBox, 0); + this.Controls.SetChildIndex(this.startupDirLabel, 0); + this.Controls.SetChildIndex(this.quoteCheckBox, 0); + this.Controls.SetChildIndex(this.startupDirButton, 0); + this.Controls.SetChildIndex(this.allowRefreshCheckBox, 0); + this.Controls.SetChildIndex(this.informationLabel, 0); + this.Controls.SetChildIndex(this.titleTextBox, 0); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button button1; + } +} \ No newline at end of file Added: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.cs (rev 0) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.cs 2007-08-04 01:48:16 UTC (rev 789) @@ -0,0 +1,121 @@ +#region Copyright (C) 2005-2007 Team MediaPortal + +/* + * Copyright (C) 2005-2007 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.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +using GUIPrograms; +using GUIPrograms.Items; +using GUIPrograms.Database; + +namespace GUIPrograms.Design +{ + public partial class AppSettingsRoot : AppSettingsBase + { + bool Loaded = false; + + public AppSettingsRoot() + { + InitializeComponent(); + } + + private void AppSettingsRoot_Load(object sender, EventArgs e) + { + AppItemToForm(null); + Loaded = true; + + enabledCheckbox.Visible = false; + winTypeLabel.Text = "my Programs Alt."; + titleLabel.Text = "Plugin title"; + titleTextBox.Text = " My Programs Alt."; + + applicationExeLabel.Visible = false; + applicationExeTextBox.Visible = false; + applicationExeButton.Visible = false; + + applicationImageLabel.Visible = false; + applicationImageTextBox.Visible = false; + applicationImageButton.Visible = false; + + applicationArgumentsTextBox.Visible = false; + applicationArgumentsLabel.Visible = false; + + winStyleLabel.Visible = false; + winStyleComboBox.Visible = false; + + startupDirButton.Visible = false; + startupDirLabel.Visible = false; + startupDirComboBox.Visible = false; + + + quoteCheckBox.Visible = false; + allowRefreshCheckBox.Visible = false; + waitExitCheckBox.Visible = false; + shellexecuteCheckBox.Visible = false; + informationLabel.Visible = false; + + this.prePostButton.Visible = false; + + } + + public override bool AppItemToForm(ApplicationItem curApp) + { + base.AppItemToForm(curApp); + titleTextBox.Text = DatabaseHandler.ReadSetting(ProgramUtils.cPLUGINTITLE); + if (titleTextBox.Text == "") + { + // PluginTitle.Text = GUILocalizeStrings.Get(0); + titleTextBox.Text = "My Programs Alt."; + } + return true; + } + + public override void FormToAppItem(ApplicationItem curApp) + { + // currentApplication is null! + if (Loaded) + { + if ((titleTextBox.Text != "")) + { + DatabaseHandler.WriteSetting(ProgramUtils.cPLUGINTITLE, titleTextBox.Text); + } + else + { + DatabaseHandler.DeleteSetting(ProgramUtils.cPLUGINTITLE); + } + } + } + + private void button1_Click(object sender, EventArgs e) + { + titleTextBox.Text = "My Programs Alt."; + } + } +} \ No newline at end of file Added: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.resx =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.resx (rev 0) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.resx 2007-08-04 01:48:16 UTC (rev 789) @@ -0,0 +1,129 @@ +<?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> + <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>313, 17</value> + </metadata> + <metadata name="folderBrowserDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>150, 17</value> + </metadata> + <metadata name="openFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> +</root> \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.Designer.cs 2007-08-03 16:49:07 UTC (rev 788) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.Designer.cs 2007-08-04 01:48:16 UTC (rev 789) @@ -28,514 +28,440 @@ /// </summary> private void InitializeComponent() { - System.Windows.Forms.TreeNode treeNode3 = new System.Windows.Forms.TreeNode("Applications"); - this.menuStrip = new System.Windows.Forms.MenuStrip(); - this.addDeleteApplicationsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.addApplicationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.applicationWithFiledirectoryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.addGroupnodeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.extendedApplicationItemToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.mameImportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.importGamebaseItemToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.deleteApplicationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolsStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.premadeConfigurationsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.emulatorSetupToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.treeView = new System.Windows.Forms.TreeView(); - this.tabControl = new System.Windows.Forms.TabControl(); - this.detailsTabPage = new System.Windows.Forms.TabPage(); - this.directoryTabPage = new System.Windows.Forms.TabPage(); - this.settingsTabPage = new System.Windows.Forms.TabPage(); - this.button2 = new System.Windows.Forms.Button(); - this.titleTextBox = new System.Windows.Forms.TextBox(); - this.titleLabel = new System.Windows.Forms.Label(); - this.button1 = new System.Windows.Forms.Button(); - this.checkBoxUseThumbsDir = new System.Windows.Forms.CheckBox(); - this.viewTabPage = new System.Windows.Forms.TabPage(); - this.dbOptionsTabPage = new System.Windows.Forms.TabPage(); - this.generalFileItemOptionsGroupBox = new System.Windows.Forms.GroupBox(); - this.removePlatformComboBox = new System.Windows.Forms.ComboBox(); - this.removePlatformLabel = new System.Windows.Forms.Label(); - this.removePlatformButton = new System.Windows.Forms.Button(); - this.addPlatformLabel = new System.Windows.Forms.Label(); - this.addPlatformTextBox = new System.Windows.Forms.TextBox(); - this.addPlatformButton = new System.Windows.Forms.Button(); - this.removeManufacturerComboBox = new System.Windows.Forms.ComboBox(); - this.removeManufacturerLabel = new System.Windows.Forms.Label(); - this.removeManufacturerButton = new System.Windows.Forms.Button(); - this.addManufacturerLabel = new System.Windows.Forms.Label(); - this.addManufacturerTextBox = new System.Windows.Forms.TextBox(); - this.addManufacturerButton = new System.Windows.Forms.Button(); - this.removeGenreComboBox = new System.Windows.Forms.ComboBox(); - this.removeGenreLabel = new System.Windows.Forms.Label(); - this.removeGenreButton = new System.Windows.Forms.Button(); - this.addGenreLabel = new System.Windows.Forms.Label(); - this.addGenreTextBox = new System.Windows.Forms.TextBox(); - this.addGenreButton = new System.Windows.Forms.Button(); - this.menuStrip.SuspendLayout(); - this.tabControl.SuspendLayout(); - this.settingsTabPage.SuspendLayout(); - this.dbOptionsTabPage.SuspendLayout(); - this.generalFileItemOptionsGroupBox.SuspendLayout(); - this.SuspendLayout(); - // - // menuStrip - // - this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode( "Applications" ); + this.menuStrip = new System.Windows.Forms.MenuStrip(); + this.addDeleteApplicationsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.addApplicationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.applicationWithFiledirectoryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.addGroupnodeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.extendedApplicationItemToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.mameImportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.importGamebaseItemToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.deleteApplicationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolsStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.premadeConfigurationsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.emulatorSetupToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.treeView = new System.Windows.Forms.TreeView(); + this.tabControl = new System.Windows.Forms.TabControl(); + this.detailsTabPage = new System.Windows.Forms.TabPage(); + this.directoryTabPage = new System.Windows.Forms.TabPage(); + this.viewTabPage = new System.Windows.Forms.TabPage(); + this.dbOptionsTabPage = new System.Windows.Forms.TabPage(); + this.generalFileItemOptionsGroupBox = new System.Windows.Forms.GroupBox(); + this.removePlatformComboBox = new System.Windows.Forms.ComboBox(); + this.removePlatformLabel = new System.Windows.Forms.Label(); + this.removePlatformButton = new System.Windows.Forms.Button(); + this.addPlatformLabel = new System.Windows.Forms.Label(); + this.addPlatformTextBox = new System.Windows.Forms.TextBox(); + this.addPlatformButton = new System.Windows.Forms.Button(); + this.removeManufacturerComboBox = new System.Windows.Forms.ComboBox(); + this.removeManufacturerLabel = new System.Windows.Forms.Label(); + this.removeManufacturerButton = new System.Windows.Forms.Button(); + this.addManufacturerLabel = new System.Windows.Forms.Label(); + this.addManufacturerTextBox = new System.Windows.Forms.TextBox(); + this.addManufacturerButton = new System.Windows.Forms.Button(); + this.removeGenreComboBox = new System.Windows.Forms.ComboBox(); + this.removeGenreLabel = new System.Windows.Forms.Label(); + this.removeGenreButton = new System.Windows.Forms.Button(); + this.addGenreLabel = new System.Windows.Forms.Label(); + this.addGenreTextBox = new System.Windows.Forms.TextBox(); + this.addGenreButton = new System.Windows.Forms.Button(); + this.menuStrip.SuspendLayout(); + this.tabControl.SuspendLayout(); + this.dbOptionsTabPage.SuspendLayout(); + this.generalFileItemOptionsGroupBox.SuspendLayout(); + this.SuspendLayout(); + // + // menuStrip + // + this.menuStrip.Items.AddRange( new System.Windows.Forms.ToolStripItem[] { this.addDeleteApplicationsToolStripMenuItem, - this.toolsStripMenuItem}); - this.menuStrip.Location = new System.Drawing.Point(0, 0); - this.menuStrip.Name = "menuStrip"; - this.menuStrip.RenderMode = System.Windows.Forms.ToolStripRenderMode.System; - this.menuStrip.Size = new System.Drawing.Size(747, 24); - this.menuStrip.TabIndex = 0; - this.menuStrip.Text = "menuStrip"; - // - // addDeleteApplicationsToolStripMenuItem - // - this.addDeleteApplicationsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolsStripMenuItem} ); + this.menuStrip.Location = new System.Drawing.Point( 0, 0 ); + this.menuStrip.Name = "menuStrip"; + this.menuStrip.RenderMode = System.Windows.Forms.ToolStripRenderMode.System; + this.menuStrip.Size = new System.Drawing.Size( 747, 24 ); + this.menuStrip.TabIndex = 0; + this.menuStrip.Text = "menuStrip"; + // + // addDeleteApplicationsToolStripMenuItem + // + this.addDeleteApplicationsToolStripMenuItem.DropDownItems.AddRange( new System.Windows.Forms.ToolStripItem[] { this.addApplicationToolStripMenuItem, - this.deleteApplicationToolStripMenuItem}); - this.addDeleteApplicationsToolStripMenuItem.Name = "addDeleteApplicationsToolStripMenuItem"; - this.addDeleteApplicationsToolStripMenuItem.Size = new System.Drawing.Size(132, 20); - this.addDeleteApplicationsToolStripMenuItem.Text = "Add/Delete applications"; - // - // addApplicationToolStripMenuItem - // - this.addApplicationToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.deleteApplicationToolStripMenuItem} ); + this.addDeleteApplicationsToolStripMenuItem.Name = "addDeleteApplicationsToolStripMenuItem"; + this.addDeleteApplicationsToolStripMenuItem.Size = new System.Drawing.Size( 132, 20 ); + this.addDeleteApplicationsToolStripMenuItem.Text = "Add/Delete applications"; + // + // addApplicationToolStripMenuItem + // + this.addApplicationToolStripMenuItem.DropDownItems.AddRange( new System.Windows.Forms.ToolStripItem[] { this.applicationWithFiledirectoryToolStripMenuItem, this.addGroupnodeToolStripMenuItem, - this.extendedApplicationItemToolStripMenuItem}); - this.addApplicationToolStripMenuItem.Name = "addApplicationToolStripMenuItem"; - this.addApplicationToolStripMenuItem.Size = new System.Drawing.Size(170, 22); - this.addApplicationToolStripMenuItem.Text = "Add application"; - // - // applicationWithFiledirectoryToolStripMenuItem - // - this.applicationWithFiledirectoryToolStripMenuItem.Name = "applicationWithFiledirectoryToolStripMenuItem"; - this.applicationWithFiledirectoryToolStripMenuItem.Size = new System.Drawing.Size(207, 22); - this.applicationWithFiledirectoryToolStripMenuItem.Text = "Applicationitem"; - this.applicationWithFiledirectoryToolStripMenuItem.Click += new System.EventHandler(this.applicationWithFiledirectoryToolStripMenuItem_Click); - // - // addGroupnodeToolStripMenuItem - // - this.addGroupnodeToolStripMenuItem.Name = "addGroupnodeToolStripMenuItem"; - this.addGroupnodeToolStripMenuItem.Size = new System.Drawing.Size(207, 22); - this.addGroupnodeToolStripMenuItem.Text = "Groupingtem"; - this.addGroupnodeToolStripMenuItem.Click += new System.EventHandler(this.addGroupnodeToolStripMenuItem_Click); - // - // extendedApplicationItemToolStripMenuItem - // - this.extendedApplicationItemToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.extendedApplicationItemToolStripMenuItem} ); + this.addApplicationToolStripMenuItem.Name = "addApplicationToolStripMenuItem"; + this.addApplicationToolStripMenuItem.Size = new System.Drawing.Size( 170, 22 ); + this.addApplicationToolStripMenuItem.Text = "Add application"; + // + // applicationWithFiledirectoryToolStripMenuItem + // + this.applicationWithFiledirectoryToolStripMenuItem.Name = "applicationWithFiledirectoryToolStripMenuItem"; + this.applicationWithFiledirectoryToolStripMenuItem.Size = new System.Drawing.Size( 207, 22 ); + this.applicationWithFiledirectoryToolStripMenuItem.Text = "Applicationitem"; + this.applicationWithFiledirectoryToolStripMenuItem.Click += new System.EventHandler( this.applicationWithFiledirectoryToolStripMenuItem_Click ); + // + // addGroupnodeToolStripMenuItem + // + this.addGroupnodeToolStripMenuItem.Name = "addGroupnodeToolStripMenuItem"; + this.addGroupnodeToolStripMenuItem.Size = new System.Drawing.Size( 207, 22 ); + this.addGroupnodeToolStripMenuItem.Text = "Groupingtem"; + this.addGroupnodeToolStripMenuItem.Click += new System.EventHandler( this.addGroupnodeToolStripMenuItem_Click ); + // + // extendedApplicationItemToolStripMenuItem + // + this.extendedApplicationItemToolStripMenuItem.DropDownItems.AddRange( new System.Windows.Forms.ToolStripItem[] { this.mameImportToolStripMenuItem, - this.importGamebaseItemToolStripMenuItem}); - this.extendedApplicationItemToolStripMenuItem.Name = "extendedApplicationItemToolStripMenuItem"; - this.extendedApplicationItemToolStripMenuItem.Size = new System.Drawing.Size(207, 22); - this.extendedApplicationItemToolStripMenuItem.Text = "Extended applicationItem"; - // - // mameImportToolStripMenuItem - // - this.mameImportToolStripMenuItem.Name = "mameImportToolStripMenuItem"; - this.mameImportToolStripMenuItem.Size = new System.Drawing.Size(170, 22); - this.mameImportToolStripMenuItem.Text = "Import Mame"; - this.mameImportToolStripMenuItem.Click += new System.EventHandler(this.mameImportToolStripMenuItem_Click); - // - // importGamebaseItemToolStripMenuItem - // - this.importGamebaseItemToolStripMenuItem.Name = "importGamebaseItemToolStripMenuItem"; - this.importGamebaseItemToolStripMenuItem.Size = new System.Drawing.Size(170, 22); - this.importGamebaseItemToolStripMenuItem.Text = "Import Gamebase"; - this.importGamebaseItemToolStripMenuItem.Click += new System.EventHandler(this.importGamebaseItemToolStripMenuItem_Click); - // - // deleteApplicationToolStripMenuItem - // - this.deleteApplicationToolStripMenuItem.Image = global::GUIPrograms.Properties.Resources.deleteButton_Image; - this.deleteApplicationToolStripMenuItem.Name = "deleteApplicationToolStripMenuItem"; - this.deleteApplicationToolStripMenuItem.Size = new System.Drawing.Size(170, 22); - this.deleteApplicationToolStripMenuItem.Text = "Delete application"; - this.deleteApplicationToolStripMenuItem.Click += new System.EventHandler(this.deleteApplicationToolStripMenuItem_Click); - // - // toolsStripMenuItem - // - this.toolsStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.premadeConfigurationsToolStripMenuItem}); - this.toolsStripMenuItem.Name = "toolsStripMenuItem"; - this.toolsStripMenuItem.Size = new System.Drawing.Size(44, 20); - this.toolsStripMenuItem.Text = "Tools"; - // - // premadeConfigurationsToolStripMenuItem - // - this.premadeConfigurationsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.emulatorSetupToolStripMenuItem}); - this.premadeConfigurationsToolStripMenuItem.Name = "premadeConfigurationsToolStripMenuItem"; - this.premadeConfigurationsToolStripMenuItem.Size = new System.Drawing.Size(155, 22); - this.premadeConfigurationsToolStripMenuItem.Text = "Configurations"; - // - // emulatorSetupToolStripMenuItem - // - this.emulatorSetupToolStripMenuItem.Name = "emulatorSetupToolStripMenuItem"; - this.emulatorSetupToolStripMenuItem.Size = new System.Drawing.Size(158, 22); - this.emulatorSetupToolStripMenuItem.Text = "Emulator Setup"; - // - // treeView - // - this.treeView.AllowDrop = true; - this.treeView.HideSelection = false; - this.treeView.HotTracking = true; - this.treeView.LabelEdit = true; - this.treeView.Location = new System.Drawing.Point(0, 27); - this.treeView.Name = "treeView"; - treeNode3.Name = "applicationNode"; - treeNode3.Text = "Applications"; - this.treeView.Nodes.AddRange(new System.Windows.Forms.TreeNode[] { - treeNode3}); - this.treeView.Size = new System.Drawing.Size(224, 576); - this.treeView.TabIndex = 8; - this.treeView.AfterLabelEdit += new System.Windows.Forms.NodeLabelEditEventHandler(this.treeView_AfterLabelEdit); - this.treeView.DragDrop += new System.Windows.Forms.DragEventHandler(this.treeView_DragDrop); - this.treeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView_AfterSelect); - this.treeView.DragEnter += new System.Windows.Forms.DragEventHandler(this.treeView_DragEnter); - this.treeView.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView_NodeMouseClick); - this.treeView.BeforeLabelEdit += new System.Windows.Forms.NodeLabelEditEventHandler(this.treeView_BeforeLabelEdit); - this.treeView.BeforeSelect += new System.Windows.Forms.TreeViewCancelEventHandler(this.treeView_BeforeSelect); - this.treeView.ItemDrag += new System.Windows.Forms.ItemDragEventHandler(this.treeView_ItemDrag); - this.treeView.DragOver += new System.Windows.Forms.DragEventHandler(this.treeView_DragOver); - // - // tabControl - // - this.tabControl.Controls.Add(this.detailsTabPage); - this.tabControl.Controls.Add(this.directoryTabPage); - this.tabControl.Controls.Add(this.settingsTabPage); - this.tabControl.Controls.Add(this.viewTabPage); - this.tabControl.Controls.Add(this.dbOptionsTabPage); - this.tabControl.Location = new System.Drawing.Point(230, 27); - this.tabControl.Name = "tabControl"; - this.tabControl.SelectedIndex = 0; - this.tabControl.ShowToolTips = true; - this.tabControl.Size = new System.Drawing.Size(505, 577); - this.tabControl.TabIndex = 2; - this.tabControl.Click += new System.EventHandler(this.dbOptionsTabPage_Click); - this.tabControl.SelectedIndexChanged += new System.EventHandler(this.tabControl_SelectedIndexChanged); - // - // detailsTabPage - // - this.detailsTabPage.BackColor = System.Drawing.Color.Transparent; - this.detailsTabPage.Location = new System.Drawing.Point(4, 22); - this.detailsTabPage.Name = "detailsTabPage"; - this.detailsTabPage.Padding = new System.Windows.Forms.Padding(3); - this.detailsTabPage.Size = new System.Drawing.Size(497, 551); - this.detailsTabPage.TabIndex = 0; - this.detailsTabPage.Text = "Details"; - this.detailsTabPage.UseVisualStyleBackColor = true; - // - // directoryTabPage - // - this.directoryTabPage.BackColor = System.Drawing.Color.Transparent; - this.directoryTabPage.Location = new System.Drawing.Point(4, 22); - this.directoryTabPage.Name = "directoryTabPage"; - this.directoryTabPage.Padding = new System.Windows.Forms.Padding(3); - this.directoryTabPage.Size = new System.Drawing.Size(497, 551); - this.directoryTabPage.TabIndex = 1; - this.directoryTabPage.Text = "Files"; - this.directoryTabPage.UseVisualStyleBackColor = true; - // - // settingsTabPage - // - this.settingsTabPage.Controls.Add(this.button2); - this.settingsTabPage.Controls.Add(this.titleTextBox); - this.settingsTabPage.Controls.Add(this.titleLabel); - this.settingsTabPage.Controls.Add(this.button1); - this.settingsTabPage.Controls.Add(this.checkBoxUseThumbsDir); - this.settingsTabPage.Location = new System.Drawing.Point(4, 22); - this.settingsTabPage.Name = "settingsTabPage"; - this.settingsTabPage.Size = new System.Drawing.Size(497, 551); - this.settingsTabPage.TabIndex = 4; - this.settingsTabPage.Text = "Settings"; - this.settingsTabPage.UseVisualStyleBackColor = true; - // - // button2 - // - this.button2.Location = new System.Drawing.Point(172, 230); - this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(75, 23); - this.button2.TabIndex = 42; - this.button2.Text = "save"; - this.button2.UseVisualStyleBackColor = true; - this.button2.Click += new System.EventHandler(this.button2_Click); - // - // titleTextBox - // - this.titleTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.titleTextBox.Location = new System.Drawing.Point(102, 34); - this.titleTextBox.Name = "titleTextBox"; - this.titleTextBox.Size = new System.Drawing.Size(325, 21); - this.titleTextBox.TabIndex = 41; - // - // titleLabel - // - this.titleLabel.Location = new System.Drawing.Point(11, 34); - this.titleLabel.Name = "titleLabel"; - this.titleLabel.Size = new System.Drawing.Size(93, 20); - this.titleLabel.TabIndex = 40; - this.titleLabel.Text = "Title:"; - this.titleLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // button1 - // - this.button1.Location = new System.Drawing.Point(433, 34); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(44, 23); - this.button1.TabIndex = 38; - this.button1.Text = "Reset"; - this.button1.UseVisualStyleBackColor = true; - this.button1.Click += new System.EventHandler(this.button1_Click); - // - // checkBoxUseThumbsDir - // - this.checkBoxUseThumbsDir.AutoSize = true; - this.checkBoxUseThumbsDir.Location = new System.Drawing.Point(14, 104); - this.checkBoxUseThumbsDir.Name = "checkBoxUseThumbsDir"; - this.checkBoxUseThumbsDir.Size = new System.Drawing.Size(129, 17); - this.checkBoxUseThumbsDir.TabIndex = 39; - this.checkBoxUseThumbsDir.Text = "usw thumbs directory"; - this.checkBoxUseThumbsDir.UseVisualStyleBackColor = true; - // - // viewTabPage - // - this.viewTabPage.BackColor = System.Drawing.Color.Transparent; - this.viewTabPage.Location = new System.Drawing.Point(4, 22); - this.viewTabPage.Name = "viewTabPage"; - this.viewTabPage.Padding = new System.Windows.Forms.Padding(3); - this.viewTabPage.Size = new System.Drawing.Size(497, 551); - this.viewTabPage.TabIndex = 2; - this.viewTabPage.Text = "Views"; - this.viewTabPage.UseVisualStyleBackColor = true; - // - // dbOptionsTabPage - // - this.dbOptionsTabPage.Controls.Add(this.generalFileItemOptionsGroupBox); - this.dbOptionsTabPage.Location = new System.Drawing.Point(4, 22); - this.dbOptionsTabPage.Name = "dbOptionsTabPage"; - this.dbOptionsTabPage.Padding = new System.Windows.Forms.Padding(3); - this.dbOptionsTabPage.Size = new System.Drawing.Size(497, 551); - this.dbOptionsTabPage.TabIndex = 3; - this.dbOptionsTabPage.Text = "DB options"; - this.dbOptionsTabPage.UseVisualStyleBackColor = true; - this.dbOptionsTabPage.Click += new System.EventHandler(this.dbOptionsTabPage_Click); - // - // generalFileItemOptionsGroupBox - // - this.generalFileItemOptionsGroupBox.Controls.Add(this.removePlatformComboBox); - this.generalFileItemOptionsGroupBox.Controls.Add(this.removePlatformLabel); - this.generalFileItemOptionsGroupBox.Controls.Add(this.removePlatformButton); - this.generalFileItemOptionsGroupBox.Controls.Add(this.addPlatformLabel); - this.generalFileItemOptionsGroupBox.Controls.Add(this.addPlatformTextBox); - this.generalFileItemOptionsGroupBox.Controls.Add(this.addPlatformButton); - this.generalFileItemOptionsGroupBox.Controls.Add(this.removeManufacturerComboBox); - this.generalFileItemOptionsGroupBox.Controls.Add(this.removeManufacturerLabel); - this.generalFileItemOptionsGroupBox.Controls.Add(this.removeManufacturerButton); - this.generalFileItemOptionsGroupBox.Controls.Add(this.addManufacturerLabel); - this.generalFileItemOptionsGroupBox.Controls.Add(this.addManufacturerTextBox); - this.generalFileItemOptionsGroupBox.Controls.Add(this.addManufacturerButton); - this.generalFileItemOptionsGroupBox.Controls.Add(this.removeGenreComboBox); - this.generalFileItemOptionsGroupBox.Controls.Add(this.removeGenreLabel); - this.generalFileItemOptionsGroupBox.Controls.Add(this.removeGenreButton); - this.generalFileItemOptionsGroupBox.Controls.Add(this.addGenreLabel); - this.generalFileItemOptionsGroupBox.Controls.Add(this.addGenreTextBox); - this.generalFileItemOptionsGroupBox.Controls.Add(this.addGenreButton); - this.generalFileItemOptionsGroupBox.Location = new System.Drawing.Point(3, 6); - this.generalFileItemOptionsGroupBox.Name = "generalFileItemOptionsGroupBox"; - this.generalFileItemOptionsGroupBox.Size = new System.Drawing.Size(488, 496); - this.generalFileItemOptionsGroupBox.TabIndex = 79; - this.generalFileItemOptionsGroupBox.TabStop = false; - // - // removePlatformComboBox - // - this.removePlatformComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.removePlatformComboBox.FormattingEnabled = true; - this.removePlatformComboBox.Location = new System.Drawing.Point(99, 249); - this.removePlatformComboBox.Name = "removePlatformComboBox"; - this.removePlatformComboBox.Size = new System.Drawing.Size(306, 21); - this.removePlatformComboBox.TabIndex = 92; - // - // removePlatformLabel - // - this.removePlatformLabel.AutoSize = true; - this.removePlatformLabel.Location = new System.Drawing.Point(6, 252); - this.removePlatformLabel.Name = "removePlatformLabel"; - this.removePlatformLabel.Size = new System.Drawing.Size(89, 13); - this.removePlatformLabel.TabIndex = 91; - this.removePlatformLabel.Text = "Remove platform"; - // - // removePlatformButton - // - this.removePlatformButton.Location = new System.Drawing.Point(411, 249); - this.removePlatformButton.Name = "removePlatformButton"; - this.removePlatformButton.Size = new System.Drawing.Size(62, 23); - this.removePlatformButton.TabIndex = 90; - this.removePlatformButton.Text = "Remove.."; - this.removePlatformButton.UseVisualStyleBackColor = true; - this.removePlatformButton.Click += new System.EventHandler(this.removePlatformButton_Click); - // - // addPlatformLabel - // - this.addPlatformLabel.AutoSize = true; - this.addPlatformLabel.Location = new System.Drawing.Point(6, 216); - this.addPlatformLabel.Name = "addPlatformLabel"; - this.addPlatformLabel.Size = new System.Drawing.Size(77, 13); - this.addPlatformLabel.TabIndex = 87; - this.addPlatformLabel.Text = "Add platform.."; - // - // addPlatformTextBox - // - this.addPlatformTextBox.Location = new System.Drawing.Point(99, 213); - this.addPlatformTextBox.Name = "addPlatformTextBox"; - this.addPlatformTextBox.Size = new System.Drawing.Size(306, 21); - this.addPlatformTextBox.TabIndex = 88; - // - // addPlatformButton - // - this.addPlatformButton.Location = new System.Drawing.Point(411, 213); - this.addPlatformButton.Name = "addPlatformButton"; - this.addPlatformButton.Size = new System.Drawing.Size(62, 23); - this.addPlatformButton.TabIndex = 89; - this.addPlatformButton.Text = "Add.."; - this.addPlatformButton.UseVisualStyleBackColor = true; - this.addPlatformButton.Click += new System.EventHandler(this.addPlatformButton_Click); - // - // removeManufacturerComboBox - // - this.removeManufacturerComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.removeManufacturerComboBox.FormattingEnabled = true; - this.removeManufacturerComboBox.Location = new System.Drawing.Point(99, 165); - this.removeManufacturerComboBox.Name = "removeManufacturerComboBox"; - this.removeManufacturerComboBox.Size = new System.Drawing.Size(306, 21); - this.removeManufacturerComboBox.TabIndex = 86; - // - // removeManufacturerLabel - // - this.removeManufacturerLabel.Location = new System.Drawing.Point(6, 157); - this.removeManufacturerLabel.Name = "removeManufacturerLabel"; - this.removeManufacturerLabel.Size = new System.Drawing.Size(82, 29); - this.removeManufacturerLabel.TabIndex = 85; - this.removeManufacturerLabel.Text = "Remove Manufacturer"; - // - // removeManufacturerButton - // - this.removeManufacturerButton.Location = new System.Drawing.Point(411, 165); - this.removeManufacturerButton.Name = "removeManufacturerButton"; - this.removeManufacturerButton.Size = new System.Drawing.Size(62, 23); - this.removeManufacturerButton.TabIndex = 84; - this.removeManufacturerButton.Text = "Remove.."; - this.removeManufacturerButton.UseVisualStyleBackColor = true; - this.removeManufacturerButton.Click += new System.EventHandler(this.removeManufacturerButton_Click); - // - // addManufacturerLabel - // - this.addManufacturerLabel.Location = new System.Drawing.Point(6, 121); - this.addManufacturerLabel.Name = "addManufacturerLabel"; - this.addManufacturerLabel.Size = new System.Drawing.Size(82, 36); - this.addManufacturerLabel.TabIndex = 81; - this.addManufacturerLabel.Text = "Add Manufacturer.."; - // - // addManufacturerTextBox - // - this.addManufacturerTextBox.Location = new System.Drawing.Point(99, 129); - this.addManufacturerTextBox.Name = "addManufacturerTextBox"; - this.addManufacturerTextBox.Size = new System.Drawing.Size(306, 21); - this.addManufacturerTextBox.TabIndex = 82; - // - // addManufacturerButton - // - this.addManufacturerButton.Location = new System.Drawing.Point(411, 129); - this.addManufacturerButton.Name = "addManufacturerButton"; - this.addManufacturerButton.Size = new System.Drawing.Size(62, 23); - this.addManufacturerButton.TabIndex = 83; - this.addManufacturerButton.Text = "Add.."; - this.addManufacturerButton.UseVisualStyleBackColor = true; - this.addManufacturerButton.Click += new System.EventHandler(this.addManufacturerButton_Click); - // - // removeGenreComboBox - // - this.removeGenreComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.removeGenreComboBox.FormattingEnabled = true; - this.removeGenreComboBox.Location = new System.Drawing.Point(99, 70); - this.removeGenreComboBox.Name = "removeGenreComboBox"; - this.removeGenreComboBox.Size = new System.Drawing.Size(306, 21); - this.removeGenreComboBox.TabIndex = 80; - // - // removeGenreLabel - // - this.removeGenreLabel.AutoSize = true; - this.removeGenreLabel.Location = new System.Drawing.Point(6, 73); - this.removeGenreLabel.Name = "removeGenreLabel"; - this.removeGenreLabel.Size = new System.Drawing.Size(77, 13); - this.removeGenreLabel.TabIndex = 79; - this.removeGenreLabel.Text = "Remove genre"; - // - // removeGenreButton - // - this.removeGenreButton.Location = new System.Drawing.Point(411, 70); - this.removeGenreButton.Name = "removeGenreButton"; - this.removeGenreButton.Size = new System.Drawing.Size(62, 23); - this.removeGenreButton.TabIndex = 78; - this.removeGenreButton.Text = "Remove.."; - this.removeGenreButton.UseVisualStyleBackColor = true; - this.removeGenreButton.Click += new System.EventHandler(this.removeGenreButton_Click); - // - // addGenreLabel - // - this.addGenreLabel.AutoSize = true; - this.addGenreLabel.Location = new System.Drawing.Point(6, 37); - this.addGenreLabel.Name = "addGenreLabel"; - this.addGenreLabel.Size = new System.Drawing.Size(65, 13); - this.addGenreLabel.TabIndex = 74; - this.addGenreLabel.Text = "Add genre.."; - // - // addGenreTextBox - // - this.addGenreTextBox.Location = new System.Drawing.Point(99, 34); - this.addGenreTextBox.Name = "addGenreTextBox"; - this.addGenreTextBox.Size = new System.Drawing.Size(306, 21); - this.addGenreTextBox.TabIndex = 75; - // - // addGenreButton - // - this.addGenreButton.Location = new System.Drawing.Point(411, 34); - this.addGenreButton.Name = "addGenreButton"; - this.addGenreButton.Size = new System.Drawing.Size(62, 23); - this.addGenreButton.TabIndex = 76; - this.addGenreButton.Text = "Add.."; - this.addGenreButton.UseVisualStyleBackColor = true; - this.addGenreButton.Click += new System.EventHandler(this.addGenreButton_Click); - // - // SetupForm - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(747, 609); - this.Controls.Add(this.tabControl); - this.Controls.Add(this.treeView); - this.Controls.Add(this.menuStrip); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; - this.MainMenuStrip = this.menuStrip; - this.Name = "SetupForm"; - this.ShowIcon = false; - this.ShowInTaskbar = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "SetupForm"; - this.Load += new System.EventHandler(this.SetupForm_Load); - this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.SetupForm_FormClosed); - this.menuStrip.ResumeLayout(false); - this.menuStrip.PerformLayout(); - this.tabControl.ResumeLayout(false); - this.settingsTabPage.ResumeLayout(false); - this.settingsTabPage.PerformLayout(); - this.dbOptionsTabPage.ResumeLayout(false); - this.generalFileItemOptionsGroupBox.ResumeLayout(false); - this.generalFileItemOptionsGroupBox.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); + this.importGamebaseItemToolStripMenuItem} ); + this.extendedApplicationItemToolStripMenuItem.Name = "extendedApplicationItemToolStripMenuItem"; + this.extendedApplicationItemToolStripMenuItem.Size = new System.Drawing.Size( 207, 22 ); + this.extendedApplicationItemToolStripMenuItem.Text = "Extended applicationItem"; + // + // mameImportToolStripMenuItem + // + this.mameImportToolStripMenuItem.Name = "mameImportToolStripMenuItem"; + this.mameImportToolStripMenuItem.Size = new System.Drawing.Size( 170, 22 ); + this.mameImportToolStripMenuItem.Text = "Import Mame"; + this.mameImportToolStripMenuItem.Click += new System.EventHandler( this.mameImportToolStripMenuItem_Click ); + // + // importGamebaseItemToolStripMenuItem + // + this.importGamebaseItemToolStripMenuItem.Name = "importGamebaseItemToolStripMenuItem"; + this.importGamebaseItemToolStripMenuItem.Size = new System.Drawing.Size( 170, 22 ); + this.importGamebaseItemToolStripMenuItem.Text = "Import Gamebase"; + this.importGamebaseItemToolStripMenuItem.Click += new System.EventHandler( this.importGamebaseItemToolStripMenuItem_Click ); + // + // deleteApplicationToolStripMenuItem + // + this.deleteApplicationToolStripMenuItem.Image = global::GUIPrograms.Properties.Resources.deleteButton_Image; + this.deleteApplicationToolStripMenuItem.Name = "deleteApplicationToolStripMenuItem"; + this.deleteApplicationToolStripMenuItem.Size = new System.Drawing.Size( 170, 22 ); + this.deleteApplicationToolStripMenuItem.Text = "Delete application"; + this.deleteApplicationToolStripMenuItem.Click += new System.EventHandler( this.deleteApplicationToolStripMenuItem_Click ); + // + // toolsStripMenuItem + // + this.toolsStripMenuItem.DropDownItems.AddRange( new System.Windows.Forms.ToolStripItem[] { + this.premadeConfigurationsToolStripMenuItem} ); + this.toolsStripMenuItem.Name = "toolsStripMenuItem"; + this.toolsStripMenuItem.Size = new System.Drawing.Size( 44, 20 ); + this.toolsStripMenuItem.Text = "Tools"; + // + // premadeConfigurationsToolStripMenuItem + // + this.premadeConfigurationsToolStripMenuItem.DropDownItems.AddRange( new System.Windows.Forms.ToolStripItem[] { + this.emulatorSetupToolStripMenuItem} ); + this.premadeConfigurationsToolStripMenuItem.Name = "premadeConfigurationsToolStripMenuItem"; + this.premadeConfigurationsToolStripMenuItem.Size = new System.Drawing.Size( 155, 22 ); + this.premadeConfigurationsToolStripMenuItem.Text = "Configurations"; + // + // emulatorSetupToolStripMenuItem + // + this.emulatorSetupToolStripMenuItem.Name = "emulatorSetupToolStripMenuItem"; + this.emulatorSetupToolStripMenuItem.Size = new System.Drawing.Size( 158, 22 ); + this.emulatorSetupToolStripMenuItem.Text = "Emulator Setup"; + // + // treeView + // + this.treeView.AllowDrop = true; + this.treeView.HideSelection = false; + this.treeView.HotTracking = true; + this.treeView.LabelEdit = true; + this.treeView.Location = new System.Drawing.Point( 0, 27 ); + this.treeView.Name = "treeView"; + treeNode1.Name = "applicationNode"; + treeNode1.Text = "Applications"; + this.treeView.Nodes.AddRange( new System.Windows.Forms.TreeNode[] { + treeNode1} ); + this.treeView.Size = new System.Drawing.Size( 224, 576 ); + this.treeView.TabIndex = 8; + this.treeView.DragDrop += new System.Windows.Forms.DragEventHandler( this.treeView_DragDrop ); + this.treeView.DragOver += new System.Windows.Forms.DragEventHandler( this.treeView_DragOver ); + this.treeView.AfterLabelEdit += new System.Windows.Forms.NodeLabelEditEventHandler( this.treeView_AfterLabelEdit ); + this.treeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler( this.treeView_AfterSelect ); + this.treeView.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler( this.treeView_NodeMouseClick ); + this.treeView.DragEnter += new System.Windows.Forms.DragEventHandler( this.treeView_DragEnter ); + this.treeView.BeforeLabelEdit += new System.Windows.Forms.NodeLabelEditEventHandler( this.treeView_BeforeLabelEdit ); + this.treeView.BeforeSelect += new System.Windows.Forms.TreeViewCancelEventHandler( this.treeView_BeforeSelect ); + this.treeView.ItemDrag += new System.Windows.Forms.ItemDragEventHandler( this.treeView_ItemDrag ); + // + // tabControl + // + this.tabControl.Controls.Add( this.detailsTabPage ); + this.tabControl.Controls.Add( this.directoryTabPage ); + this.tabControl.Controls.Add( this.viewTabPage ); + this.tabControl.Controls.Add( this.dbOptionsTabPage ); + this.tabControl.Location = new System.Drawing.Point( 230, 27 ); + this.tabControl.Name = "tabControl"; + this.tabControl.SelectedIndex = 0; + this.tabControl.ShowToolTips = true; + this.tabControl.Size = new System.Drawing.Size( 505, 577 ); + this.tabControl.TabIndex = 2; + this.tabControl.Click += new System.EventHandler( this.dbOptionsTabPage_Click ); + this.tabControl.SelectedIndexChanged += new System.EventHandler( this.tabControl_SelectedIndexChanged ); + // + // detailsTabPage + // + this.detailsTabPage.BackColor = System.Drawing.SystemColors.Control; + this.detailsTabPage.Location = new System.Drawing.Point( 4, 22 ); + this.detailsTabPage.Name = "detailsTabPage"; + this.detailsTabPage.Padding = new System.Windows.Forms.Padding( 3 ); + this.detailsTabPage.Size = new System.Drawing.Size( 497, 551 ); + this.detailsTabPage.TabIndex = 0; + this.detailsTabPage.Text = "Details"; + // + // directoryTabPage + // + this.directoryTabPage.BackColor = System.Drawing.SystemColors.Control; + this.directoryTabPage.Location = new System.Drawing.Point( 4, 22 ); + this.directoryTabPage.Name = "directoryTabPage"; + this.directoryTabPage.Padding = new System.Windows.Forms.Padding( 3 ); + this.directoryTabPage.Size = new System.Drawing.Size( 497, 551 ); + this.directoryTabPage.TabIndex = 1; + this.directoryTabPage.Text = "Files"; + // + // viewTabPage + // + this.viewTabPage.BackColor = System.Drawing.SystemColors.Control; + this.viewTabPage.Location = new System.Drawing.Point( 4, 22 ); + this.viewTabPage.Name = "viewTabPage"; + this.viewTabPage.Padding = new System.Windows.Forms.Padding( 3 ); + this.viewTabPage.Size = new System.Drawing.Size( 497, 551 ); + this.viewTabPage.TabIndex = 2; + this.viewTabPage.Text = "Views"; + // + // dbOptionsTabPage + // + this.dbOptionsTabPage.Controls.Add( this.generalFileItemOptionsGroupBox ); + this.dbOptionsTabPage.Location = new System.Drawing.Point( 4, 22 ); + this.dbOptionsTabPage.Name = "dbOptionsTabPage"; + this.dbOptionsTabPage.Padding = new System.Windows.Forms.Padding( 3 ); + this.dbOptionsTabPage.Size = new System.Drawing.Size( 497, 551 ); + this.dbOptionsTabPage.TabIndex = 3; + this.dbOptionsTabPage.Text = "DB options"; + this.dbOptionsTabPage.UseVisualStyleBackColor = true; + this.dbOptionsTabPage.Click += new System.EventHandler( this.dbOptionsTabPage_Click ); + // + // generalFileItemOptionsGroupBox + // + this.generalFileItemOptionsGroupBox.Controls.Add( this.removePlatformComboBox ); + this.generalFileItemOptionsGroupBox.Controls.Add( this.removePlatformLabel ); + this.generalFileItemOptionsGroupBox.Controls.Add( this.removePlatformButton ); + this.generalFileItemOptionsGroupBox.Controls.Add( this.addPlatformLabel ); + this.generalFileItemOptionsGroupBox.Controls.Add( this.addPlatformTextBox ); + this.generalFileItemOptionsGroupBox.Controls.Add( this.addPlatformButton ); + this.generalFileItemOptionsGroupBox.Controls.Add( this.removeManufacturerComboBox ); + this.generalFileItemOptionsGroupBox.Controls.Add( this.removeManufacturerLabel ); + this.generalFileItemOptionsGroupBox.Controls.Add( this.removeManufacturerButton ); + this.generalFileItemOptionsGroupBox.Controls.Add( this.addManufacturerLabel ); + this.generalFileItemOptionsGroupBox.Controls.Add( this.addManufacturerTextBox ); + this.generalFileItemOptionsGroupBox.Controls.Add( this.addManufacturerButton ); + this.generalFileItemOptionsGroupBox.Controls.Add( this.removeGenreComboBox ); + this.generalFileItemOptionsGroupBox.Controls.Add( this.removeGenreLabel ); + this.generalFileItemOptionsGroupBox.Controls.Add( this.removeGenreButton ); + this.generalFileItemOptionsGroupBox.Controls.Add( this.addGenreLabel ); + this.generalFileItemOptionsGroupBox.Controls.Add( this.addGenreTextBox ); + this.generalFileItemOptionsGroupBox.Controls.Add( this.addGenreButton ); + this.generalFileItemOptionsGroupBox.Location = new System.Drawing.Point( 3, 6 ); + this.generalFileItemOptionsGroupBox.Name = "generalFileItemOptionsGroupBox"; + this.generalFileItemOptionsGroupBox.Size = new System.Drawing.Size( 488, 496 ); + this.generalFileItemOptionsGroupBox.TabIndex = 79; + this.generalFileItemOptionsGroupBox.TabStop = false; + // + // removePlatformComboBox + // + this.removePlat... [truncated message content] |
From: <an...@us...> - 2007-08-03 16:49:09
|
Revision: 788 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=788&view=rev Author: and-81 Date: 2007-08-03 09:49:07 -0700 (Fri, 03 Aug 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs trunk/plugins/IR Server Suite/Applications/Translator/ButtonMapping.cs trunk/plugins/IR Server Suite/Applications/Translator/Configuration.cs trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.Designer.cs trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.cs trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs trunk/plugins/IR Server Suite/Applications/Translator/Program.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Common.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/KeysCommand.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/MessageCommand.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/WindowList.cs trunk/plugins/IR Server Suite/Common/IrssUtils/IrssUtils.csproj trunk/plugins/IR Server Suite/Common/IrssUtils/Win32.cs trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/MceIrApi.cs trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/MceReplacementTransceiver.cs trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/UirtTransceiver.cs Added Paths: ----------- trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/EjectCommand.Designer.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/EjectCommand.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/EjectCommand.resx Removed Paths: ------------- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Program.cs Modified: trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2007-08-03 11:33:59 UTC (rev 787) +++ trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2007-08-03 16:49:07 UTC (rev 788) @@ -85,8 +85,11 @@ // Setup taskbar icon _notifyIcon = new NotifyIcon(); _notifyIcon.ContextMenuStrip = new ContextMenuStrip(); - _notifyIcon.ContextMenuStrip.Items.Add(new ToolStripMenuItem("&Setup", null, new EventHandler(ClickSetup))); - _notifyIcon.ContextMenuStrip.Items.Add(new ToolStripMenuItem("&Quit", null, new EventHandler(ClickQuit))); + + _notifyIcon.ContextMenuStrip.Items.Add(new ToolStripLabel("IR Server")); + _notifyIcon.ContextMenuStrip.Items.Add(new ToolStripSeparator()); + _notifyIcon.ContextMenuStrip.Items.Add("&Setup", null, new EventHandler(ClickSetup)); + _notifyIcon.ContextMenuStrip.Items.Add("&Quit", null, new EventHandler(ClickQuit)); _notifyIcon.Icon = Properties.Resources.Icon16; _notifyIcon.Text = "IR Server"; } Modified: trunk/plugins/IR Server Suite/Applications/Translator/ButtonMapping.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/ButtonMapping.cs 2007-08-03 11:33:59 UTC (rev 787) +++ trunk/plugins/IR Server Suite/Applications/Translator/ButtonMapping.cs 2007-08-03 16:49:07 UTC (rev 788) @@ -5,6 +5,9 @@ namespace Translator { + /// <summary> + /// Stores the relevant information for mapping a remote button to a command. + /// </summary> public class ButtonMapping { @@ -18,6 +21,9 @@ #region Properties + /// <summary> + /// Remote button key code. + /// </summary> [XmlAttribute] public string KeyCode { @@ -25,6 +31,9 @@ set { _keyCode = value; } } + /// <summary> + /// Remote button description. + /// </summary> [XmlAttribute] public string Description { @@ -32,6 +41,9 @@ set { _description = value; } } + /// <summary> + /// Command to execute for the remote button. + /// </summary> [XmlAttribute] public string Command { Modified: trunk/plugins/IR Server Suite/Applications/Translator/Configuration.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Configuration.cs 2007-08-03 11:33:59 UTC (rev 787) +++ trunk/plugins/IR Server Suite/Applications/Translator/Configuration.cs 2007-08-03 16:49:07 UTC (rev 788) @@ -84,7 +84,7 @@ #endregion Constructors - #region Methods + #region Static Methods /// <summary> /// Save the supplied configuration to file. @@ -129,7 +129,7 @@ } } - #endregion Methods + #endregion Static Methods } Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.Designer.cs 2007-08-03 11:33:59 UTC (rev 787) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.Designer.cs 2007-08-03 16:49:07 UTC (rev 788) @@ -173,6 +173,9 @@ this.buttonCancel = new System.Windows.Forms.Button(); this.buttonOK = new System.Windows.Forms.Button(); this.toolTips = new System.Windows.Forms.ToolTip(this.components); + this.tabPageMisc = new System.Windows.Forms.TabPage(); + this.labelMiscCommand = new System.Windows.Forms.Label(); + this.comboBoxMiscCommand = new System.Windows.Forms.ComboBox(); this.groupBoxButton.SuspendLayout(); this.groupBoxSet.SuspendLayout(); this.tabControl.SuspendLayout(); @@ -196,6 +199,7 @@ this.groupBoxMouseClick.SuspendLayout(); this.groupBoxMouseMove.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownMouseMove)).BeginInit(); + this.tabPageMisc.SuspendLayout(); this.SuspendLayout(); // // groupBoxButton @@ -307,6 +311,7 @@ this.tabControl.Controls.Add(this.tabPageMessage); this.tabControl.Controls.Add(this.tabPageKeystrokes); this.tabControl.Controls.Add(this.tabPageMouse); + this.tabControl.Controls.Add(this.tabPageMisc); this.tabControl.Location = new System.Drawing.Point(8, 24); this.tabControl.Name = "tabControl"; this.tabControl.SelectedIndex = 0; @@ -1671,6 +1676,36 @@ this.buttonOK.UseVisualStyleBackColor = true; this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click); // + // tabPageMisc + // + this.tabPageMisc.Controls.Add(this.labelMiscCommand); + this.tabPageMisc.Controls.Add(this.comboBoxMiscCommand); + this.tabPageMisc.Location = new System.Drawing.Point(4, 22); + this.tabPageMisc.Name = "tabPageMisc"; + this.tabPageMisc.Padding = new System.Windows.Forms.Padding(3); + this.tabPageMisc.Size = new System.Drawing.Size(432, 206); + this.tabPageMisc.TabIndex = 7; + this.tabPageMisc.Text = "Misc"; + this.tabPageMisc.UseVisualStyleBackColor = true; + // + // labelMiscCommand + // + this.labelMiscCommand.Location = new System.Drawing.Point(8, 16); + this.labelMiscCommand.Name = "labelMiscCommand"; + this.labelMiscCommand.Size = new System.Drawing.Size(88, 21); + this.labelMiscCommand.TabIndex = 0; + this.labelMiscCommand.Text = "Command:"; + this.labelMiscCommand.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // comboBoxMiscCommand + // + this.comboBoxMiscCommand.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBoxMiscCommand.FormattingEnabled = true; + this.comboBoxMiscCommand.Location = new System.Drawing.Point(96, 16); + this.comboBoxMiscCommand.Name = "comboBoxMiscCommand"; + this.comboBoxMiscCommand.Size = new System.Drawing.Size(328, 21); + this.comboBoxMiscCommand.TabIndex = 1; + // // ButtonMappingForm // this.AcceptButton = this.buttonOK; @@ -1719,6 +1754,7 @@ this.groupBoxMouseClick.ResumeLayout(false); this.groupBoxMouseMove.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownMouseMove)).EndInit(); + this.tabPageMisc.ResumeLayout(false); this.ResumeLayout(false); } @@ -1868,6 +1904,9 @@ private System.Windows.Forms.ToolStripMenuItem altToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem controlToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem shiftToolStripMenuItem; + private System.Windows.Forms.TabPage tabPageMisc; + private System.Windows.Forms.Label labelMiscCommand; + private System.Windows.Forms.ComboBox comboBoxMiscCommand; } } \ No newline at end of file Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs 2007-08-03 11:33:59 UTC (rev 787) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs 2007-08-03 16:49:07 UTC (rev 788) @@ -49,9 +49,9 @@ { InitializeComponent(); - _keyCode = keyCode; - _description = description; - _command = command; + _keyCode = keyCode; + _description = description; + _command = command; } #endregion Constructors @@ -130,12 +130,27 @@ comboBoxWindowStyle.Items.AddRange(Enum.GetNames(typeof(ProcessWindowStyle))); comboBoxWindowStyle.SelectedIndex = 0; + // Setup Misc tab + comboBoxMiscCommand.Items.Clear(); + comboBoxMiscCommand.Items.Add(Common.UITextEject); + comboBoxMiscCommand.Items.Add(Common.UITextStandby); + comboBoxMiscCommand.Items.Add(Common.UITextHibernate); + comboBoxMiscCommand.Items.Add(Common.UITextReboot); + comboBoxMiscCommand.Items.Add(Common.UITextShutdown); + + if (!String.IsNullOrEmpty(_command)) { + string prefix = _command; + string suffix = String.Empty; + int find = _command.IndexOf(": "); - string prefix = _command.Substring(0, find + 2); - string suffix = _command.Substring(find + 2); + if (find != -1) + { + prefix = _command.Substring(0, find + 2); + suffix = _command.Substring(find + 2); + } switch (prefix) { @@ -242,6 +257,25 @@ } break; } + + default: + { + tabControl.SelectTab(tabPageMisc); + switch (_command) + { + case Common.CmdPrefixHibernate: + comboBoxMiscCommand.SelectedItem = Common.UITextHibernate; + break; + + default: + if (prefix.Equals(Common.CmdPrefixEject, StringComparison.InvariantCultureIgnoreCase)) + { + comboBoxMiscCommand.SelectedItem = Common.UITextEject; + } + break; + } + break; + } } } @@ -393,6 +427,28 @@ textBoxCommand.Text = _command = newCommand.ToString(); break; } + + case "tabPageMisc": + { + string newCommand = comboBoxMiscCommand.SelectedItem as string; + + switch (newCommand) + { + case Common.UITextEject: + textBoxCommand.Text = _command = Common.CmdPrefixEject; + break; + + case Common.UITextHibernate: + textBoxCommand.Text = _command = Common.CmdPrefixHibernate; + break; + + + } + + + + break; + } } } Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.cs 2007-08-03 11:33:59 UTC (rev 787) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.cs 2007-08-03 16:49:07 UTC (rev 788) @@ -46,6 +46,8 @@ comboBoxCommands.Items.Add(Common.UITextWindowMsg); comboBoxCommands.Items.Add(Common.UITextTcpMsg); comboBoxCommands.Items.Add(Common.UITextKeys); + comboBoxCommands.Items.Add(Common.UITextEject); + //TODO: Add Shutdown and Reboot comboBoxCommands.Items.Add(Common.UITextStandby); comboBoxCommands.Items.Add(Common.UITextHibernate); @@ -105,6 +107,11 @@ writer.WriteAttributeString("command", Common.XmlTagKeys); writer.WriteAttributeString("cmdproperty", item.Substring(Common.CmdPrefixKeys.Length)); } + else if (item.StartsWith(Common.CmdPrefixEject)) + { + writer.WriteAttributeString("command", Common.XmlTagEject); + writer.WriteAttributeString("cmdproperty", item.Substring(Common.CmdPrefixEject.Length)); + } else if (item.StartsWith(Common.CmdPrefixStandby)) { writer.WriteAttributeString("command", Common.XmlTagStandby); @@ -172,6 +179,10 @@ listBoxMacro.Items.Add(Common.CmdPrefixKeys + commandProperty); break; + case Common.XmlTagEject: + listBoxMacro.Items.Add(Common.CmdPrefixEject + commandProperty); + break; + case Common.XmlTagStandby: listBoxMacro.Items.Add(Common.CmdPrefixStandby); break; @@ -250,6 +261,14 @@ listBoxMacro.Items.Add(Common.CmdPrefixKeys + keysCommand.CommandString); } + else if (selected == Common.UITextEject) + { + EjectCommand ejectCommand = new EjectCommand(); + if (ejectCommand.ShowDialog(this) == DialogResult.Cancel) + return; + + listBoxMacro.Items.Add(Common.CmdPrefixEject + ejectCommand.CommandString); + } else if (selected == Common.UITextStandby) { listBoxMacro.Items.Add(Common.CmdPrefixStandby); @@ -422,6 +441,17 @@ listBoxMacro.Items.Insert(index, Common.CmdPrefixKeys + keysCommand.CommandString); listBoxMacro.SelectedIndex = index; } + else if (selected.StartsWith(Common.CmdPrefixEject)) + { + EjectCommand ejectCommand = new EjectCommand(selected.Substring(Common.CmdPrefixEject.Length)); + if (ejectCommand.ShowDialog(this) == DialogResult.Cancel) + return; + + int index = listBoxMacro.SelectedIndex; + listBoxMacro.Items.RemoveAt(index); + listBoxMacro.Items.Insert(index, Common.CmdPrefixEject + ejectCommand.CommandString); + listBoxMacro.SelectedIndex = index; + } else if (selected.StartsWith(Common.CmdPrefixBlast)) { string[] commands = Common.SplitBlastCommand(selected.Substring(Common.CmdPrefixBlast.Length)); Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs 2007-08-03 11:33:59 UTC (rev 787) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs 2007-08-03 16:49:07 UTC (rev 788) @@ -194,6 +194,8 @@ string[] macroList = Program.GetMacroList(false); if (macroList != null && macroList.Length > 0) listBoxMacro.Items.AddRange(macroList); + + Program.UpdateNotifyMenu(); } List<ButtonMapping> GetCurrentSettings() @@ -307,6 +309,35 @@ Configuration.Save(Program.Config, Program.ConfigFile); } + protected override void WndProc(ref Message m) + { + try + { + if (m.Msg == (int)Win32.WindowsMessage.WM_COPYDATA) + { + IrssLog.Info("Received WM_COPYDATA message"); + + Win32.COPYDATASTRUCT dataStructure = (Win32.COPYDATASTRUCT)m.GetLParam(typeof(Win32.COPYDATASTRUCT)); + + if (dataStructure.dwData != 24) + return; + + byte[] dataBytes = new byte[dataStructure.cbData]; + IntPtr lpData = new IntPtr(dataStructure.lpData); + System.Runtime.InteropServices.Marshal.Copy(lpData, dataBytes, 0, dataStructure.cbData); + string strData = Encoding.Default.GetString(dataBytes); + + Program.ProcessCommand(strData); + } + } + catch (Exception ex) + { + IrssLog.Error(ex.ToString()); + } + + base.WndProc(ref m); + } + #region Controls private void listViewButtons_DoubleClick(object sender, EventArgs e) Modified: trunk/plugins/IR Server Suite/Applications/Translator/Program.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2007-08-03 11:33:59 UTC (rev 787) +++ trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2007-08-03 16:49:07 UTC (rev 788) @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Diagnostics; using System.IO; using System.IO.Ports; @@ -111,6 +112,10 @@ static TransceiverInfo _transceiverInfo = new TransceiverInfo(); + //static Thread _focusWatcher; + static IntPtr _ownWindowHandle = IntPtr.Zero; + static IntPtr _currentForegroundWindow = IntPtr.Zero; + #endregion Variables #region Properties @@ -143,9 +148,49 @@ #region Main + /// <summary> + /// The main entry point for the application. + /// </summary> [STAThread] - static void Main() + static void Main(string[] args) { + if (args.Length > 0) + { + for (int index = 0; index < args.Length; index++) + { + switch (args[index].ToLowerInvariant()) + { + case "-macro": + SendCopyDataMessage("Translator", Common.CmdPrefixMacro + args[++index]); + continue; + + case "-eject": + SendCopyDataMessage("Translator", Common.CmdPrefixEject + args[++index]); + continue; + + case "-shutdown": + SendCopyDataMessage("Translator", Common.CmdPrefixShutdown); + continue; + + case "-reboot": + SendCopyDataMessage("Translator", Common.CmdPrefixReboot); + continue; + + case "-standby": + SendCopyDataMessage("Translator", Common.CmdPrefixStandby); + continue; + + case "-hibernate": + SendCopyDataMessage("Translator", Common.CmdPrefixHibernate); + continue; + + //TODO: Add more command line options. + } + } + + return; + } + // Check for multiple instances. if (Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName).Length != 1) return; @@ -184,7 +229,16 @@ // Setup main form ... _mainForm = new MainForm(); + _ownWindowHandle = _mainForm.Handle; + // Start the window focus watcher thread + /* + _focusWatcher = new Thread(new ThreadStart(FocusWatcherThread)); + _focusWatcher.Name = "Translator - Focus watcher"; + _focusWatcher.IsBackground = true; + _focusWatcher.Start(); + */ + // Start server communications ... if (StartComms()) { @@ -204,13 +258,89 @@ StopComms(); + //if (_focusWatcher.IsAlive) + //_focusWatcher.Abort(); + IrssLog.Close(); } + static void FocusWatcherThread() + { + try + { + while (true) + { + UpdateForegroundWindow(); + Thread.Sleep(2000); + } + } + catch + { + } + } + + static void UpdateForegroundWindow() + { + try + { + IntPtr hWnd = Win32.GetForegroundWindow(); + + if (hWnd == IntPtr.Zero) + return; + + if (hWnd == _mainForm.Handle) + return; +/* + string windowTitle = Win32.GetWindowTitle(hWnd); + if (windowTitle.StartsWith("Translator", StringComparison.InvariantCultureIgnoreCase)) + return; + + int procID; + Win32.GetWindowThreadProcessId(hWnd, out procID); + Process proc = Process.GetProcessById(procID); + if (proc.MainModule.ModuleName.Equals("Translator.exe", StringComparison.InvariantCultureIgnoreCase)) + return; + */ + _currentForegroundWindow = hWnd; + } + catch + { + } + } + #endregion Main #region Implementation + static void ShowTranslatorMenu() + { + UpdateForegroundWindow(); + _notifyIcon.ContextMenuStrip.Show(Screen.PrimaryScreen.Bounds.Width / 4, Screen.PrimaryScreen.Bounds.Height / 4); + //_notifyIcon.ContextMenuStrip.Focus(); + } + + static void SendCopyDataMessage(string targetWindow, string data) + { + Win32.COPYDATASTRUCT copyData; + + copyData.dwData = 24; + copyData.lpData = Win32.VarPtr(data).ToInt32(); + copyData.cbData = data.Length; + + IntPtr windowHandle = Win32.FindWindow(null, targetWindow); + if (windowHandle != IntPtr.Zero) + { + IntPtr result; + Win32.SendMessageTimeout(windowHandle, (int)Win32.WindowsMessage.WM_COPYDATA, IntPtr.Zero, Win32.VarPtr(copyData), Win32.SendMessageTimeoutFlags.SMTO_ABORTIFHUNG, 1000, out result); + + if (result == IntPtr.Zero) + { + int lastError = Marshal.GetLastWin32Error(); + throw new Win32Exception(lastError); + } + } + } + static void SystemEvents_PowerModeChanged(object sender, PowerModeChangedEventArgs e) { switch (e.Mode) @@ -243,6 +373,9 @@ { _notifyIcon.ContextMenuStrip.Items.Clear(); + _notifyIcon.ContextMenuStrip.Items.Add(new ToolStripLabel("Translator")); + _notifyIcon.ContextMenuStrip.Items.Add(new ToolStripSeparator()); + if (Config.Programs.Count > 0) { ToolStripMenuItem launch = new ToolStripMenuItem("&Launch"); @@ -277,6 +410,7 @@ _notifyIcon.ContextMenuStrip.Items.Add(macros); } + /**/ ToolStripMenuItem actions = new ToolStripMenuItem("&Actions"); actions.DropDownItems.Add("Next Window", null, new EventHandler(ClickAction)); actions.DropDownItems.Add("Last Window", null, new EventHandler(ClickAction)); @@ -285,25 +419,54 @@ actions.DropDownItems.Add("Minimize Window", null, new EventHandler(ClickAction)); actions.DropDownItems.Add("Restore Window", null, new EventHandler(ClickAction)); + actions.DropDownItems.Add(new ToolStripSeparator()); + actions.DropDownItems.Add("System Standby", null, new EventHandler(ClickAction)); actions.DropDownItems.Add("System Hibernate", null, new EventHandler(ClickAction)); actions.DropDownItems.Add("System Reboot", null, new EventHandler(ClickAction)); actions.DropDownItems.Add("System Logoff", null, new EventHandler(ClickAction)); actions.DropDownItems.Add("System Shutdown", null, new EventHandler(ClickAction)); + + actions.DropDownItems.Add(new ToolStripSeparator()); actions.DropDownItems.Add("Volume Up", null, new EventHandler(ClickAction)); actions.DropDownItems.Add("Volume Down", null, new EventHandler(ClickAction)); actions.DropDownItems.Add("Volume Mute", null, new EventHandler(ClickAction)); + actions.DropDownItems.Add(new ToolStripSeparator()); + ToolStripMenuItem ejectMenu = new ToolStripMenuItem("Eject"); + DriveInfo[] drives = DriveInfo.GetDrives(); + foreach (DriveInfo drive in drives) + if (drive.DriveType == DriveType.CDRom) + ejectMenu.DropDownItems.Add(drive.Name, null, new EventHandler(ClickEjectAction)); + actions.DropDownItems.Add(ejectMenu); + _notifyIcon.ContextMenuStrip.Items.Add(actions); + /**/ _notifyIcon.ContextMenuStrip.Items.Add(new ToolStripSeparator()); - _notifyIcon.ContextMenuStrip.Items.Add("&Setup", null, new EventHandler(ClickSetup)); _notifyIcon.ContextMenuStrip.Items.Add("&Quit", null, new EventHandler(ClickQuit)); } + /**/ + static bool SendMessageToWindow(IntPtr hWnd, Win32.WindowsMessage msg, int wParam, int lParam) + { + IntPtr result; + Win32.SendMessageTimeout(hWnd, (int)msg, new IntPtr(wParam), new IntPtr(lParam), Win32.SendMessageTimeoutFlags.SMTO_ABORTIFHUNG, 1000, out result); + + if (result == IntPtr.Zero) + { + int lastError = Marshal.GetLastWin32Error(); + if (lastError != 0) + throw new Win32Exception(lastError); + } + + return true; + } + /**/ + static void ClickProgram(object sender, EventArgs e) { IrssLog.Info("Click Launch Program"); @@ -371,7 +534,6 @@ MessageBox.Show(ex.Message, "Macro failed", MessageBoxButtons.OK, MessageBoxIcon.Error); } } - static void ClickAction(object sender, EventArgs e) { IrssLog.Info("Click Action"); @@ -385,50 +547,98 @@ switch (menuItem.Text) { case "Next Window": + SendMessageToWindow( + _currentForegroundWindow, + Win32.WindowsMessage.WM_SYSCOMMAND, + (int)Win32.SysCommand.SC_NEXTWINDOW, + 0); break; case "Last Window": + SendMessageToWindow( + _currentForegroundWindow, + Win32.WindowsMessage.WM_SYSCOMMAND, + (int)Win32.SysCommand.SC_PREVWINDOW, + 0); break; case "Close Window": + SendMessageToWindow( + _currentForegroundWindow, + Win32.WindowsMessage.WM_SYSCOMMAND, + (int)Win32.SysCommand.SC_CLOSE, + 0); break; case "Maximize Window": + SendMessageToWindow( + _currentForegroundWindow, + Win32.WindowsMessage.WM_SYSCOMMAND, + (int)Win32.SysCommand.SC_MAXIMIZE, + 0); break; case "Minimize Window": + SendMessageToWindow( + _currentForegroundWindow, + Win32.WindowsMessage.WM_SYSCOMMAND, + (int)Win32.SysCommand.SC_MINIMIZE, + 0); break; case "Restore Window": + SendMessageToWindow( + _currentForegroundWindow, + Win32.WindowsMessage.WM_SYSCOMMAND, + (int)Win32.SysCommand.SC_RESTORE, + 0); break; - case "System Standby": + Application.SetSuspendState(PowerState.Suspend, true, false); break; case "System Hibernate": + Application.SetSuspendState(PowerState.Hibernate, true, false); break; case "System Reboot": + Win32.ExitWindowsEx(Win32.ExitWindows.Reboot | Win32.ExitWindows.ForceIfHung, Win32.ShutdownReason.FlagUserDefined); break; case "System Logoff": + Win32.ExitWindowsEx(Win32.ExitWindows.LogOff | Win32.ExitWindows.ForceIfHung, Win32.ShutdownReason.FlagUserDefined); break; case "System Shutdown": + Win32.ExitWindowsEx(Win32.ExitWindows.ShutDown | Win32.ExitWindows.ForceIfHung, Win32.ShutdownReason.FlagUserDefined); break; case "Volume Up": + SendMessageToWindow( + _currentForegroundWindow, + Win32.WindowsMessage.WM_APPCOMMAND, + (int)Win32.AppCommand.APPCOMMAND_VOLUME_UP, + 0); break; case "Volume Down": + SendMessageToWindow( + _currentForegroundWindow, + Win32.WindowsMessage.WM_APPCOMMAND, + (int)Win32.AppCommand.APPCOMMAND_VOLUME_DOWN, + 0); break; case "Volume Mute": + SendMessageToWindow( + _currentForegroundWindow, + Win32.WindowsMessage.WM_APPCOMMAND, + (int)Win32.AppCommand.APPCOMMAND_VOLUME_MUTE, + 0); break; - default: throw new Exception("Unknown action: " + menuItem.Text); } @@ -440,6 +650,16 @@ } } + static void ClickEjectAction(object sender, EventArgs e) + { + IrssLog.Info("Click Eject Action"); + + ToolStripMenuItem menuItem = sender as ToolStripMenuItem; + if (menuItem == null) + return; + + CDRom.Open(menuItem.Text); + } static void ClickSetup(object sender, EventArgs e) { @@ -978,7 +1198,10 @@ { ProcessCommand(mappedEvent.Command); } - catch (Exception ex) { IrssLog.Error(ex.ToString()); } + catch (Exception ex) + { + IrssLog.Error(ex.ToString()); + } } } } @@ -1054,6 +1277,12 @@ break; } + case Common.XmlTagEject: + { + Common.ProcessEjectCommand(commandProperty); + break; + } + case Common.XmlTagStandby: { Application.SetSuspendState(PowerState.Suspend, true, false); @@ -1181,6 +1410,11 @@ string keyCommand = command.Substring(Common.CmdPrefixKeys.Length); Common.ProcessKeyCommand(keyCommand); } + else if (command.StartsWith(Common.CmdPrefixEject)) // Eject Command + { + string ejectCommand = command.Substring(Common.CmdPrefixEject.Length); + Common.ProcessEjectCommand(ejectCommand); + } else if (command.StartsWith(Common.CmdPrefixMouse)) // Mouse Command { string mouseCommand = command.Substring(Common.CmdPrefixMouse.Length); Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/Common.cs =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssUtils/Common.cs 2007-08-03 11:33:59 UTC (rev 787) +++ trunk/plugins/IR Server Suite/Common/IrssUtils/Common.cs 2007-08-03 16:49:07 UTC (rev 788) @@ -122,6 +122,8 @@ public const string CmdPrefixMouse = "Mouse: "; + public const string CmdPrefixEject = "Eject: "; + #endregion Command Prefixes #region XML Tags @@ -148,6 +150,8 @@ public const string XmlTagMouse = "MOUSE"; + public const string XmlTagEject = "EJECT"; + #endregion XML Tags #region User Interface Text @@ -173,6 +177,8 @@ public const string UITextMouse = "Mouse Command"; + public const string UITextEject = "Eject CD"; + #endregion User Interface Text #region Mouse Commands @@ -481,6 +487,16 @@ } } + /// <summary> + /// Given a CD-ROM drive letter this method will eject the CD tray. + /// </summary> + /// <param name="command">The drive letter of the CD-ROM drive to eject the tray on.</param> + public static void ProcessEjectCommand(string command) + { + if (CDRom.IsCDRom(command)) + CDRom.Open(command); + } + #endregion Command Execution #region Misc Added: trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/EjectCommand.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/EjectCommand.Designer.cs (rev 0) +++ trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/EjectCommand.Designer.cs 2007-08-03 16:49:07 UTC (rev 788) @@ -0,0 +1,110 @@ +namespace IrssUtils.Forms +{ + + partial class EjectCommand + { + + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.buttonCancel = new System.Windows.Forms.Button(); + this.buttonOK = new System.Windows.Forms.Button(); + this.labelDrive = new System.Windows.Forms.Label(); + this.comboBoxDrive = new System.Windows.Forms.ComboBox(); + this.SuspendLayout(); + // + // buttonCancel + // + this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.buttonCancel.Location = new System.Drawing.Point(80, 56); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(64, 24); + this.buttonCancel.TabIndex = 3; + this.buttonCancel.Text = "Cancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click); + // + // buttonOK + // + this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonOK.Location = new System.Drawing.Point(8, 56); + this.buttonOK.Name = "buttonOK"; + this.buttonOK.Size = new System.Drawing.Size(64, 24); + this.buttonOK.TabIndex = 2; + this.buttonOK.Text = "OK"; + this.buttonOK.UseVisualStyleBackColor = true; + this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click); + // + // labelDrive + // + this.labelDrive.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.labelDrive.Location = new System.Drawing.Point(8, 8); + this.labelDrive.Name = "labelDrive"; + this.labelDrive.Size = new System.Drawing.Size(136, 16); + this.labelDrive.TabIndex = 0; + this.labelDrive.Text = "Select drive to eject:"; + // + // comboBoxDrive + // + this.comboBoxDrive.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.comboBoxDrive.FormattingEnabled = true; + this.comboBoxDrive.Location = new System.Drawing.Point(8, 24); + this.comboBoxDrive.Name = "comboBoxDrive"; + this.comboBoxDrive.Size = new System.Drawing.Size(136, 21); + this.comboBoxDrive.TabIndex = 1; + // + // EjectCommand + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(152, 89); + this.Controls.Add(this.comboBoxDrive); + this.Controls.Add(this.labelDrive); + this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.buttonOK); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.MinimumSize = new System.Drawing.Size(160, 116); + this.Name = "EjectCommand"; + this.ShowIcon = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Eject Command"; + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button buttonCancel; + private System.Windows.Forms.Button buttonOK; + private System.Windows.Forms.Label labelDrive; + private System.Windows.Forms.ComboBox comboBoxDrive; + } + +} Added: trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/EjectCommand.cs =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/EjectCommand.cs (rev 0) +++ trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/EjectCommand.cs 2007-08-03 16:49:07 UTC (rev 788) @@ -0,0 +1,68 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Text; +using System.Windows.Forms; + +namespace IrssUtils.Forms +{ + + public partial class EjectCommand : Form + { + + #region Properties + + public string CommandString + { + get + { + return comboBoxDrive.Text; + } + } + + #endregion Properties + + #region Constructors + + public EjectCommand() : this(null) { } + public EjectCommand(string command) + { + InitializeComponent(); + + DriveInfo[] drives = DriveInfo.GetDrives(); + foreach (DriveInfo drive in drives) + { + if (drive.DriveType == DriveType.CDRom) + { + comboBoxDrive.Items.Add(drive.Name); + if (drive.Name == command) + comboBoxDrive.SelectedItem = drive.Name; + } + } + + } + + #endregion + + #region Buttons + + private void buttonOK_Click(object sender, EventArgs e) + { + this.DialogResult = DialogResult.OK; + this.Close(); + } + + private void buttonCancel_Click(object sender, EventArgs e) + { + this.DialogResult = DialogResult.Cancel; + this.Close(); + } + + #endregion Buttons + + } + +} Added: trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/EjectCommand.resx =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/EjectCommand.resx (rev 0) +++ trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/EjectCommand.resx 2007-08-03 16:49:07 UTC (rev 788) @@ -0,0 +1,120 @@ +<?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/IR Server Suite/Common/IrssUtils/Forms/KeysCommand.cs =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/KeysCommand.cs 2007-08-03 11:33:59 UTC (rev 787) +++ trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/KeysCommand.cs 2007-08-03 16:49:07 UTC (rev 788) @@ -31,7 +31,7 @@ { InitializeComponent(); - if (command != null) + if (!String.IsNullOrEmpty(command)) textBoxKeystrokes.Text = command; } Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/MessageCommand.cs =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/MessageCommand.cs 2007-08-03 11:33:59 UTC (rev 787) +++ trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/MessageCommand.cs 2007-08-03 16:49:07 UTC (rev 788) @@ -52,7 +52,7 @@ #region Constructors - public MessageCommand() : this(new string[] { "active", String.Empty, Win32.WM_USER.ToString(), "0", "0" }) { } + public MessageCommand() : this(new string[] { "active", String.Empty, ((int)Win32.WindowsMessage.WM_USER).ToString(), "0", "0" }) { } public MessageCommand(string[] commands) { InitializeComponent(); @@ -104,7 +104,9 @@ } else if (radioButtonWindowTitle.Checked) { - // TODO: Locate Window + WindowList windowList = new WindowList(); + if (windowList.ShowDialog(this) == DialogResult.OK) + textBoxMsgTarget.Text = windowList.SelectedWindowTitle; } } @@ -122,11 +124,11 @@ private void wMAPPToolStripMenuItem_Click(object sender, EventArgs e) { - numericUpDownMsg.Value = new decimal(Win32.WM_APP); + numericUpDownMsg.Value = new decimal((int)Win32.WindowsMessage.WM_APP); } private void wMUSERToolStripMenuItem_Click(object sender, EventArgs e) { - numericUpDownMsg.Value = new decimal(Win32.WM_USER); + numericUpDownMsg.Value = new decimal((int)Win32.WindowsMessage.WM_USER); } private void radioButtonActiveWindow_CheckedChanged(object sender, EventArgs e) Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/WindowList.cs =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/WindowList.cs 2007-08-03 11:33:59 UTC (rev 787) +++ trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/WindowList.cs 2007-08-03 16:49:07 UTC (rev 788) @@ -13,18 +13,6 @@ public partial class WindowList : Form { - #region Interop - - public delegate bool EnumWindowsProc(int hWnd, int lParam); - - [DllImport("user32.dll")] - private static extern int GetWindowText(int hWnd, StringBuilder title, int size); - - [DllImport("user32.dll")] - private static extern int EnumWindows(EnumWindowsProc ewp, int lParam); - - #endregion Interop - #region Properties public string SelectedWindowTitle @@ -47,18 +35,17 @@ void PopulateList() { - EnumWindowsProc ewp = new EnumWindowsProc(AddWindow); + Win32.EnumWindowsProc ewp = new Win32.EnumWindowsProc(AddWindow); - EnumWindows(ewp, 0); + Win32.EnumWindows(ewp, 0); } - bool AddWindow(int hWnd, int lParam) + bool AddWindow(IntPtr hWnd, int lParam) { - StringBuilder title = new StringBuilder(256); - GetWindowText(hWnd, title, 256); + string title = Win32.GetWindowTitle(hWnd); - if (title.Length != 0) - listBoxWindows.Items.Add(title.ToString()); + if (!String.IsNullOrEmpty(title)) + listBoxWindows.Items.Add(title); return true; } Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/IrssUtils.csproj =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssUtils/IrssUtils.csproj 2007-08-03 11:33:59 UTC (rev 787) +++ trunk/plugins/IR Server Suite/Common/IrssUtils/IrssUtils.csproj 2007-08-03 16:49:07 UTC (rev 788) @@ -42,6 +42,12 @@ <ItemGroup> <Compile Include="CDRom.cs" /> <Compile Include="Common.cs" /> + <Compile Include="Forms\EjectCommand.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="Forms\EjectCommand.Designer.cs"> + <DependentUpon>EjectCommand.cs</DependentUpon> + </Compile> <Compile Include="Forms\MouseCommand.cs"> <SubType>Form</SubType> </Compile> @@ -117,6 +123,10 @@ <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> <ItemGroup> + <EmbeddedResource Include="Forms\EjectCommand.resx"> + <DependentUpon>EjectCommand.cs</DependentUpon> + <SubType>Designer</SubType> + </EmbeddedResource> <EmbeddedResource Include="Forms\MouseCommand.resx"> <DependentUpon>MouseCommand.cs</DependentUpon> <SubType>Designer</SubType> Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/Win32.cs =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssUtils/Win32.cs 2007-08-03 11:33:59 UTC (rev 787) +++ trunk/plugins/IR Server Suite/Common/IrssUtils/Win32.cs 2007-08-03 16:49:07 UTC (rev 788) @@ -2,6 +2,7 @@ using System.Collections; using System.Runtime.InteropServices; using System.Security; +using System.Text; namespace IrssUtils { @@ -12,29 +13,16 @@ public static class Win32 { - #region Constants - - /// <summary> - /// Windows Message (USER). - /// </summary> - public const int WM_USER = 0x0400; - - /// <summary> - /// Windows Message (APP). - /// </summary> - public const int WM_APP = 0x8000; - - #endregion Constants - #region Enumerations - public enum WindowsMessages + public enum WindowsMessage { WM_ACTIVATE = 0x6, WM_ACTIVATEAPP = 0x1C, WM_AFXFIRST = 0x360, WM_AFXLAST = 0x37F, WM_APP = 0x8000, + WM_APPCOMMAND = 0x319, WM_ASKCBFORMATNAME = 0x30C, WM_CANCELJOURNAL = 0x4B, WM_CANCELMODE = 0x1F, @@ -240,29 +228,167 @@ WM_XBUTTONUP = 0x20C } + public enum SysCommand + { + SC_SIZE = 0xF000, + SC_MOVE = 0xF010, + SC_MINIMIZE = 0xF020, + SC_MAXIMIZE = 0xF030, + SC_NEXTWINDOW = 0xF040, + SC_PREVWINDOW = 0xF050, + SC_CLOSE = 0xF060, + SC_VSCROLL = 0xF070, + SC_HSCROLL = 0xF080, + SC_MOUSEMENU = 0xF090, + SC_KEYMENU = 0xF100, + SC_ARRANGE = 0xF110, + SC_RESTORE = 0xF120, + SC_TASKLIST = 0xF130, + SC_SCREENSAVE = 0xF140, + SC_HOTKEY = 0xF150, + SC_DEFAULT = 0xF160, + SC_MONITORPOWER = 0xF170, + SC_CONTEXTHELP = 0xF180, + SC_SEPARATOR = 0xF00F, + + SCF_ISSECURE = 0x00000001, + + SC_ICON = SC_MINIMIZE, + SC_ZOOM = SC_MAXIMIZE, + } + + public enum AppCommand + { + APPCOMMAND_BROWSER_BACKWARD = 1, + APPCOMMAND_BROWSER_FORWARD = 2, + APPCOMMAND_BROWSER_REFRESH = 3, + APPCOMMAND_BROWSER_STOP = 4, + APPCOMMAND_BROWSER_SEARCH = 5, + APPCOMMAND_BROWSER_FAVORITES = 6, + APPCOMMAND_BROWSER_HOME = 7, + APPCOMMAND_VOLUME_MUTE = 8, + APPCOMMAND_VOLUME_DOWN = 9, + APPCOMMAND_VOLUME_UP = 10, + APPCOMMAND_MEDIA_NEXTTRACK = 11, + APPCOMMAND_MEDIA_PREVIOUSTRACK = 12, + APPCOMMAND_MEDIA_STOP = 13, + APPCOMMAND_MEDIA_PLAY_PAUSE = 4143, + APPCOMMAND_MEDIA_PLAY = 4142, + APPCOMMAND_MEDIA_PAUSE = 4143, + APPCOMMAND_MEDIA_RECORD = 4144, + APPCOMMAND_MEDIA_FASTFORWARD = 4145, + APPCOMMAND_MEDIA_REWIND = 4146, + APPCOMMAND_MEDIA_CHANNEL_UP = 4147, + APPCOMMAND_MEDIA_CHANNEL_DOWN = 4148, + } + + [Flags] + public enum SendMessageTimeoutFlags + { + SMTO_NORMAL = 0x0000, + SMTO_BLOCK = 0x0001, + SMTO_ABORTIFHUNG = 0x0002, + SMTO_NOTIMEOUTIFNOTHUNG = 0x0008, + } + + [Flags] + public enum ShutdownReason + { + MajorApplication = 0x00040000, + MajorHardware = 0x00010000, + MajorLegacyApi = 0x00070000, + MajorOperatingSystem = 0x00020000, + MajorOther = 0x00000000, + MajorPower = 0x00060000, + MajorSoftware = 0x00030000, + MajorSystem = 0x00050000, + + MinorBlueScreen = 0x0000000F, + MinorCordUnplugged = 0x0000000b, + MinorDisk = 0x00000007, + MinorEnvironment = 0x0000000c, + MinorHardwareDriver = 0x0000000d, + MinorHotfix = 0x00000011, + MinorHung = 0x00000005, + MinorInstallation = 0x00000002, + MinorMaintenance = 0x00000001, + MinorMMC = 0x00000019, + MinorNetworkConnectivity = 0x00000014, + MinorNetworkCard = 0x00000009, + MinorOther = 0x00000000, + MinorOtherDriver = 0x0000000e, + MinorPowerSupply = 0x0000000a, + MinorProcessor = 0x00000008, + MinorReconfig = 0x00000004, + MinorSecurity = 0x00000013, + MinorSecurityFix = 0x00000012, + MinorSecurityFixUninstall = 0x00000018, + MinorServicePack = 0x00000010, + MinorServicePackUninstall = 0x00000016, + MinorTermSrv = 0x00000020, + MinorUnstable = 0x00000006, + MinorUpgrade = 0x00000003, + MinorWMI = 0x00000015, + + FlagUserDefined = 0x40000000, + //FlagPlanned = 0x80000000, + } + + [Flags] + public enum ExitWindows + { + // ONE of the following five: + LogOff = 0x00, + ShutDown = 0x01, + Reboot = 0x02, + PowerOff = 0x08, + RestartApps = 0x40, + // Optionally include ONE of the following two: + Force = 0x04, + ForceIfHung = 0x10, + } + #endregion Enumerations + #region Structures + + [StructLayout(LayoutKind.Sequential)] + public struct COPYDATASTRUCT + { + public int dwData; + public int cbData; + public int lpData; + } + + #endregion Structures + + #region Delegates + + public delegate bool EnumWindowsProc(IntPtr hWnd, int lParam); + + #endregion Delegates + #region Interop [DllImport("user32.dll")] + public static extern int EnumWindows(EnumWindowsProc ewp, int lParam); + + [DllImport("user32.dll")] public static extern IntPtr GetForegroundWindow(); [DllImport("user32.dll")] [return: MarshalAs(UnmanagedType.Bool)] public static extern bool SetForegroundWindow(IntPtr hWnd); - [Flags] - public enum SendMessageTimeoutFlags : int - { - SMTO_NORMAL = 0x0000, - SMTO_BLOCK = 0x0001, - SMTO_ABORTIFHUNG = 0x0002, - SMTO_NOTIMEOUTIFNOTHUNG = 0x0008, - } + [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)] + static extern int GetWindowTextLength(IntPtr hWnd); + [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] + static extern int GetWindowText(IntPtr hWnd, StringBuilder lpString, int nMaxCount); + [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)] public static extern IntPtr SendMessageTimeout( - IntPtr windowHandle, + IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam, @@ -273,10 +399,14 @@ //[DllImport("user32.dll", SetLastError = false)] //public static extern IntPtr SendMessage(IntPtr windowHandle, int msg, IntPtr wordParam, IntPtr longParam); - [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)] - public static extern int RegisterWindowMessage(string lpString); + //[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)] + //public static extern int RegisterWindowMessage(string lpString); [DllImport("user32.dll", SetLastError = true)] + [return: MarshalAs(UnmanagedType.Bool)] + public static extern bool ExitWindowsEx(ExitWindows uFlags, ShutdownReason dwReason); + + [DllImport("user32.dll", SetLastError = true)] public static extern IntPtr FindWindow(string lpClassName, string lpWindowName); [DllImport("user32.dll", SetLastError = true)] @@ -314,6 +444,17 @@ #region Methods + public static string GetWindowTitle(IntPtr hWnd) + { + int length = GetWindowTextLength(hWnd); + + StringBuilder windowTitle = new StringBuilder(length + 1); + + GetWindowText(hWnd, windowTitle, windowTitle.Capacity); + + return windowTitle.ToString(); + } + /// <summary> /// Given a 32-bit integer this method returns the High Word (upper 16 bits). /// </summary> @@ -387,6 +528,46 @@ } } + /// <summary> + /// Get an IntPtr pointing to any object. + /// </summary> + /// <param name="o">Object to get pointer for.</param> + /// <returns>Pointer to object.</returns> + public static IntPtr VarPtr(object o) + { + GCHandle handle = GCHandle.Alloc(o, GCHandleType.Pinned); + IntPtr ptr = handle.AddrOfPinnedObject(); + handle.Free(); + return ptr; + } + + /* + public static void ActivateWindowByHandle(IntPtr hWnd) + { + WindowPlacement windowPlacement; + GetWindowPlacement(hWnd, out windowPlacement); + + switch (windowPlacement.showCmd) + { + case SW_HIDE: //Window is hidden + ShowWindow(hWnd, SW_RESTORE); + break; + case SW_SHOWMINIMIZED: //Window is minimized + // if the window is minimized, then we need to restore it to its + // previous size. we also take into account whether it was + // previously maximized. + int showCmd = (windowPlacement.flags == WPF_RESTORETOMAXIMIZED) ? SW_SHOWMAXIMIZED : SW_SHOWNORMAL; + ShowWindow(hWnd, showCmd); + break; + default: + // if it's not minimized, then we just call SetForegroundWindow to + // bring it to the front. + SetForegroundWindow(hWnd); + break; + } + } + */ + #endregion Methods } Modified: trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/MceIrApi.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/MceIrApi.cs 2007-08-03 11:33:59 UTC (rev 787) +++ trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/MceIrApi.cs 2007-08-03 16:49:07 UTC (rev 788) @@ -16,74 +16,72 @@ #region Constants - public const int ID_MCEIR_KEYCODE = 0x37FF0; + const int ID_MCEIR_KEYCODE = 0x37FF0; #endregion #region Enumerations /// <summary> - /// The blaster port to send IR codes to + /// The blaster port to send IR codes to. /// </summary> public enum BlasterPort { /// <summary> - /// Send IR codes to both blaster ports + /// Send IR codes to both blaster ports. /// </summary> Both = 0, /// <summary> - /// Send IR codes to blaster port 1 only + /// Send IR codes to blaster port 1 only. /// </summary> Port_1 = 1, /// <summary> - /// Send IR codes to blaster port 2 only + /// Send IR codes to blaster port 2 only. /// </summary> Port_2 = 2 } /// <summary> - /// Type of blaster in use + /// Type of blaster in use. /// </summary> public enum BlasterType { /// <summary> - /// Device is a first party Microsoft MCE transceiver + /// Device is a first party Microsoft MCE transceiver. /// </summary> Microsoft = 0, /// <summary> - /// Device is an third party SMK MCE transceiver + /// Device is an third party SMK MCE transceiver. /// </summary> SMK = 1 } /// <summary> - /// Speed to transmit IR codes at + /// Speed to transmit IR codes at. /// </summary> public enum BlasterSpeed { /// <summa... [truncated message content] |
From: <che...@us...> - 2007-08-03 11:34:01
|
Revision: 787 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=787&view=rev Author: chef_koch Date: 2007-08-03 04:33:59 -0700 (Fri, 03 Aug 2007) Log Message: ----------- first change to use a new tabPage for GlobalSettings instead of using AppSettingsBase, improvements to this and a fix for the msgBox will follow this weekend Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs Removed Paths: ------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.resx Deleted: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.Designer.cs 2007-08-03 08:07:10 UTC (rev 786) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.Designer.cs 2007-08-03 11:33:59 UTC (rev 787) @@ -1,139 +0,0 @@ -namespace GUIPrograms.Design -{ - partial class AppSettingsRoot - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { - this.button1 = new System.Windows.Forms.Button(); - this.SuspendLayout(); - // - // enabledCheckbox - // - this.toolTip.SetToolTip(this.enabledCheckbox, "Only enabled items will appear in MediaPortal"); - // - // titleLabel - // - this.titleLabel.Size = new System.Drawing.Size(92, 20); - // - // titleTextBox - // - this.toolTip.SetToolTip(this.titleTextBox, "This text will appear in the listitem of MediaPortal\r\n(mandatory)"); - // - // applicationExeButton - // - this.applicationExeButton.Location = new System.Drawing.Point(359, 70); - // - // shellexecuteCheckBox - // - this.toolTip.SetToolTip(this.shellexecuteCheckBox, "Enable this if you want to run a program that is associated with a specific file-" + - "extension.\r\nYou can omit the \"Launching Application\" in this case."); - // - // applicationArgumentsLabel - // - this.toolTip.SetToolTip(this.applicationArgumentsLabel, "Optional arguments that are needed to launch the program \r\n\r\n(advanced hint: Use " + - "%FILE% if the filename needs to be placed in some specific place between several" + - " arguments)"); - // - // applicationImageTextBox - // - this.toolTip.SetToolTip(this.applicationImageTextBox, "Optional filename for an image to display in MediaPortal"); - // - // winStyleComboBox - // - this.toolTip.SetToolTip(this.winStyleComboBox, "Appearance of the launched program. \r\nTry HIDDEN or MINIMIZED for a seamless inte" + - "gration in MediaPortal"); - // - // startupDirTextBox - // - this.toolTip.SetToolTip(this.startupDirComboBox, "Optional path that is passed as the launch-directory \r\n\r\n(advanced hint: Use %FIL" + - "EDIR% if you want to use the directory where the launched file is stored)"); - // - // quoteCheckBox - // - this.toolTip.SetToolTip(this.quoteCheckBox, "Quotes are usually needed to handle filenames with spaces correctly. \r\nAvoid doub" + - "le quotes though!"); - // - // applicationImageButton - // - this.applicationImageButton.Location = new System.Drawing.Point(356, 97); - // - // allowRefreshCheckBox - // - this.toolTip.SetToolTip(this.allowRefreshCheckBox, "Check this if users can run the import through the REFRESH button in MediaPortal." + - ""); - // - // button1 - // - this.button1.Location = new System.Drawing.Point(427, 43); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(44, 23); - this.button1.TabIndex = 32; - this.button1.Text = "Reset"; - this.button1.UseVisualStyleBackColor = true; - this.button1.Click += new System.EventHandler(this.button1_Click); - // - // AppSettingsRoot - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.button1); - this.Name = "AppSettingsRoot"; - this.Load += new System.EventHandler(this.AppSettingsRoot_Load); - this.Controls.SetChildIndex(this.button1, 0); - this.Controls.SetChildIndex(this.prePostButton, 0); - this.Controls.SetChildIndex(this.applicationImageButton, 0); - this.Controls.SetChildIndex(this.applicationExeButton, 0); - this.Controls.SetChildIndex(this.winTypeLabel, 0); - this.Controls.SetChildIndex(this.enabledCheckbox, 0); - this.Controls.SetChildIndex(this.titleLabel, 0); - this.Controls.SetChildIndex(this.applicationExeLabel, 0); - this.Controls.SetChildIndex(this.shellexecuteCheckBox, 0); - this.Controls.SetChildIndex(this.waitExitCheckBox, 0); - this.Controls.SetChildIndex(this.applicationExeTextBox, 0); - this.Controls.SetChildIndex(this.applicationImageLabel, 0); - this.Controls.SetChildIndex(this.applicationArgumentsLabel, 0); - this.Controls.SetChildIndex(this.applicationImageTextBox, 0); - this.Controls.SetChildIndex(this.applicationArgumentsTextBox, 0); - this.Controls.SetChildIndex(this.winStyleLabel, 0); - this.Controls.SetChildIndex(this.winStyleComboBox, 0); - this.Controls.SetChildIndex(this.startupDirComboBox, 0); - this.Controls.SetChildIndex(this.startupDirLabel, 0); - this.Controls.SetChildIndex(this.quoteCheckBox, 0); - this.Controls.SetChildIndex(this.startupDirButton, 0); - this.Controls.SetChildIndex(this.allowRefreshCheckBox, 0); - this.Controls.SetChildIndex(this.informationLabel, 0); - this.Controls.SetChildIndex(this.titleTextBox, 0); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Button button1; - } -} \ No newline at end of file Deleted: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.cs 2007-08-03 08:07:10 UTC (rev 786) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.cs 2007-08-03 11:33:59 UTC (rev 787) @@ -1,121 +0,0 @@ -#region Copyright (C) 2005-2007 Team MediaPortal - -/* - * Copyright (C) 2005-2007 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.ComponentModel; -using System.Data; -using System.Drawing; -using System.Text; -using System.Windows.Forms; - -using GUIPrograms; -using GUIPrograms.Items; -using GUIPrograms.Database; - -namespace GUIPrograms.Design -{ - public partial class AppSettingsRoot : AppSettingsBase - { - bool Loaded = false; - - public AppSettingsRoot() - { - InitializeComponent(); - } - - private void AppSettingsRoot_Load(object sender, EventArgs e) - { - AppItemToForm(null); - Loaded = true; - - enabledCheckbox.Visible = false; - winTypeLabel.Text = "my Programs Alt."; - titleLabel.Text = "Plugin title"; - titleTextBox.Text = " My Programs Alt."; - - applicationExeLabel.Visible = false; - applicationExeTextBox.Visible = false; - applicationExeButton.Visible = false; - - applicationImageLabel.Visible = false; - applicationImageTextBox.Visible = false; - applicationImageButton.Visible = false; - - applicationArgumentsTextBox.Visible = false; - applicationArgumentsLabel.Visible = false; - - winStyleLabel.Visible = false; - winStyleComboBox.Visible = false; - - startupDirButton.Visible = false; - startupDirLabel.Visible = false; - startupDirComboBox.Visible = false; - - - quoteCheckBox.Visible = false; - allowRefreshCheckBox.Visible = false; - waitExitCheckBox.Visible = false; - shellexecuteCheckBox.Visible = false; - informationLabel.Visible = false; - - this.prePostButton.Visible = false; - - } - - public override bool AppItemToForm(ApplicationItem curApp) - { - base.AppItemToForm(curApp); - titleTextBox.Text = DatabaseHandler.ReadSetting(ProgramUtils.cPLUGINTITLE); - if (titleTextBox.Text == "") - { - // PluginTitle.Text = GUILocalizeStrings.Get(0); - titleTextBox.Text = "My Programs Alt."; - } - return true; - } - - public override void FormToAppItem(ApplicationItem curApp) - { - // currentApplication is null! - if (Loaded) - { - if ((titleTextBox.Text != "")) - { - DatabaseHandler.WriteSetting(ProgramUtils.cPLUGINTITLE, titleTextBox.Text); - } - else - { - DatabaseHandler.DeleteSetting(ProgramUtils.cPLUGINTITLE); - } - } - } - - private void button1_Click(object sender, EventArgs e) - { - titleTextBox.Text = "My Programs Alt."; - } - } -} \ No newline at end of file Deleted: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.resx =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.resx 2007-08-03 08:07:10 UTC (rev 786) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.resx 2007-08-03 11:33:59 UTC (rev 787) @@ -1,129 +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> - <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>313, 17</value> - </metadata> - <metadata name="folderBrowserDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>150, 17</value> - </metadata> - <metadata name="openFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>17, 17</value> - </metadata> -</root> \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.Designer.cs 2007-08-03 08:07:10 UTC (rev 786) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.Designer.cs 2007-08-03 11:33:59 UTC (rev 787) @@ -28,440 +28,514 @@ /// </summary> private void InitializeComponent() { - System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode( "Applications" ); - this.menuStrip = new System.Windows.Forms.MenuStrip(); - this.addDeleteApplicationsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.addApplicationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.applicationWithFiledirectoryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.addGroupnodeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.extendedApplicationItemToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.mameImportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.importGamebaseItemToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.deleteApplicationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolsStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.premadeConfigurationsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.emulatorSetupToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.treeView = new System.Windows.Forms.TreeView(); - this.tabControl = new System.Windows.Forms.TabControl(); - this.detailsTabPage = new System.Windows.Forms.TabPage(); - this.directoryTabPage = new System.Windows.Forms.TabPage(); - this.viewTabPage = new System.Windows.Forms.TabPage(); - this.dbOptionsTabPage = new System.Windows.Forms.TabPage(); - this.generalFileItemOptionsGroupBox = new System.Windows.Forms.GroupBox(); - this.removePlatformComboBox = new System.Windows.Forms.ComboBox(); - this.removePlatformLabel = new System.Windows.Forms.Label(); - this.removePlatformButton = new System.Windows.Forms.Button(); - this.addPlatformLabel = new System.Windows.Forms.Label(); - this.addPlatformTextBox = new System.Windows.Forms.TextBox(); - this.addPlatformButton = new System.Windows.Forms.Button(); - this.removeManufacturerComboBox = new System.Windows.Forms.ComboBox(); - this.removeManufacturerLabel = new System.Windows.Forms.Label(); - this.removeManufacturerButton = new System.Windows.Forms.Button(); - this.addManufacturerLabel = new System.Windows.Forms.Label(); - this.addManufacturerTextBox = new System.Windows.Forms.TextBox(); - this.addManufacturerButton = new System.Windows.Forms.Button(); - this.removeGenreComboBox = new System.Windows.Forms.ComboBox(); - this.removeGenreLabel = new System.Windows.Forms.Label(); - this.removeGenreButton = new System.Windows.Forms.Button(); - this.addGenreLabel = new System.Windows.Forms.Label(); - this.addGenreTextBox = new System.Windows.Forms.TextBox(); - this.addGenreButton = new System.Windows.Forms.Button(); - this.menuStrip.SuspendLayout(); - this.tabControl.SuspendLayout(); - this.dbOptionsTabPage.SuspendLayout(); - this.generalFileItemOptionsGroupBox.SuspendLayout(); - this.SuspendLayout(); - // - // menuStrip - // - this.menuStrip.Items.AddRange( new System.Windows.Forms.ToolStripItem[] { + System.Windows.Forms.TreeNode treeNode3 = new System.Windows.Forms.TreeNode("Applications"); + this.menuStrip = new System.Windows.Forms.MenuStrip(); + this.addDeleteApplicationsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.addApplicationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.applicationWithFiledirectoryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.addGroupnodeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.extendedApplicationItemToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.mameImportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.importGamebaseItemToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.deleteApplicationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolsStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.premadeConfigurationsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.emulatorSetupToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.treeView = new System.Windows.Forms.TreeView(); + this.tabControl = new System.Windows.Forms.TabControl(); + this.detailsTabPage = new System.Windows.Forms.TabPage(); + this.directoryTabPage = new System.Windows.Forms.TabPage(); + this.settingsTabPage = new System.Windows.Forms.TabPage(); + this.button2 = new System.Windows.Forms.Button(); + this.titleTextBox = new System.Windows.Forms.TextBox(); + this.titleLabel = new System.Windows.Forms.Label(); + this.button1 = new System.Windows.Forms.Button(); + this.checkBoxUseThumbsDir = new System.Windows.Forms.CheckBox(); + this.viewTabPage = new System.Windows.Forms.TabPage(); + this.dbOptionsTabPage = new System.Windows.Forms.TabPage(); + this.generalFileItemOptionsGroupBox = new System.Windows.Forms.GroupBox(); + this.removePlatformComboBox = new System.Windows.Forms.ComboBox(); + this.removePlatformLabel = new System.Windows.Forms.Label(); + this.removePlatformButton = new System.Windows.Forms.Button(); + this.addPlatformLabel = new System.Windows.Forms.Label(); + this.addPlatformTextBox = new System.Windows.Forms.TextBox(); + this.addPlatformButton = new System.Windows.Forms.Button(); + this.removeManufacturerComboBox = new System.Windows.Forms.ComboBox(); + this.removeManufacturerLabel = new System.Windows.Forms.Label(); + this.removeManufacturerButton = new System.Windows.Forms.Button(); + this.addManufacturerLabel = new System.Windows.Forms.Label(); + this.addManufacturerTextBox = new System.Windows.Forms.TextBox(); + this.addManufacturerButton = new System.Windows.Forms.Button(); + this.removeGenreComboBox = new System.Windows.Forms.ComboBox(); + this.removeGenreLabel = new System.Windows.Forms.Label(); + this.removeGenreButton = new System.Windows.Forms.Button(); + this.addGenreLabel = new System.Windows.Forms.Label(); + this.addGenreTextBox = new System.Windows.Forms.TextBox(); + this.addGenreButton = new System.Windows.Forms.Button(); + this.menuStrip.SuspendLayout(); + this.tabControl.SuspendLayout(); + this.settingsTabPage.SuspendLayout(); + this.dbOptionsTabPage.SuspendLayout(); + this.generalFileItemOptionsGroupBox.SuspendLayout(); + this.SuspendLayout(); + // + // menuStrip + // + this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.addDeleteApplicationsToolStripMenuItem, - this.toolsStripMenuItem} ); - this.menuStrip.Location = new System.Drawing.Point( 0, 0 ); - this.menuStrip.Name = "menuStrip"; - this.menuStrip.RenderMode = System.Windows.Forms.ToolStripRenderMode.System; - this.menuStrip.Size = new System.Drawing.Size( 747, 24 ); - this.menuStrip.TabIndex = 0; - this.menuStrip.Text = "menuStrip"; - // - // addDeleteApplicationsToolStripMenuItem - // - this.addDeleteApplicationsToolStripMenuItem.DropDownItems.AddRange( new System.Windows.Forms.ToolStripItem[] { + this.toolsStripMenuItem}); + this.menuStrip.Location = new System.Drawing.Point(0, 0); + this.menuStrip.Name = "menuStrip"; + this.menuStrip.RenderMode = System.Windows.Forms.ToolStripRenderMode.System; + this.menuStrip.Size = new System.Drawing.Size(747, 24); + this.menuStrip.TabIndex = 0; + this.menuStrip.Text = "menuStrip"; + // + // addDeleteApplicationsToolStripMenuItem + // + this.addDeleteApplicationsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.addApplicationToolStripMenuItem, - this.deleteApplicationToolStripMenuItem} ); - this.addDeleteApplicationsToolStripMenuItem.Name = "addDeleteApplicationsToolStripMenuItem"; - this.addDeleteApplicationsToolStripMenuItem.Size = new System.Drawing.Size( 132, 20 ); - this.addDeleteApplicationsToolStripMenuItem.Text = "Add/Delete applications"; - // - // addApplicationToolStripMenuItem - // - this.addApplicationToolStripMenuItem.DropDownItems.AddRange( new System.Windows.Forms.ToolStripItem[] { + this.deleteApplicationToolStripMenuItem}); + this.addDeleteApplicationsToolStripMenuItem.Name = "addDeleteApplicationsToolStripMenuItem"; + this.addDeleteApplicationsToolStripMenuItem.Size = new System.Drawing.Size(132, 20); + this.addDeleteApplicationsToolStripMenuItem.Text = "Add/Delete applications"; + // + // addApplicationToolStripMenuItem + // + this.addApplicationToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.applicationWithFiledirectoryToolStripMenuItem, this.addGroupnodeToolStripMenuItem, - this.extendedApplicationItemToolStripMenuItem} ); - this.addApplicationToolStripMenuItem.Name = "addApplicationToolStripMenuItem"; - this.addApplicationToolStripMenuItem.Size = new System.Drawing.Size( 170, 22 ); - this.addApplicationToolStripMenuItem.Text = "Add application"; - // - // applicationWithFiledirectoryToolStripMenuItem - // - this.applicationWithFiledirectoryToolStripMenuItem.Name = "applicationWithFiledirectoryToolStripMenuItem"; - this.applicationWithFiledirectoryToolStripMenuItem.Size = new System.Drawing.Size( 207, 22 ); - this.applicationWithFiledirectoryToolStripMenuItem.Text = "Applicationitem"; - this.applicationWithFiledirectoryToolStripMenuItem.Click += new System.EventHandler( this.applicationWithFiledirectoryToolStripMenuItem_Click ); - // - // addGroupnodeToolStripMenuItem - // - this.addGroupnodeToolStripMenuItem.Name = "addGroupnodeToolStripMenuItem"; - this.addGroupnodeToolStripMenuItem.Size = new System.Drawing.Size( 207, 22 ); - this.addGroupnodeToolStripMenuItem.Text = "Groupingtem"; - this.addGroupnodeToolStripMenuItem.Click += new System.EventHandler( this.addGroupnodeToolStripMenuItem_Click ); - // - // extendedApplicationItemToolStripMenuItem - // - this.extendedApplicationItemToolStripMenuItem.DropDownItems.AddRange( new System.Windows.Forms.ToolStripItem[] { + this.extendedApplicationItemToolStripMenuItem}); + this.addApplicationToolStripMenuItem.Name = "addApplicationToolStripMenuItem"; + this.addApplicationToolStripMenuItem.Size = new System.Drawing.Size(170, 22); + this.addApplicationToolStripMenuItem.Text = "Add application"; + // + // applicationWithFiledirectoryToolStripMenuItem + // + this.applicationWithFiledirectoryToolStripMenuItem.Name = "applicationWithFiledirectoryToolStripMenuItem"; + this.applicationWithFiledirectoryToolStripMenuItem.Size = new System.Drawing.Size(207, 22); + this.applicationWithFiledirectoryToolStripMenuItem.Text = "Applicationitem"; + this.applicationWithFiledirectoryToolStripMenuItem.Click += new System.EventHandler(this.applicationWithFiledirectoryToolStripMenuItem_Click); + // + // addGroupnodeToolStripMenuItem + // + this.addGroupnodeToolStripMenuItem.Name = "addGroupnodeToolStripMenuItem"; + this.addGroupnodeToolStripMenuItem.Size = new System.Drawing.Size(207, 22); + this.addGroupnodeToolStripMenuItem.Text = "Groupingtem"; + this.addGroupnodeToolStripMenuItem.Click += new System.EventHandler(this.addGroupnodeToolStripMenuItem_Click); + // + // extendedApplicationItemToolStripMenuItem + // + this.extendedApplicationItemToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.mameImportToolStripMenuItem, - this.importGamebaseItemToolStripMenuItem} ); - this.extendedApplicationItemToolStripMenuItem.Name = "extendedApplicationItemToolStripMenuItem"; - this.extendedApplicationItemToolStripMenuItem.Size = new System.Drawing.Size( 207, 22 ); - this.extendedApplicationItemToolStripMenuItem.Text = "Extended applicationItem"; - // - // mameImportToolStripMenuItem - // - this.mameImportToolStripMenuItem.Name = "mameImportToolStripMenuItem"; - this.mameImportToolStripMenuItem.Size = new System.Drawing.Size( 170, 22 ); - this.mameImportToolStripMenuItem.Text = "Import Mame"; - this.mameImportToolStripMenuItem.Click += new System.EventHandler( this.mameImportToolStripMenuItem_Click ); - // - // importGamebaseItemToolStripMenuItem - // - this.importGamebaseItemToolStripMenuItem.Name = "importGamebaseItemToolStripMenuItem"; - this.importGamebaseItemToolStripMenuItem.Size = new System.Drawing.Size( 170, 22 ); - this.importGamebaseItemToolStripMenuItem.Text = "Import Gamebase"; - this.importGamebaseItemToolStripMenuItem.Click += new System.EventHandler( this.importGamebaseItemToolStripMenuItem_Click ); - // - // deleteApplicationToolStripMenuItem - // - this.deleteApplicationToolStripMenuItem.Image = global::GUIPrograms.Properties.Resources.deleteButton_Image; - this.deleteApplicationToolStripMenuItem.Name = "deleteApplicationToolStripMenuItem"; - this.deleteApplicationToolStripMenuItem.Size = new System.Drawing.Size( 170, 22 ); - this.deleteApplicationToolStripMenuItem.Text = "Delete application"; - this.deleteApplicationToolStripMenuItem.Click += new System.EventHandler( this.deleteApplicationToolStripMenuItem_Click ); - // - // toolsStripMenuItem - // - this.toolsStripMenuItem.DropDownItems.AddRange( new System.Windows.Forms.ToolStripItem[] { - this.premadeConfigurationsToolStripMenuItem} ); - this.toolsStripMenuItem.Name = "toolsStripMenuItem"; - this.toolsStripMenuItem.Size = new System.Drawing.Size( 44, 20 ); - this.toolsStripMenuItem.Text = "Tools"; - // - // premadeConfigurationsToolStripMenuItem - // - this.premadeConfigurationsToolStripMenuItem.DropDownItems.AddRange( new System.Windows.Forms.ToolStripItem[] { - this.emulatorSetupToolStripMenuItem} ); - this.premadeConfigurationsToolStripMenuItem.Name = "premadeConfigurationsToolStripMenuItem"; - this.premadeConfigurationsToolStripMenuItem.Size = new System.Drawing.Size( 155, 22 ); - this.premadeConfigurationsToolStripMenuItem.Text = "Configurations"; - // - // emulatorSetupToolStripMenuItem - // - this.emulatorSetupToolStripMenuItem.Name = "emulatorSetupToolStripMenuItem"; - this.emulatorSetupToolStripMenuItem.Size = new System.Drawing.Size( 158, 22 ); - this.emulatorSetupToolStripMenuItem.Text = "Emulator Setup"; - // - // treeView - // - this.treeView.AllowDrop = true; - this.treeView.HideSelection = false; - this.treeView.HotTracking = true; - this.treeView.LabelEdit = true; - this.treeView.Location = new System.Drawing.Point( 0, 27 ); - this.treeView.Name = "treeView"; - treeNode1.Name = "applicationNode"; - treeNode1.Text = "Applications"; - this.treeView.Nodes.AddRange( new System.Windows.Forms.TreeNode[] { - treeNode1} ); - this.treeView.Size = new System.Drawing.Size( 224, 576 ); - this.treeView.TabIndex = 8; - this.treeView.DragDrop += new System.Windows.Forms.DragEventHandler( this.treeView_DragDrop ); - this.treeView.DragOver += new System.Windows.Forms.DragEventHandler( this.treeView_DragOver ); - this.treeView.AfterLabelEdit += new System.Windows.Forms.NodeLabelEditEventHandler( this.treeView_AfterLabelEdit ); - this.treeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler( this.treeView_AfterSelect ); - this.treeView.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler( this.treeView_NodeMouseClick ); - this.treeView.DragEnter += new System.Windows.Forms.DragEventHandler( this.treeView_DragEnter ); - this.treeView.BeforeLabelEdit += new System.Windows.Forms.NodeLabelEditEventHandler( this.treeView_BeforeLabelEdit ); - this.treeView.BeforeSelect += new System.Windows.Forms.TreeViewCancelEventHandler( this.treeView_BeforeSelect ); - this.treeView.ItemDrag += new System.Windows.Forms.ItemDragEventHandler( this.treeView_ItemDrag ); - // - // tabControl - // - this.tabControl.Controls.Add( this.detailsTabPage ); - this.tabControl.Controls.Add( this.directoryTabPage ); - this.tabControl.Controls.Add( this.viewTabPage ); - this.tabControl.Controls.Add( this.dbOptionsTabPage ); - this.tabControl.Location = new System.Drawing.Point( 230, 27 ); - this.tabControl.Name = "tabControl"; - this.tabControl.SelectedIndex = 0; - this.tabControl.ShowToolTips = true; - this.tabControl.Size = new System.Drawing.Size( 505, 577 ); - this.tabControl.TabIndex = 2; - this.tabControl.Click += new System.EventHandler( this.dbOptionsTabPage_Click ); - this.tabControl.SelectedIndexChanged += new System.EventHandler( this.tabControl_SelectedIndexChanged ); - // - // detailsTabPage - // - this.detailsTabPage.BackColor = System.Drawing.SystemColors.Control; - this.detailsTabPage.Location = new System.Drawing.Point( 4, 22 ); - this.detailsTabPage.Name = "detailsTabPage"; - this.detailsTabPage.Padding = new System.Windows.Forms.Padding( 3 ); - this.detailsTabPage.Size = new System.Drawing.Size( 497, 551 ); - this.detailsTabPage.TabIndex = 0; - this.detailsTabPage.Text = "Details"; - // - // directoryTabPage - // - this.directoryTabPage.BackColor = System.Drawing.SystemColors.Control; - this.directoryTabPage.Location = new System.Drawing.Point( 4, 22 ); - this.directoryTabPage.Name = "directoryTabPage"; - this.directoryTabPage.Padding = new System.Windows.Forms.Padding( 3 ); - this.directoryTabPage.Size = new System.Drawing.Size( 497, 551 ); - this.directoryTabPage.TabIndex = 1; - this.directoryTabPage.Text = "Files"; - // - // viewTabPage - // - this.viewTabPage.BackColor = System.Drawing.SystemColors.Control; - this.viewTabPage.Location = new System.Drawing.Point( 4, 22 ); - this.viewTabPage.Name = "viewTabPage"; - this.viewTabPage.Padding = new System.Windows.Forms.Padding( 3 ); - this.viewTabPage.Size = new System.Drawing.Size( 497, 551 ); - this.viewTabPage.TabIndex = 2; - this.viewTabPage.Text = "Views"; - // - // dbOptionsTabPage - // - this.dbOptionsTabPage.Controls.Add( this.generalFileItemOptionsGroupBox ); - this.dbOptionsTabPage.Location = new System.Drawing.Point( 4, 22 ); - this.dbOptionsTabPage.Name = "dbOptionsTabPage"; - this.dbOptionsTabPage.Padding = new System.Windows.Forms.Padding( 3 ); - this.dbOptionsTabPage.Size = new System.Drawing.Size( 497, 551 ); - this.dbOptionsTabPage.TabIndex = 3; - this.dbOptionsTabPage.Text = "DB options"; - this.dbOptionsTabPage.UseVisualStyleBackColor = true; - this.dbOptionsTabPage.Click += new System.EventHandler( this.dbOptionsTabPage_Click ); - // - // generalFileItemOptionsGroupBox - // - this.generalFileItemOptionsGroupBox.Controls.Add( this.removePlatformComboBox ); - this.generalFileItemOptionsGroupBox.Controls.Add( this.removePlatformLabel ); - this.generalFileItemOptionsGroupBox.Controls.Add( this.removePlatformButton ); - this.generalFileItemOptionsGroupBox.Controls.Add( this.addPlatformLabel ); - this.generalFileItemOptionsGroupBox.Controls.Add( this.addPlatformTextBox ); - this.generalFileItemOptionsGroupBox.Controls.Add( this.addPlatformButton ); - this.generalFileItemOptionsGroupBox.Controls.Add( this.removeManufacturerComboBox ); - this.generalFileItemOptionsGroupBox.Controls.Add( this.removeManufacturerLabel ); - this.generalFileItemOptionsGroupBox.Controls.Add( this.removeManufacturerButton ); - this.generalFileItemOptionsGroupBox.Controls.Add( this.addManufacturerLabel ); - this.generalFileItemOptionsGroupBox.Controls.Add( this.addManufacturerTextBox ); - this.generalFileItemOptionsGroupBox.Controls.Add( this.addManufacturerButton ); - this.generalFileItemOptionsGroupBox.Controls.Add( this.removeGenreComboBox ); - this.generalFileItemOptionsGroupBox.Controls.Add( this.removeGenreLabel ); - this.generalFileItemOptionsGroupBox.Controls.Add( this.removeGenreButton ); - this.generalFileItemOptionsGroupBox.Controls.Add( this.addGenreLabel ); - this.generalFileItemOptionsGroupBox.Controls.Add( this.addGenreTextBox ); - this.generalFileItemOptionsGroupBox.Controls.Add( this.addGenreButton ); - this.generalFileItemOptionsGroupBox.Location = new System.Drawing.Point( 3, 6 ); - this.generalFileItemOptionsGroupBox.Name = "generalFileItemOptionsGroupBox"; - this.generalFileItemOptionsGroupBox.Size = new System.Drawing.Size( 488, 496 ); - this.generalFileItemOptionsGroupBox.TabIndex = 79; - this.generalFileItemOptionsGroupBox.TabStop = false; - // - // removePlatformComboBox - // - this.removePlatformComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.removePlatformComboBox.FormattingEnabled = true; - this.removePlatformComboBox.Location = new System.Drawing.Point( 99, 249 ); - this.removePlatformComboBox.Name = "removePlatformComboBox"; - this.removePlatformComboBox.Size = new System.Drawing.Size( 306, 21 ); - this.removePlatformComboBox.TabIndex = 92; - // - // removePlatformLabel - // - this.removePlatformLabel.AutoSize = true; - this.removePlatformLabel.Location = new System.Drawing.Point( 6, 252 ); - this.removePlatformLabel.Name = "removePlatformLabel"; - this.removePlatformLabel.Size = new System.Drawing.Size( 87, 13 ); - this.removePlatformLabel.TabIndex = 91; - this.removePlatformLabel.Text = "Remove platform"; - // - // removePlatformButton - // - this.removePlatformButton.Location = new System.Drawing.Point( 411, 249 ); - this.removePlatformButton.Name = "removePlatformButton"; - this.removePlatformButton.Size = new System.Drawing.Size( 62, 23 ); - this.removePlatformButton.TabIndex = 90; - this.removePlatformButton.Text = "Remove.."; - this.removePlatformButton.UseVisualStyleBackColor = true; - this.removePlatformButton.Click += new System.EventHandler( this.removePlatformButton_Click ); - // - // addPlatformLabel - // - this.addPlatformLabel.AutoSize = true; - this.addPlatformLabel.Location = new System.Drawing.Point( 6, 216 ); - this.addPlatformLabel.Name = "addPlatformLabel"; - this.addPlatformLabel.Size = new System.Drawing.Size( 72, 13 ); - this.addPlatformLabel.TabIndex = 87; - this.addPlatformLabel.Text = "Add platform.."; - // - // addPlatformTextBox - // - this.addPlatformTextBox.Location = new System.Drawing.Point( 99, 213 ); - this.addPlatformTextBox.Name = "addPlatformTextBox"; - this.addPlatformTextBox.Size = new System.Drawing.Size( 306, 20 ); - this.addPlatformTextBox.TabIndex = 88; - // - // addPlatformButton - // - this.addPlatformButton.Location = new System.Drawing.Point( 411, 213 ); - this.addPlatformButton.Name = "addPlatformButton"; - this.addPlatformButton.Size = new System.Drawing.Size( 62, 23 ); - this.addPlatformButton.TabIndex = 89; - this.addPlatformButton.Text = "Add.."; - this.addPlatformButton.UseVisualStyleBackColor = true; - this.addPlatformButton.Click += new System.EventHandler( this.addPlatformButton_Click ); - // - // removeManufacturerComboBox - // - this.removeManufacturerComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.removeManufacturerComboBox.FormattingEnabled = true; - this.removeManufacturerComboBox.Location = new System.Drawing.Point( 99, 165 ); - this.removeManufacturerComboBox.Name = "removeManufacturerComboBox"; - this.removeManufacturerComboBox.Size = new System.Drawing.Size( 306, 21 ); - this.removeManufacturerComboBox.TabIndex = 86; - // - // removeManufacturerLabel - // - this.removeManufacturerLabel.Location = new System.Drawing.Point( 6, 157 ); - this.removeManufacturerLabel.Name = "removeManufacturerLabel"; - this.removeManufacturerLabel.Size = new System.Drawing.Size( 82, 29 ); - this.removeManufacturerLabel.TabIndex = 85; - this.removeManufacturerLabel.Text = "Remove Manufacturer"; - // - // removeManufacturerButton - // - this.removeManufacturerButton.Location = new System.Drawing.Point( 411, 165 ); - this.removeManufacturerButton.Name = "removeManufacturerButton"; - this.removeManufacturerButton.Size = new System.Drawing.Size( 62, 23 ); - this.removeManufacturerButton.TabIndex = 84; - this.removeManufacturerButton.Text = "Remove.."; - this.removeManufacturerButton.UseVisualStyleBackColor = true; - this.removeManufacturerButton.Click += new System.EventHandler( this.removeManufacturerButton_Click ); - // - // addManufacturerLabel - // - this.addManufacturerLabel.Location = new System.Drawing.Point( 6, 121 ); - this.addManufacturerLabel.Name = "addManufacturerLabel"; - this.addManufacturerLabel.Size = new System.Drawing.Size( 82, 36 ); - this.addManufacturerLabel.TabIndex = 81; - this.addManufacturerLabel.Text = "Add Manufacturer.."; - // - // addManufacturerTextBox - // - this.addManufacturerTextBox.Location = new System.Drawing.Point( 99, 129 ); - this.addManufacturerTextBox.Name = "addManufacturerTextBox"; - this.addManufacturerTextBox.Size = new System.Drawing.Size( 306, 20 ); - this.addManufacturerTextBox.TabIndex = 82; - // - // addManufacturerButton - // - this.addManufacturerButton.Location = new System.Drawing.Point( 411, 129 ); - this.addManufacturerButton.Name = "addManufacturerButton"; - this.addManufacturerButton.Size = new System.Drawing.Size( 62, 23 ); - this.addManufacturerButton.TabIndex = 83; - this.addManufacturerButton.Text = "Add.."; - this.addManufacturerButton.UseVisualStyleBackColor = true; - this.addManufacturerButton.Click += new System.EventHandler( this.addManufacturerButton_Click ); - // - // removeGenreComboBox - // - this.removeGenreComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.removeGenreComboBox.FormattingEnabled = true; - this.removeGenreComboBox.Location = new System.Drawing.Point( 99, 70 ); - this.removeGenreComboBox.Name = "removeGenreComboBox"; - this.removeGenreComboBox.Size = new System.Drawing.Size( 306, 21 ); - this.removeGenreComboBox.TabIndex = 80; - // - // removeGenreLabel - // - this.removeGenreLabel.AutoSize = true; - this.removeGenreLabel.Location = new System.Drawing.Point( 6, 73 ); - this.removeGenreLabel.Name = "removeGenreLabel"; - this.removeGenreLabel.Size = new System.Drawing.Size( 77, 13 ); - this.removeGenreLabel.TabIndex = 79; - this.removeGenreLabel.Text = "Remove genre"; - // - // removeGenreButton - // - this.removeGenreButton.Location = new System.Drawing.Point( 411, 70 ); - this.removeGenreButton.Name = "removeGenreButton"; - this.removeGenreButton.Size = new System.Drawing.Size( 62, 23 ); - this.removeGenreButton.TabIndex = 78; - this.removeGenreButton.Text = "Remove.."; - this.removeGenreButton.UseVisualStyleBackColor = true; - this.removeGenreButton.Click += new System.EventHandler( this.removeGenreButton_Click ); - // - // addGenreLabel - // - this.addGenreLabel.AutoSize = true; - this.addGenreLabel.Location = new System.Drawing.Point( 6, 37 ); - this.addGenreLabel.Name = "addGenreLabel"; - this.addGenreLabel.Size = new System.Drawing.Size( 62, 13 ); - this.addGenreLabel.TabIndex = 74; - this.addGenreLabel.Text = "Add genre.."; - // - // addGenreTextBox - // - this.addGenreTextBox.Location = new System.Drawing.Point( 99, 34 ); - this.addGenreTextBox.Name = "addGenreTextBox"; - this.addGenreTextBox.Size = new System.Drawing.Size( 306, 20 ); - this.addGenreTextBox.TabIndex = 75; - // - // addGenreButton - // - this.addGenreButton.Location = new System.Drawing.Point( 411, 34 ); - this.addGenreButton.Name = "addGenreButton"; - this.addGenreButton.Size = new System.Drawing.Size( 62, 23 ); - this.addGenreButton.TabIndex = 76; - this.addGenreButton.Text = "Add.."; - this.addGenreButton.UseVisualStyleBackColor = true; - this.addGenreButton.Click += new System.EventHandler( this.addGenreButton_Click ); - // - // SetupForm - // - this.AutoScaleDimensions = new System.Drawing.SizeF( 6F, 13F ); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size( 747, 609 ); - this.Controls.Add( this.tabControl ); - this.Controls.Add( this.treeView ); - this.Controls.Add( this.menuStrip ); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; - this.MainMenuStrip = this.menuStrip; - this.Name = "SetupForm"; - this.ShowIcon = false; - this.ShowInTaskbar = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "SetupForm"; - this.FormClosed += new System.Windows.Forms.FormClosedEventHandler( this.SetupForm_FormClosed ); - this.Load += new System.EventHandler( this.SetupForm_Load ); - this.menuStrip.ResumeLayout( false ); - this.menuStrip.PerformLayout(); - this.tabControl.ResumeLayout( false ); - this.dbOptionsTabPage.ResumeLayout( false ); - this.generalFileItemOptionsGroupBox.ResumeLayout( false ); - this.generalFileItemOptionsGroupBox.PerformLayout(); - this.ResumeLayout( false ); - this.PerformLayout(); + this.importGamebaseItemToolStripMenuItem}); + this.extendedApplicationItemToolStripMenuItem.Name = "extendedApplicationItemToolStripMenuItem"; + this.extendedApplicationItemToolStripMenuItem.Size = new System.Drawing.Size(207, 22); + this.extendedApplicationItemToolStripMenuItem.Text = "Extended applicationItem"; + // + // mameImportToolStripMenuItem + // + this.mameImportToolStripMenuItem.Name = "mameImportToolStripMenuItem"; + this.mameImportToolStripMenuItem.Size = new System.Drawing.Size(170, 22); + this.mameImportToolStripMenuItem.Text = "Import Mame"; + this.mameImportToolStripMenuItem.Click += new System.EventHandler(this.mameImportToolStripMenuItem_Click); + // + // importGamebaseItemToolStripMenuItem + // + this.importGamebaseItemToolStripMenuItem.Name = "importGamebaseItemToolStripMenuItem"; + this.importGamebaseItemToolStripMenuItem.Size = new System.Drawing.Size(170, 22); + this.importGamebaseItemToolStripMenuItem.Text = "Import Gamebase"; + this.importGamebaseItemToolStripMenuItem.Click += new System.EventHandler(this.importGamebaseItemToolStripMenuItem_Click); + // + // deleteApplicationToolStripMenuItem + // + this.deleteApplicationToolStripMenuItem.Image = global::GUIPrograms.Properties.Resources.deleteButton_Image; + this.deleteApplicationToolStripMenuItem.Name = "deleteApplicationToolStripMenuItem"; + this.deleteApplicationToolStripMenuItem.Size = new System.Drawing.Size(170, 22); + this.deleteApplicationToolStripMenuItem.Text = "Delete application"; + this.deleteApplicationToolStripMenuItem.Click += new System.EventHandler(this.deleteApplicationToolStripMenuItem_Click); + // + // toolsStripMenuItem + // + this.toolsStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.premadeConfigurationsToolStripMenuItem}); + this.toolsStripMenuItem.Name = "toolsStripMenuItem"; + this.toolsStripMenuItem.Size = new System.Drawing.Size(44, 20); + this.toolsStripMenuItem.Text = "Tools"; + // + // premadeConfigurationsToolStripMenuItem + // + this.premadeConfigurationsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.emulatorSetupToolStripMenuItem}); + this.premadeConfigurationsToolStripMenuItem.Name = "premadeConfigurationsToolStripMenuItem"; + this.premadeConfigurationsToolStripMenuItem.Size = new System.Drawing.Size(155, 22); + this.premadeConfigurationsToolStripMenuItem.Text = "Configurations"; + // + // emulatorSetupToolStripMenuItem + // + this.emulatorSetupToolStripMenuItem.Name = "emulatorSetupToolStripMenuItem"; + this.emulatorSetupToolStripMenuItem.Size = new System.Drawing.Size(158, 22); + this.emulatorSetupToolStripMenuItem.Text = "Emulator Setup"; + // + // treeView + // + this.treeView.AllowDrop = true; + this.treeView.HideSelection = false; + this.treeView.HotTracking = true; + this.treeView.LabelEdit = true; + this.treeView.Location = new System.Drawing.Point(0, 27); + this.treeView.Name = "treeView"; + treeNode3.Name = "applicationNode"; + treeNode3.Text = "Applications"; + this.treeView.Nodes.AddRange(new System.Windows.Forms.TreeNode[] { + treeNode3}); + this.treeView.Size = new System.Drawing.Size(224, 576); + this.treeView.TabIndex = 8; + this.treeView.AfterLabelEdit += new System.Windows.Forms.NodeLabelEditEventHandler(this.treeView_AfterLabelEdit); + this.treeView.DragDrop += new System.Windows.Forms.DragEventHandler(this.treeView_DragDrop); + this.treeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView_AfterSelect); + this.treeView.DragEnter += new System.Windows.Forms.DragEventHandler(this.treeView_DragEnter); + this.treeView.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView_NodeMouseClick); + this.treeView.BeforeLabelEdit += new System.Windows.Forms.NodeLabelEditEventHandler(this.treeView_BeforeLabelEdit); + this.treeView.BeforeSelect += new System.Windows.Forms.TreeViewCancelEventHandler(this.treeView_BeforeSelect); + this.treeView.ItemDrag += new System.Windows.Forms.ItemDragEventHandler(this.treeView_ItemDrag); + this.treeView.DragOver += new System.Windows.Forms.DragEventHandler(this.treeView_DragOver); + // + // tabControl + // + this.tabControl.Controls.Add(this.detailsTabPage); + this.tabControl.Controls.Add(this.directoryTabPage); + this.tabControl.Controls.Add(this.settingsTabPage); + this.tabControl.Controls.Add(this.viewTabPage); + this.tabControl.Controls.Add(this.dbOptionsTabPage); + this.tabControl.Location = new System.Drawing.Point(230, 27); + this.tabControl.Name = "tabControl"; + this.tabControl.SelectedIndex = 0; + this.tabControl.ShowToolTips = true; + this.tabControl.Size = new System.Drawing.Size(505, 577); + this.tabControl.TabIndex = 2; + this.tabControl.Click += new System.EventHandler(this.dbOptionsTabPage_Click); + this.tabControl.SelectedIndexChanged += new System.EventHandler(this.tabControl_SelectedIndexChanged); + // + // detailsTabPage + // + this.detailsTabPage.BackColor = System.Drawing.Color.Transparent; + this.detailsTabPage.Location = new System.Drawing.Point(4, 22); + this.detailsTabPage.Name = "detailsTabPage"; + this.detailsTabPage.Padding = new System.Windows.Forms.Padding(3); + this.detailsTabPage.Size = new System.Drawing.Size(497, 551); + this.detailsTabPage.TabIndex = 0; + this.detailsTabPage.Text = "Details"; + this.detailsTabPage.UseVisualStyleBackColor = true; + // + // directoryTabPage + // + this.directoryTabPage.BackColor = System.Drawing.Color.Transparent; + this.directoryTabPage.Location = new System.Drawing.Point(4, 22); + this.directoryTabPage.Name = "directoryTabPage"; + this.directoryTabPage.Padding = new System.Windows.Forms.Padding(3); + this.directoryTabPage.Size = new System.Drawing.Size(497, 551); + this.directoryTabPage.TabIndex = 1; + this.directoryTabPage.Text = "Files"; + this.directoryTabPage.UseVisualStyleBackColor = true; + // + // settingsTabPage + // + this.settingsTabPage.Controls.Add(this.button2); + this.settingsTabPage.Controls.Add(this.titleTextBox); + this.settingsTabPage.Controls.Add(this.titleLabel); + this.settingsTabPage.Controls.Add(this.button1); + this.settingsTabPage.Controls.Add(this.checkBoxUseThumbsDir); + this.settingsTabPage.Location = new System.Drawing.Point(4, 22); + this.settingsTabPage.Name = "settingsTabPage"; + this.settingsTabPage.Size = new System.Drawing.Size(497, 551); + this.settingsTabPage.TabIndex = 4; + this.settingsTabPage.Text = "Settings"; + this.settingsTabPage.UseVisualStyleBackColor = true; + // + // button2 + // + this.button2.Location = new System.Drawing.Point(172, 230); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(75, 23); + this.button2.TabIndex = 42; + this.button2.Text = "save"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // titleTextBox + // + this.titleTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.titleTextBox.Location = new System.Drawing.Point(102, 34); + this.titleTextBox.Name = "titleTextBox"; + this.titleTextBox.Size = new System.Drawing.Size(325, 21); + this.titleTextBox.TabIndex = 41; + // + // titleLabel + // + this.titleLabel.Location = new System.Drawing.Point(11, 34); + this.titleLabel.Name = "titleLabel"; + this.titleLabel.Size = new System.Drawing.Size(93, 20); + this.titleLabel.TabIndex = 40; + this.titleLabel.Text = "Title:"; + this.titleLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // button1 + // + this.button1.Location = new System.Drawing.Point(433, 34); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(44, 23); + this.button1.TabIndex = 38; + this.button1.Text = "Reset"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // checkBoxUseThumbsDir + // + this.checkBoxUseThumbsDir.AutoSize = true; + this.checkBoxUseThumbsDir.Location = new System.Drawing.Point(14, 104); + this.checkBoxUseThumbsDir.Name = "checkBoxUseThumbsDir"; + this.checkBoxUseThumbsDir.Size = new System.Drawing.Size(129, 17); + this.checkBoxUseThumbsDir.TabIndex = 39; + this.checkBoxUseThumbsDir.Text = "usw thumbs directory"; + this.checkBoxUseThumbsDir.UseVisualStyleBackColor = true; + // + // viewTabPage + // + this.viewTabPage.BackColor = System.Drawing.Color.Transparent; + this.viewTabPage.Location = new System.Drawing.Point(4, 22); + this.viewTabPage.Name = "viewTabPage"; + this.viewTabPage.Padding = new System.Windows.Forms.Padding(3); + this.viewTabPage.Size = new System.Drawing.Size(497, 551); + this.viewTabPage.TabIndex = 2; + this.viewTabPage.Text = "Views"; + this.viewTabPage.UseVisualStyleBackColor = true; + // + // dbOptionsTabPage + // + this.dbOptionsTabPage.Controls.Add(this.generalFileItemOptionsGroupBox); + this.dbOptionsTabPage.Location = new System.Drawing.Point(4, 22); + this.dbOptionsTabPage.Name = "dbOptionsTabPage"; + this.dbOptionsTabPage.Padding = new System.Windows.Forms.Padding(3); + this.dbOptionsTabPage.Size = new System.Drawing.Size(497, 551); + this.dbOptionsTabPage.TabIndex = 3; + this.dbOptionsTabPage.Text = "DB options"; + this.dbOptionsTabPage.UseVisualStyleBackColor = true; + this.dbOptionsTabPage.Click += new System.EventHandler(this.dbOptionsTabPage_Click); + // + // generalFileItemOptionsGroupBox + // + this.generalFileItemOptionsGroupBox.Controls.Add(this.removePlatformComboBox); + this.generalFileItemOptionsGroupBox.Controls.Add(this.removePlatformLabel); + this.generalFileItemOptionsGroupBox.Controls.Add(this.removePlatformButton); + this.generalFileItemOptionsGroupBox.Controls.Add(this.addPlatformLabel); + this.generalFileItemOptionsGroupBox.Controls.Add(this.addPlatformTextBox); + this.generalFileItemOptionsGroupBox.Controls.Add(this.addPlatformButton); + this.generalFileItemOptionsGroupBox.Controls.Add(this.removeManufacturerComboBox); + this.generalFileItemOptionsGroupBox.Controls.Add(this.removeManufacturerLabel); + this.generalFileItemOptionsGroupBox.Controls.Add(this.removeManufacturerButton); + this.generalFileItemOptionsGroupBox.Controls.Add(this.addManufacturerLabel); + this.generalFileItemOptionsGroupBox.Controls.Add(this.addManufacturerTextBox); + this.generalFileItemOptionsGroupBox.Controls.Add(this.addManufacturerButton); + this.generalFileItemOptionsGroupBox.Controls.Add(this.removeGenreComboBox); + this.generalFileItemOptionsGroupBox.Controls.Add(this.removeGenreLabel); + this.generalFileItemOptionsGroupBox.Controls.Add(this.removeGenreButton); + this.generalFileItemOptionsGroupBox.Controls.Add(this.addGenreLabel); + this.generalFileItemOptionsGroupBox.Controls.Add(this.addGenreTextBox); + this.generalFileItemOptionsGroupBox.Controls.Add(this.addGenreButton); + this.generalFileItemOptionsGroupBox.Location = new System.Drawing.Point(3, 6); + this.generalFileItemOptionsGroupBox.Name = "generalFileItemOptionsGroupBox"; + this.generalFileItemOptionsGroupBox.Size = new System.Drawing.Size(488, 496); + this.generalFileItemOptionsGroupBox.TabIndex = 79; + this.generalFileItemOptionsGroupBox.TabStop = false; + // + // removePlatformComboBox + // + this.removePlatformComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.removePlatformComboBox.FormattingEnabled = true; + this.removePlatformComboBox.Location = new System.Drawing.Point(99, 249); + this.removePlatformComboBox.Name = "removePlatformComboBox"; + this.removePlatformComboBox.Size = new System.Drawing.Size(306, 21); + this.removePlatformComboBox.TabIndex ... [truncated message content] |
From: <nor...@us...> - 2007-08-03 08:07:23
|
Revision: 786 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=786&view=rev Author: northern_sky Date: 2007-08-03 01:07:10 -0700 (Fri, 03 Aug 2007) Log Message: ----------- replaced SystemDefault with mapping to PlatformId Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemFactory.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs trunk/plugins/myGUIProgramsAlt/README.txt Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs 2007-08-02 15:43:42 UTC (rev 785) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs 2007-08-03 08:07:10 UTC (rev 786) @@ -24,6 +24,7 @@ #endregion using System; + using System.Collections; using System.Collections.Generic; using System.IO; @@ -38,97 +39,97 @@ namespace GUIPrograms.Database { - /// <summary> - /// DBhandling methods - /// </summary> - public class DatabaseHandler - { + /// <summary> + /// DBhandling methods + /// </summary> + public class DatabaseHandler + { - private static SQLiteConnection sqlLiteConn = null; + private static SQLiteConnection sqlLiteConn = null; - static List<ApplicationItem> globalApplicationItemList = new List<ApplicationItem>(); - private const string DATABASEFILE = "myProgramsAltDatabaseV1.db3"; + static List<ApplicationItem> globalApplicationItemList = new List<ApplicationItem>(); + private const string DATABASEFILE = "myProgramsAltDatabaseV1.db3"; - public static bool useMPsThumbDirectory = false; + public static bool useMPsThumbDirectory = false; - // singleton. Dont allow any instance of this class - private DatabaseHandler() { } + // singleton. Dont allow any instance of this class + private DatabaseHandler() { } - static DatabaseHandler() - { - string DatabasePath = Config.GetFile( Config.Dir.Database, DATABASEFILE ); + static DatabaseHandler() + { + string DatabasePath = Config.GetFile(Config.Dir.Database, DATABASEFILE); - try - { + try + { - //check if database exists - if ( !File.Exists( DatabasePath ) ) - { - SQLiteConnection.CreateFile( Config.GetFile( Config.Dir.Database, DATABASEFILE ) ); - string connString = "Data Source=" + Config.GetFile( Config.Dir.Database, DATABASEFILE ); - sqlLiteConn = new SQLiteConnection( connString ); + //check if database exists + if (!File.Exists(DatabasePath)) + { + SQLiteConnection.CreateFile(DatabasePath); + string connString = "Data Source=" + Config.GetFile(Config.Dir.Database, DATABASEFILE); + sqlLiteConn = new SQLiteConnection(connString); - SetPragmas(); + SetPragmas(); - // make sure the DB-structure is complete - CreateDBTables(); + // make sure the DB-structure is complete + CreateDBTables(); - //fill upp some default lexicon values - InsertDefaultDBValues(); - } - else - { - string connString = "Data Source=" + Config.GetFile( Config.Dir.Database, DATABASEFILE ) + ";Version=3"; - sqlLiteConn = new SQLiteConnection( connString ); - } - //globalApplicationItemList = new ApplicationItemList(sqlDB, new ApplicationItem.FilelinkLaunchEventHandler(LaunchFilelink)); - LoadAllApplicationItems(); - } - catch ( SQLiteException ex ) - { - Log.Info( "programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace ); - } - } - static private void SetPragmas() - { - ExecuteStmtNonQuery( "PRAGMA default_cache_size=3000" ); - ExecuteStmtNonQuery( "PRAGMA count_changes=1" ); - ExecuteStmtNonQuery( "PRAGMA short_column_names=1" ); - ExecuteStmtNonQuery( "PRAGMA auto_vacuum=1" ); + //fill upp some default lexicon values + InsertDefaultDBValues(); + } + else + { + string connString = "Data Source=" + Config.GetFile(Config.Dir.Database, DATABASEFILE) + ";Version=3"; + sqlLiteConn = new SQLiteConnection(connString); + } + //globalApplicationItemList = new ApplicationItemList(sqlDB, new ApplicationItem.FilelinkLaunchEventHandler(LaunchFilelink)); + LoadAllApplicationItems(); + } + catch (SQLiteException ex) + { + Log.Info("programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + } + static private void SetPragmas() + { + ExecuteStmtNonQuery("PRAGMA default_cache_size=3000"); + ExecuteStmtNonQuery("PRAGMA count_changes=1"); + ExecuteStmtNonQuery("PRAGMA short_column_names=1"); + ExecuteStmtNonQuery("PRAGMA auto_vacuum=1"); - } + } - /*static void LaunchFilelink(FilelinkItem curLink, bool MPGUIMode) - { - ApplicationItem targetApp = globalApplicationItemList.GetAppByID(curLink.TargetAppID); - if (targetApp != null) - { - targetApp.LaunchFile(curLink, MPGUIMode); - } - }*/ + /*static void LaunchFilelink(FilelinkItem curLink, bool MPGUIMode) + { + ApplicationItem targetApp = globalApplicationItemList.GetAppByID(curLink.TargetAppID); + if (targetApp != null) + { + targetApp.LaunchFile(curLink, MPGUIMode); + } + }*/ - // we can always keep an connection open in sqllite.. - //to expensive closing it - public static SQLiteConnection SqlLiteConn - { - get - { - if ( sqlLiteConn.State == ConnectionState.Closed ) - { - sqlLiteConn.Open(); - } - return sqlLiteConn; - } - } + // we can always keep an connection open in sqllite.. + //to expensive closing it + public static SQLiteConnection SqlLiteConn + { + get + { + if (sqlLiteConn.State == ConnectionState.Closed) + { + sqlLiteConn.Open(); + } + return sqlLiteConn; + } + } - /// <summary> - /// Create db tables etc,if not already exist - /// </summary> - /// <returns></returns> - static bool CreateDBTables() - { - string sqlStmt = @"CREATE TABLE + /// <summary> + /// Create db tables etc,if not already exist + /// </summary> + /// <returns></returns> + static bool CreateDBTables() + { + string sqlStmt = @"CREATE TABLE tblApplicationItem ( applicationId INTEGER PRIMARY KEY, @@ -150,63 +151,63 @@ importValidImagesOnly BOOL, iposition INTEGER, refreshGUIAllowed BOOL, - systemdefault TEXT, + platformId INTEGER, waitForExit BOOL, preLaunch TEXT, postLaunch TEXT )"; - ExecuteStmtNonQuery( sqlStmt ); + ExecuteStmtNonQuery(sqlStmt); - sqlStmt = @"CREATE TABLE tblFileItem (fileid INTEGER PRIMARY KEY, applicationId INTEGER, title TEXT, filename TEXT, imagefile TEXT, mainGenreId INTEGER, subGenreId INTEGER, country TEXT, manufacturerId INTEGER, year INTEGER, rating INTEGER, overview TEXT, platformId INTEGER, lastTimeLaunched TEXT, launchcount INTEGER, categorydata TEXT, gameInfoUrl TEXT)"; - ExecuteStmtNonQuery( sqlStmt ); - sqlStmt = @"CREATE TABLE tblFilterItem (applicationId INTEGER, grouperAppID INTEGER, fileID INTEGER, filename TEXT, tag INTEGER)"; - ExecuteStmtNonQuery( sqlStmt ); - sqlStmt = @"CREATE TABLE tblSetting (settingid INTEGER PRIMARY KEY, key TEXT, value TEXT)"; - ExecuteStmtNonQuery( sqlStmt ); + sqlStmt = @"CREATE TABLE tblFileItem (fileid INTEGER PRIMARY KEY, applicationId INTEGER, title TEXT, filename TEXT, imagefile TEXT, mainGenreId INTEGER, subGenreId INTEGER, country TEXT, manufacturerId INTEGER, year INTEGER, rating INTEGER, overview TEXT, platformId INTEGER, lastTimeLaunched TEXT, launchcount INTEGER, categorydata TEXT, gameInfoUrl TEXT)"; + ExecuteStmtNonQuery(sqlStmt); + sqlStmt = @"CREATE TABLE tblFilterItem (applicationId INTEGER, grouperAppID INTEGER, fileID INTEGER, filename TEXT, tag INTEGER)"; + ExecuteStmtNonQuery(sqlStmt); + sqlStmt = @"CREATE TABLE tblSetting (settingid INTEGER PRIMARY KEY, key TEXT, value TEXT)"; + ExecuteStmtNonQuery(sqlStmt); - sqlStmt = @"CREATE TABLE + sqlStmt = @"CREATE TABLE tblGenre ( genreId INTEGER PRIMARY KEY, genre TEXT )"; - ExecuteStmtNonQuery( sqlStmt ); - sqlStmt = @"CREATE TABLE + ExecuteStmtNonQuery(sqlStmt); + sqlStmt = @"CREATE TABLE tblPlatform ( platformId INTEGER PRIMARY KEY, platform TEXT )"; - ExecuteStmtNonQuery( sqlStmt ); - sqlStmt = @"CREATE TABLE + ExecuteStmtNonQuery(sqlStmt); + sqlStmt = @"CREATE TABLE tblManufacturer ( manufacturerId INTEGER PRIMARY KEY, manufacturer TEXT )"; - ExecuteStmtNonQuery( sqlStmt ); + ExecuteStmtNonQuery(sqlStmt); - sqlStmt = @"CREATE INDEX idxFile1 ON tblFileItem(applicationId)"; - ExecuteStmtNonQuery( sqlStmt ); - sqlStmt = @"CREATE INDEX idxApp1 ON tblApplicationItem(fatherNodeId)"; - ExecuteStmtNonQuery( sqlStmt ); - sqlStmt = @"CREATE UNIQUE INDEX idxFilterItem1 ON tblFilterItem(applicationId, fileID, grouperAppID)"; - ExecuteStmtNonQuery( sqlStmt ); + sqlStmt = @"CREATE INDEX idxFile1 ON tblFileItem(applicationId)"; + ExecuteStmtNonQuery(sqlStmt); + sqlStmt = @"CREATE INDEX idxApp1 ON tblApplicationItem(fatherNodeId)"; + ExecuteStmtNonQuery(sqlStmt); + sqlStmt = @"CREATE UNIQUE INDEX idxFilterItem1 ON tblFilterItem(applicationId, fileID, grouperAppID)"; + ExecuteStmtNonQuery(sqlStmt); - return true; - } + return true; + } - /// <summary> - /// Inserting some default values so that the db is preloaded - /// Should always be there. - /// </summary> - private static void InsertDefaultDBValues() - { + /// <summary> + /// Inserting some default values so that the db is preloaded + /// Should always be there. + /// </summary> + private static void InsertDefaultDBValues() + { - string sqlStmt = @"INSERT INTO + string sqlStmt = @"INSERT INTO tblGenre ( genre @@ -216,9 +217,9 @@ 'Unknown' )"; - ExecuteStmtNonQuery( sqlStmt ); + ExecuteStmtNonQuery(sqlStmt); - sqlStmt = @"INSERT INTO + sqlStmt = @"INSERT INTO tblManufacturer ( manufacturer @@ -229,9 +230,9 @@ )"; - ExecuteStmtNonQuery( sqlStmt ); + ExecuteStmtNonQuery(sqlStmt); - sqlStmt = @"INSERT INTO + sqlStmt = @"INSERT INTO tblPlatform ( platform @@ -241,27 +242,27 @@ 'Unknown' )"; - ExecuteStmtNonQuery( sqlStmt ); + ExecuteStmtNonQuery(sqlStmt); - using ( SQLiteTransaction transaction = SqlLiteConn.BeginTransaction() ) - { - FillDefaultDBLexiconHelper( "tblPlatform", "platform", CreateSystemLexiconList() ); - FillDefaultDBLexiconHelper( "tblManufacturer", "manufacturer", CreateManufacturerLexiconList() ); - FillDefaultDBLexiconHelper( "tblGenre", "genre", CreateGenreLexiconList() ); + using (SQLiteTransaction transaction = SqlLiteConn.BeginTransaction()) + { + FillDefaultDBLexiconHelper("tblPlatform", "platform", CreateSystemLexiconList()); + FillDefaultDBLexiconHelper("tblManufacturer", "manufacturer", CreateManufacturerLexiconList()); + FillDefaultDBLexiconHelper("tblGenre", "genre", CreateGenreLexiconList()); - transaction.Commit(); - } + transaction.Commit(); + } - } + } - private static void FillDefaultDBLexiconHelper(string tableName, string columnName, List<string> itemList) - { - SQLiteParameter[] paramCollection = new SQLiteParameter[1]; - SQLiteParameter paramInsertValue = new SQLiteParameter( "@insertValue", DbType.String ); - paramCollection[0] = paramInsertValue; + private static void FillDefaultDBLexiconHelper(string tableName, string columnName, List<string> itemList) + { + SQLiteParameter[] paramCollection = new SQLiteParameter[1]; + SQLiteParameter paramInsertValue = new SQLiteParameter("@insertValue", DbType.String); + paramCollection[0] = paramInsertValue; - string sqlStmt = @" + string sqlStmt = @" INSERT INTO " + tableName + @" ( @@ -272,22 +273,22 @@ @insertValue );"; - foreach ( string insertValue in itemList ) - { + foreach (string insertValue in itemList) + { - paramCollection[0].Value = insertValue; - ExecuteStmtNonQuery( sqlStmt, paramCollection ); - } - } + paramCollection[0].Value = insertValue; + ExecuteStmtNonQuery(sqlStmt, paramCollection); + } + } - #region dbsettings - static public string ReadSetting(string Key) - { - string sqlStmt = string.Empty; + #region dbsettings + static public string ReadSetting(string Key) + { + string sqlStmt = string.Empty; - string keyValue = string.Empty; - sqlStmt = @" + string keyValue = string.Empty; + sqlStmt = @" SELECT value @@ -298,19 +299,19 @@ key ='" + Key + "'"; - object o = ExecuteStmtScalar( sqlStmt ); - if ( o != null ) - { - keyValue = o.ToString(); - } - return keyValue; - } + object o = ExecuteStmtScalar(sqlStmt); + if (o != null) + { + keyValue = o.ToString(); + } + return keyValue; + } - static int CountKey(string Key) - { - string sqlStmt = string.Empty; - int keyValue = 0; - sqlStmt = @" + static int CountKey(string Key) + { + string sqlStmt = string.Empty; + int keyValue = 0; + sqlStmt = @" SELECT COUNT(*) @@ -319,22 +320,22 @@ WHERE key ='" + Key + "'"; - keyValue = Convert.ToInt32( ExecuteStmtScalar( sqlStmt ) ); - return keyValue; - } + keyValue = Convert.ToInt32(ExecuteStmtScalar(sqlStmt)); + return keyValue; + } - static public bool KeyExists(string Key) - { - return ( CountKey( Key ) > 0 ); - } + static public bool KeyExists(string Key) + { + return (CountKey(Key) > 0); + } - static public void WriteSetting(string Key, string Value) - { - string sqlStmt = string.Empty; + static public void WriteSetting(string Key, string Value) + { + string sqlStmt = string.Empty; - if ( KeyExists( Key ) ) - { - sqlStmt = @" + if (KeyExists(Key)) + { + sqlStmt = @" UPDATE tblSetting @@ -344,34 +345,34 @@ WHERE key = '" + Key + "'"; - } - else - { - sqlStmt = @" + } + else + { + sqlStmt = @" INSERT INTO tblSetting (key, value) VALUES('" + Key + "', '" + Value + "')"; - } - ExecuteStmtNonQuery( sqlStmt ); - } + } + ExecuteStmtNonQuery(sqlStmt); + } - static public void DeleteSetting(string Key) - { + static public void DeleteSetting(string Key) + { - string sqlStmt = "DELETE FROM tblSetting WHERE key = '" + Key + "'"; - ExecuteStmtNonQuery( sqlStmt ); - } - #endregion dbsettings + string sqlStmt = "DELETE FROM tblSetting WHERE key = '" + Key + "'"; + ExecuteStmtNonQuery(sqlStmt); + } + #endregion dbsettings - public static int LexiconDataExists(string tableName, string columnName, string fieldValue) - { + public static int LexiconDataExists(string tableName, string columnName, string fieldValue) + { - SQLiteParameter[] parameterArray = new SQLiteParameter[1]; - parameterArray[0] = GetParameter<string>( fieldValue, "@fieldValue", DbType.String ); + SQLiteParameter[] parameterArray = new SQLiteParameter[1]; + parameterArray[0] = GetParameter<string>(fieldValue, "@fieldValue", DbType.String); - string sqlStmt = @" + string sqlStmt = @" SELECT " + columnName + @"id @@ -381,7 +382,7 @@ WHERE " + columnName + @" LIKE @fieldValue"; - string sqlStmtInsert = @" + string sqlStmtInsert = @" INSERT INTO " + tableName + @" ( @@ -392,224 +393,243 @@ @fieldValue );"; - try - { + try + { - int lexiconId= ExecuteStmtScalar<Int32>( sqlStmt, parameterArray); + int lexiconId = ExecuteStmtScalar<Int32>(sqlStmt, parameterArray); - //lexion didnt exist, we save it - if ( lexiconId == 0 ) - { - ExecuteStmtNonQuery( sqlStmtInsert,parameterArray ); - return ExecuteStmtScalar<Int32>( sqlStmt,parameterArray ); - } - else - { - return lexiconId; - } - } - catch ( SQLiteException ex ) - { - throw ex; - } - } + //lexion didnt exist, we save it + if (lexiconId == 0) + { + ExecuteStmtNonQuery(sqlStmtInsert, parameterArray); + return ExecuteStmtScalar<Int32>(sqlStmt, parameterArray); + } + else + { + return lexiconId; + } + } + catch (SQLiteException ex) + { + throw ex; + } + } - #region default lexiconvalues - private static List<string> CreateGenreLexiconList() - { - List<string> genreList = new List<string>(); + #region default lexiconvalues + private static List<string> CreateGenreLexiconList() + { + List<string> genreList = new List<string>(); - genreList.Add( "Shooter" ); - genreList.Add( "Platform" ); - genreList.Add( "Adventure" ); + genreList.Add("Shooter"); + genreList.Add("Platform"); + genreList.Add("Adventure"); - return genreList; - } + return genreList; + } - private static List<string> CreateManufacturerLexiconList() - { - List<string> manufacturerList = new List<string>(); + private static List<string> CreateManufacturerLexiconList() + { + List<string> manufacturerList = new List<string>(); - manufacturerList.Add( "Sega" ); - manufacturerList.Add( "Nintendo" ); - manufacturerList.Add( "Konami" ); + manufacturerList.Add("Sega"); + manufacturerList.Add("Nintendo"); + manufacturerList.Add("Konami"); - return manufacturerList; - } + return manufacturerList; + } - private static List<string> CreateSystemLexiconList() - { - List<string> systemList = new List<string>(); + private static List<string> CreateSystemLexiconList() + { + List<string> systemList = new List<string>(); + systemList.Add(""); + systemList.Add("Atari 5200"); + systemList.Add("Atari 7800"); + systemList.Add("Atari Lynx"); + systemList.Add("Atari ST"); + systemList.Add("Atari Video Computer System"); + systemList.Add("Commodore 64/128"); + systemList.Add("Commodore Amiga"); + systemList.Add("Game Boy"); + systemList.Add("Game Boy Advance"); + systemList.Add("Game Boy Color"); + systemList.Add("Neo Geo"); + systemList.Add("Nintendo 64"); + systemList.Add("Nintendo Entertainment System"); + systemList.Add("PlayStation"); + systemList.Add("Sega Dreamcast"); + systemList.Add("Sega Game Gear"); + systemList.Add("Sega Genesis"); + systemList.Add("Sega Master System"); + systemList.Add("Super NES"); + systemList.Add("TurboGrafx-16"); + systemList.Add("Arcade"); + systemList.Add("PC"); + return systemList; + } - systemList.Add( "Sega Mastersystem" ); - systemList.Add( "Arcade" ); - systemList.Add( "PC" ); - return systemList; - } + #endregion default lexiconvalues - #endregion default lexiconvalues + static public List<ApplicationItem> ApplicationItemList + { + get + { + return globalApplicationItemList; + } + } - static public List<ApplicationItem> ApplicationItemList - { - get - { - return globalApplicationItemList; - } - } + static public ItemType GetItemType(string columnName, string tableName, int id) + { + ItemType itemType = ItemType.UNKNOWN; - static public ItemType GetItemType(string columnName, string tableName, int id) - { - ItemType itemType = ItemType.UNKNOWN; + string sqlStmt = "select " + columnName + " from " + tableName + " where applicationid = " + id; - string sqlStmt = "select " + columnName + " from " + tableName + " where applicationid = " + id; + itemType = ProgramUtils.StringToSourceType(ExecuteStmtScalar(sqlStmt).ToString()); + return itemType; + } - itemType = ProgramUtils.StringToSourceType( ExecuteStmtScalar( sqlStmt ).ToString() ); - return itemType; - } + #region dataaccess help methods - #region dataaccess help methods + public static DataTable ExecuteStmtDataTable(string stmt) + { + DataTable dataTable = new DataTable(); - public static DataTable ExecuteStmtDataTable(string stmt) - { - DataTable dataTable = new DataTable(); + try + { - try - { + using (SQLiteCommand command = new SQLiteCommand(SqlLiteConn)) + { + command.CommandText = stmt; + using (SQLiteDataAdapter dataAdapter = new SQLiteDataAdapter(command)) + { + dataAdapter.Fill(dataTable); + } + } + } + catch (Exception exception) + { + throw exception; + } + return dataTable; + } - using ( SQLiteCommand command = new SQLiteCommand( SqlLiteConn ) ) - { - command.CommandText = stmt; - using ( SQLiteDataAdapter dataAdapter = new SQLiteDataAdapter( command ) ) - { - dataAdapter.Fill( dataTable ); - } - } - } - catch ( Exception exception ) - { - throw exception; - } - return dataTable; - } + public static void ExecuteStmtNonQuery(string stmt) + { + try + { + using (SQLiteCommand command = new SQLiteCommand(SqlLiteConn)) + { + command.CommandText = stmt; + command.ExecuteNonQuery(); + } + } + catch (Exception exception) + { + throw exception; + } + } - public static void ExecuteStmtNonQuery(string stmt) - { - try - { - using ( SQLiteCommand command = new SQLiteCommand( SqlLiteConn ) ) - { - command.CommandText = stmt; - command.ExecuteNonQuery(); - } - } - catch ( Exception exception ) - { - throw exception; - } - } + public static void ExecuteStmtNonQuery(string stmt, SQLiteParameter[] paramcollection) + { + try + { + using (SQLiteCommand command = new SQLiteCommand(SqlLiteConn)) + { + command.CommandText = stmt; + command.Parameters.AddRange(paramcollection); + command.ExecuteNonQuery(); + } + } + catch (Exception exception) + { + throw exception; + } + } - public static void ExecuteStmtNonQuery(string stmt, SQLiteParameter[] paramcollection) - { - try - { - using ( SQLiteCommand command = new SQLiteCommand( SqlLiteConn ) ) - { - command.CommandText = stmt; - command.Parameters.AddRange( paramcollection ); - command.ExecuteNonQuery(); - } - } - catch ( Exception exception ) - { - throw exception; - } - } + public static T ExecuteStmtScalar<T>(string stmt, SQLiteParameter[] paramcollection) + { - public static T ExecuteStmtScalar<T>(string stmt, SQLiteParameter[] paramcollection) - { - object o = null; - try - { - using ( SQLiteCommand command = new SQLiteCommand( SqlLiteConn ) ) - { - command.CommandText = stmt; - command.Parameters.AddRange( paramcollection ); - o = command.ExecuteScalar(); + try + { + using (SQLiteCommand command = new SQLiteCommand(SqlLiteConn)) + { + command.CommandText = stmt; + command.Parameters.AddRange(paramcollection); + o = command.ExecuteScalar(); - if (o != null) - { - return (T) Convert.ChangeType(o, typeof(T)); - } - return default(T); - - } - } - catch ( Exception exception ) - { - throw exception; - } - } + if (o != null) + { + return (T)Convert.ChangeType(o, typeof(T)); + } + return default(T); + } + } + catch (Exception exception) + { + throw exception; + } + } - public static object ExecuteStmtScalar(string stmt) - { - object o = null; - try - { - using ( SQLiteCommand command = new SQLiteCommand( SqlLiteConn ) ) - { - command.CommandText = stmt; - o = command.ExecuteScalar(); - } - } - catch ( Exception exception ) - { - throw exception; - } - return o; - } - public static SQLiteParameter GetParameter<G>(G value, string parameterName, DbType type) - { - SQLiteParameter parameter = new SQLiteParameter(parameterName,type); - parameter.Value = value; + public static object ExecuteStmtScalar(string stmt) + { + object o = null; + try + { + using (SQLiteCommand command = new SQLiteCommand(SqlLiteConn)) + { + command.CommandText = stmt; + o = command.ExecuteScalar(); + } + } + catch (Exception exception) + { + throw exception; + } + return o; + } - return parameter; - } + public static SQLiteParameter GetParameter<G>(G value, string parameterName, DbType type) + { + SQLiteParameter parameter = new SQLiteParameter(parameterName, type); + parameter.Value = value; - #endregion dataaccess help methods + return parameter; + } - public static void LoadAllApplicationItems() - { - try - { - globalApplicationItemList.Clear(); + #endregion dataaccess help methods - using ( SQLiteCommand command = SqlLiteConn.CreateCommand() ) - { - command.CommandText = "SELECT * FROM tblApplicationItem order by iposition"; - using ( SQLiteDataReader dataReader = command.ExecuteReader() ) - { - while ( dataReader.Read() ) - { - ApplicationItem applicationItem = ( ApplicationItem ) ApplicationItemFactory.AppFactory.GetApplicationItem( GetItemType( "applicationItemType", "tblApplicationItem", Convert.ToInt32( dataReader["applicationId"] ) ), dataReader ); - // applicationItem.OnLaunchFilelink += new ApplicationItem.FilelinkLaunchEventHandler(LaunchFilelink); - globalApplicationItemList.Add( applicationItem ); - } + public static void LoadAllApplicationItems() + { + try + { + globalApplicationItemList.Clear(); - } - } - } - catch ( SQLiteException ex ) - { - Log.Info( "programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace ); - } - } - } + using (SQLiteCommand command = SqlLiteConn.CreateCommand()) + { + command.CommandText = "SELECT * FROM tblApplicationItem order by iposition"; + using (SQLiteDataReader dataReader = command.ExecuteReader()) + { + while (dataReader.Read()) + { + ApplicationItem applicationItem = (ApplicationItem)ApplicationItemFactory.AppFactory.GetApplicationItem(GetItemType("applicationItemType", "tblApplicationItem", Convert.ToInt32(dataReader["applicationId"])), dataReader); + // applicationItem.OnLaunchFilelink += new ApplicationItem.FilelinkLaunchEventHandler(LaunchFilelink); + globalApplicationItemList.Add(applicationItem); + } + + } + } + } + catch (SQLiteException ex) + { + Log.Info("programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + } + } } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs 2007-08-02 15:43:42 UTC (rev 785) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs 2007-08-03 08:07:10 UTC (rev 786) @@ -863,6 +863,8 @@ } } + + private void gamebaseDBButton_Click(object sender, EventArgs e) { openFileDialog.FileName = this.gamebaseDBTextBox.Text; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs 2007-08-02 15:43:42 UTC (rev 785) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs 2007-08-03 08:07:10 UTC (rev 786) @@ -72,7 +72,7 @@ this.enabledCheckbox.AutoSize = true; this.enabledCheckbox.Location = new System.Drawing.Point(427, 17); this.enabledCheckbox.Name = "enabledCheckbox"; - this.enabledCheckbox.Size = new System.Drawing.Size(64, 17); + this.enabledCheckbox.Size = new System.Drawing.Size(65, 17); this.enabledCheckbox.TabIndex = 1; this.enabledCheckbox.Text = "Enabled"; this.enabledCheckbox.UseVisualStyleBackColor = true; @@ -100,7 +100,7 @@ this.titleTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.titleTextBox.Location = new System.Drawing.Point(94, 44); this.titleTextBox.Name = "titleTextBox"; - this.titleTextBox.Size = new System.Drawing.Size(325, 21); + this.titleTextBox.Size = new System.Drawing.Size(325, 20); this.titleTextBox.TabIndex = 4; // // applicationExeButton @@ -118,7 +118,7 @@ this.shellexecuteCheckBox.AutoSize = true; this.shellexecuteCheckBox.Location = new System.Drawing.Point(7, 322); this.shellexecuteCheckBox.Name = "shellexecuteCheckBox"; - this.shellexecuteCheckBox.Size = new System.Drawing.Size(87, 17); + this.shellexecuteCheckBox.Size = new System.Drawing.Size(88, 17); this.shellexecuteCheckBox.TabIndex = 7; this.shellexecuteCheckBox.Text = "ShellExecute"; this.shellexecuteCheckBox.UseVisualStyleBackColor = true; @@ -129,7 +129,7 @@ this.waitExitCheckBox.AutoSize = true; this.waitExitCheckBox.Location = new System.Drawing.Point(7, 368); this.waitExitCheckBox.Name = "waitExitCheckBox"; - this.waitExitCheckBox.Size = new System.Drawing.Size(86, 17); + this.waitExitCheckBox.Size = new System.Drawing.Size(82, 17); this.waitExitCheckBox.TabIndex = 8; this.waitExitCheckBox.Text = "Wait for exit"; this.waitExitCheckBox.UseVisualStyleBackColor = true; @@ -157,7 +157,7 @@ this.applicationImageTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.applicationImageTextBox.Location = new System.Drawing.Point(94, 97); this.applicationImageTextBox.Name = "applicationImageTextBox"; - this.applicationImageTextBox.Size = new System.Drawing.Size(325, 21); + this.applicationImageTextBox.Size = new System.Drawing.Size(325, 20); this.applicationImageTextBox.TabIndex = 13; // // applicationArgumentsTextBox @@ -165,7 +165,7 @@ this.applicationArgumentsTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.applicationArgumentsTextBox.Location = new System.Drawing.Point(94, 123); this.applicationArgumentsTextBox.Name = "applicationArgumentsTextBox"; - this.applicationArgumentsTextBox.Size = new System.Drawing.Size(325, 21); + this.applicationArgumentsTextBox.Size = new System.Drawing.Size(325, 20); this.applicationArgumentsTextBox.TabIndex = 14; // // winStyleLabel @@ -206,7 +206,7 @@ this.quoteCheckBox.AutoSize = true; this.quoteCheckBox.Location = new System.Drawing.Point(7, 299); this.quoteCheckBox.Name = "quoteCheckBox"; - this.quoteCheckBox.Size = new System.Drawing.Size(104, 17); + this.quoteCheckBox.Size = new System.Drawing.Size(102, 17); this.quoteCheckBox.TabIndex = 19; this.quoteCheckBox.Text = "Quote filenames"; this.quoteCheckBox.UseVisualStyleBackColor = true; @@ -236,7 +236,7 @@ this.allowRefreshCheckBox.AutoSize = true; this.allowRefreshCheckBox.Location = new System.Drawing.Point(7, 345); this.allowRefreshCheckBox.Name = "allowRefreshCheckBox"; - this.allowRefreshCheckBox.Size = new System.Drawing.Size(159, 17); + this.allowRefreshCheckBox.Size = new System.Drawing.Size(154, 17); this.allowRefreshCheckBox.TabIndex = 30; this.allowRefreshCheckBox.Text = "Allow refresh in mediaportal"; this.allowRefreshCheckBox.UseVisualStyleBackColor = true; @@ -257,7 +257,7 @@ this.applicationExeTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.applicationExeTextBox.Location = new System.Drawing.Point(94, 71); this.applicationExeTextBox.Name = "applicationExeTextBox"; - this.applicationExeTextBox.Size = new System.Drawing.Size(325, 21); + this.applicationExeTextBox.Size = new System.Drawing.Size(325, 20); this.applicationExeTextBox.TabIndex = 32; this.applicationExeTextBox.TextChanged += new System.EventHandler(this.applicationExeTextBox_TextChanged); // Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs 2007-08-02 15:43:42 UTC (rev 785) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs 2007-08-03 08:07:10 UTC (rev 786) @@ -140,6 +140,7 @@ toolTip.SetToolTip(applicationExeTextBox, "Program you wish to execute, include the full path (mandatory if ShellExecute is " + "OFF)"); toolTip.SetToolTip(allowRefreshCheckBox, "Check this if users can run the import through the REFRESH button in MediaPortal."); toolTip.SetToolTip(prePostButton, "Configure an command to run as pre or post of the main filelaunching ie explorer; joy2key; etc .Separate with ;."); + } protected void applicationExeButton_Click(object sender, EventArgs e) @@ -214,5 +215,10 @@ if (File.Exists(applicationExeTextBox.Text)) startupDirComboBox.Items.Add(Path.GetDirectoryName(applicationExeTextBox.Text)); } + + + + + } } \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.Designer.cs 2007-08-02 15:43:42 UTC (rev 785) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.Designer.cs 2007-08-03 08:07:10 UTC (rev 786) @@ -28,6 +28,8 @@ /// </summary> private void InitializeComponent() { + this.platformComboBox = new System.Windows.Forms.ComboBox(); + this.platformLabel = new System.Windows.Forms.Label(); this.SuspendLayout(); // // enabledCheckbox @@ -53,16 +55,17 @@ // this.toolTip.SetToolTip(this.applicationImageTextBox, "Optional filename for an image to display in MediaPortal"); // + // applicationArgumentsTextBox + // + this.toolTip.SetToolTip(this.applicationArgumentsTextBox, "Optional arguments that are needed to launch the program \r\n\r\n(advanced hint: Use " + + "%FILE% if the filename needs to be placed in some specific place between several" + + " arguments)"); + // // winStyleComboBox // this.toolTip.SetToolTip(this.winStyleComboBox, "Appearance of the launched program. \r\nTry HIDDEN or MINIMIZED for a seamless inte" + "gration in MediaPortal"); // - // startupDirTextBox - // - this.toolTip.SetToolTip(this.startupDirComboBox, "Optional path that is passed as the launch-directory \r\n\r\n(advanced hint: Use %FIL" + - "EDIR% if you want to use the directory where the launched file is stored)"); - // // quoteCheckBox // this.toolTip.SetToolTip(this.quoteCheckBox, "Quotes are usually needed to handle filenames with spaces correctly. \r\nAvoid doub" + @@ -72,14 +75,59 @@ // this.toolTip.SetToolTip(this.allowRefreshCheckBox, "Check this if users can run the import through the REFRESH button in MediaPortal." + ""); - // + // platformComboBox + // + this.platformComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.platformComboBox.FormattingEnabled = true; + this.platformComboBox.Location = new System.Drawing.Point(94, 204); + this.platformComboBox.Name = "platformComboBox"; + this.platformComboBox.Size = new System.Drawing.Size(325, 21); + this.platformComboBox.TabIndex = 42; + // + // platformLabel + // + this.platformLabel.AutoSize = true; + this.platformLabel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.platformLabel.Location = new System.Drawing.Point(3, 207); + this.platformLabel.Name = "platformLabel"; + this.platformLabel.Size = new System.Drawing.Size(84, 13); + this.platformLabel.TabIndex = 41; + this.platformLabel.Text = "Default platform:"; + // // AppSettingsDirCache // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.platformComboBox); + this.Controls.Add(this.platformLabel); this.Name = "AppSettingsDirCache"; this.Load += new System.EventHandler(this.AppSettingsDirCache_Load); + this.Controls.SetChildIndex(this.winTypeLabel, 0); + this.Controls.SetChildIndex(this.enabledCheckbox, 0); + this.Controls.SetChildIndex(this.titleLabel, 0); + this.Controls.SetChildIndex(this.applicationExeLabel, 0); + this.Controls.SetChildIndex(this.titleTextBox, 0); + this.Controls.SetChildIndex(this.applicationExeButton, 0); + this.Controls.SetChildIndex(this.shellexecuteCheckBox, 0); + this.Controls.SetChildIndex(this.waitExitCheckBox, 0); + this.Controls.SetChildIndex(this.applicationImageLabel, 0); + this.Controls.SetChildIndex(this.applicationArgumentsLabel, 0); + this.Controls.SetChildIndex(this.applicationImageTextBox, 0); + this.Controls.SetChildIndex(this.applicationArgumentsTextBox, 0); + this.Controls.SetChildIndex(this.winStyleLabel, 0); + this.Controls.SetChildIndex(this.winStyleComboBox, 0); + this.Controls.SetChildIndex(this.startupDirLabel, 0); + this.Controls.SetChildIndex(this.quoteCheckBox, 0); + this.Controls.SetChildIndex(this.applicationImageButton, 0); + this.Controls.SetChildIndex(this.startupDirButton, 0); + this.Controls.SetChildIndex(this.allowRefreshCheckBox, 0); + this.Controls.SetChildIndex(this.informationLabel, 0); + this.Controls.SetChildIndex(this.applicationExeTextBox, 0); + this.Controls.SetChildIndex(this.prePostButton, 0); + this.Controls.SetChildIndex(this.startupDirComboBox, 0); + this.Controls.SetChildIndex(this.platformLabel, 0); + this.Controls.SetChildIndex(this.platformComboBox, 0); this.ResumeLayout(false); this.PerformLayout(); @@ -87,5 +135,8 @@ #endregion + protected System.Windows.Forms.ComboBox platformComboBox; + protected System.Windows.Forms.Label platformLabel; + } } \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs 2007-08-02 15:43:42 UTC (rev 785) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs 2007-08-03 08:07:10 UTC (rev 786) @@ -47,6 +47,7 @@ public override bool AppItemToForm(ApplicationItem curApp) { + ProgramUtils.FillComboBox("tblPlatform", "platform", platformComboBox); base.AppItemToForm(curApp); enabledCheckbox.Checked = curApp.Enabled; titleTextBox.Text = curApp.Title; @@ -59,6 +60,9 @@ waitExitCheckBox.Checked = (curApp.WaitForExit); applicationImageTextBox.Text = curApp.Imagefile; allowRefreshCheckBox.Checked = curApp.RefreshGUIAllowed; + if(curApp.PlatformId != 0){ + platformComboBox.SelectedValue = curApp.PlatformId; + } return true; } @@ -77,6 +81,7 @@ curApp.SourceType = ItemType.DIRCACHE; curApp.Imagefile = applicationImageTextBox.Text; curApp.RefreshGUIAllowed = (allowRefreshCheckBox.Checked); + curApp.PlatformId =(int) platformComboBox.SelectedValue; } @@ -120,6 +125,10 @@ //untiil we really do something with this option in appdircache.. allowRefreshCheckBox.Checked = false; + + + + } } } \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.Designer.cs 2007-08-02 15:43:42 UTC (rev 785) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.Designer.cs 2007-08-03 08:07:10 UTC (rev 786) @@ -335,28 +335,7 @@ this.filterComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.filterComboBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.filterComboBox.Items.AddRange(new object[] { - "Arcade", - "Atari 5200", - "Atari 7800", - "Atari Lynx", - "Atari ST", - "Atari Video Computer System", - "Commodore 64/128", - "Commodore Amiga", - "Game Boy", - "Game Boy Advance", - "Game Boy Color", - "Neo Geo", - "Nintendo 64", - "Nintendo Entertainment System", - "PlayStation", - "Sega Dreamcast", - "Sega Game Gear", - "Sega Genesis", - "Sega Master System", - "Super NES", - "TurboGrafx-16"}); + this.filterComboBox.Location = new System.Drawing.Point(63, 22); this.filterComboBox.Name = "filterComboBox"; this.filterComboBox.Size = new System.Drawing.Size(132, 21); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs 2007-08-02 15:43:42 UTC (rev 785) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs 2007-08-03 08:07:10 UTC (rev 786) @@ -32,6 +32,7 @@ using System.Text; using System.Threading; using System.Windows.Forms; +using System.Data.SQLite; using GUIPrograms; using GUIPrograms.Database; @@ -63,17 +64,20 @@ } } + + void SetCurApp(ApplicationItem value) { curApp = value; if (curApp != null) { - filterComboBox.Text = curApp.SystemDefault; + filterComboBox.SelectedValue = curApp.PlatformId; } } public void Setup() { + SyncFileList(); UpdateButtonStates(); ChangeScraperSaveType(ScraperSaveType.DataAndImages); @@ -82,6 +86,7 @@ public FileInfoScraperForm() { InitializeComponent(); + ProgramUtils.FillComboBox("tblPlatform", "platform", filterComboBox); } #endregion @@ -122,6 +127,8 @@ return result; } + + private void SelectBestMatch(ListViewItem curItem) { if (curItem.Tag == null) return; @@ -438,7 +445,7 @@ { if ((curApp != null) && (filterComboBox.Text != "")) { - curApp.SystemDefault = filterComboBox.Text; + curApp.PlatformId = (int) filterComboBox.SelectedValue; //m_CurApp.Write(); } this.Close(); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.cs 2007-08-02 15:43:42 UTC (rev 785) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.cs 2007-08-03 08:07:10 UTC (rev 786) @@ -70,6 +70,7 @@ private bool profilesIsLoaded = false; private const string ROOTNODENAME = "Applications"; private const int POSITIONHOLDER = 10; + #endregion @@ -1027,50 +1028,12 @@ private void UpdateComboBoxes() { - FillComboBox("tblPlatform", "platform", removePlatformComboBox); - FillComboBox("tblManufacturer", "manufacturer", removeManufacturerComboBox); - FillComboBox("tblGenre", "genre", removeGenreComboBox); + ProgramUtils.FillComboBox("tblPlatform", "platform", removePlatformComboBox); + ProgramUtils.FillComboBox("tblManufacturer", "manufacturer", removeManufacturerComboBox); + ProgramUtils.FillComboBox("tblGenre", "genre", removeGenreComboBox); } - private void FillComboBox(string tableName, string orderBy, ComboBox comboBox) - { - List<ListItem> listItemList = new List<ListItem>(); - - string sqlStmt = @" - SELECT - * - - FROM - " + tableName + @" - - ORDER BY " + orderBy; - - try - { - - SQLiteCommand command = new SQLiteCommand(DatabaseHandler.SqlLiteConn); - - command.CommandText = sqlStmt; - using (SQLiteDataReader dataReader = command.ExecuteReader()) - { - while (dataReader.Read()) - { - ListItem listItem = new ListItem(dataReader[1].ToString(), Convert.ToInt32(dataReader[0])); - listItemList.Add(listItem); - } - } - } - catch (Exception exception) - { - throw exception; - } - - comboBox.DataSource = listItemList; - comboBox.ValueMember = "Value"; - comboBox.DisplayMember = "Text"; - - } - + private void mameImportToolStripMenuItem_Click(object sender, EventArgs e) { AddApplication(ItemType.MAMEDIRECT); @@ -1125,6 +1088,7 @@ { DeleteData("tblPlatform", "platformId", this.removePlatformComboBox.SelectedValue.ToString()); UpdateFileItems("platformId", this.removePlatformComboBox.SelectedValue.ToString()); + UpdateApplicationItem("platformId", this.removePlatformComboBox.SelectedValue.ToString()); UpdateComboBoxes(); } @@ -1177,7 +1141,31 @@ } } + //if something was removed that is in a fileitem + //set it to as default value (unknown) + private void UpdateApplicationItem(string removedField, string removedValue) + { + string sqlStmt = @" + UPDATE + tblApplicationItem + + SET + " + removedField + @" = 1 + + WHERE + " + removedField + @" = " + removedValue; + try + { + DatabaseHandler.ExecuteStmtNonQuery(sqlStmt); + } + catch (Exception exception) + { + throw exception; + } + } + + private void DeleteData(string tableName, string column, string uniqueValue) { //never remove 1 (unknown) @@ -1205,28 +1193,6 @@ UpdateComboBoxes(); } - public class ListItem - { - private string text; - - public string Text - { - get { return text; } - set { text = value; } - } - private int value; - - public int Value - { - get { return this.value; } - set { this.value = value; } - } - - public ListItem(string label, int data) - { - text = label; - value = data; - } - } + } } \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs 2007-08-02 15:43:42 UTC (rev 785) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs 2007-08-03 08:07:10 UTC (rev 786) @@ -87,7 +87,7 @@ string validExtensions; bool importValidImagesOnly; - string systemDefault; + int platformId; string launchErrorMsg; // two magic image-slideshow counters @@ -259,10 +259,10 @@ set { importValidImagesOnly = value; } } - public string SystemDefault + public int PlatformId { - get { return systemDefault; } - set { systemDefault = value; } + get { return platformId; } + set { platformId = value; } } public string LaunchErrorMsg { @@ -307,7 +307,7 @@ validExtensions = ""; appPosition = 0; importValidImagesOnly = false; - systemDefault = ""; + platformId = 0; waitForExit = true; filesAreLoaded = false; preLaunch = ""; @@ -727,7 +727,7 @@ parameterArray[16] = DatabaseHandler.GetParameter<int>( Position, "@position", DbType.Int32 ); parameterArray[17] = DatabaseHandler.GetParameter<bool>( Enabled, "@enabled", DbType.Boolean); parameterArray[18] = DatabaseHandler.GetParameter<bool>( RefreshGUIAllowed, "@refreshGUIAllowed", DbType.Boolean ); - parameterArray[19] = DatabaseHandler.GetParameter<string>( SystemDefault, "@systemDefault", DbType.String); + parameterArray[19] = DatabaseHandler.GetParameter<int>( PlatformId, "@platformId", DbType.Int32); parameterArray[20] = DatabaseHandler.GetParameter<bool>( WaitForExit, "@waitForExit", DbType.Boolean); parameterArray[21] = DatabaseHandler.GetParameter<string>( PreLaunch, "@preLaunch", DbType.String); parameterArray[22] = DatabaseHandler.GetParameter<string>( PostLaunch, "@postLaunch", DbType.String); @@ -765,7 +765,7 @@ iposition, enabled, refreshGUIAllowed, - systemDefault, + platformId, waitForExit, preLaunch, postLaunch @@ -791,7 +791,7 @@ @position, @enabled, @refreshGUIAllowed, - @systemDefault, + @platformId, @waitForExit, @preLaunch, @postLaunch @@ -832,7 +832,7 @@ parameterArray[16] = DatabaseHandler.GetParameter<int>( Position, "@position", DbType.Int32); parameterArray[17] = DatabaseHandler.GetParameter<bool>( Enabled, "@enabled", DbType.Boolean); parameterArray[18] = DatabaseHandler.GetParameter<bool>( RefreshGUIAllowed, "@refreshGUIAllowed", DbType.Boolean ); - parameterArray[19] = DatabaseHandler.GetParameter<string>( SystemDefault, "@systemDefault", DbType.String ); + parameterArray[19] = DatabaseHandler.GetParameter<int>( PlatformId, "@platformId", DbType.Int32 ); parameterArray[20] = DatabaseHandler.GetParameter<bool>( WaitForExit, "@waitForExit", DbType.Boolean ); parameterArray[21] = DatabaseHandler.GetParameter<string>( PreLaunch, "@preLaunch", DbType.String ); parameterArray[22] = DatabaseHandler.GetParameter<string>( PostLaunch, "@postLaunch", DbType.String ); @@ -861,7 +861,7 @@ iposition = @position, enabled = @enabled, refreshGUIAllowed = @refreshGUIAllowed, - systemDefault = @systemDefault, + platformId = @platformId, waitForExit = @waitForExit, preLaunch = @preLaunch, postLaunch = @postLaunch @@ -1030,7 +1030,7 @@ this.WaitForExit = sourceApp.WaitForExit; this.PreLaunch = sourceApp.PreLaunch; this.PostLaunch = sourceApp.PostLaunch; - this.SystemDefault = sourceApp.SystemDefault; + this.PlatformId = sourceApp.PlatformId; } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemFactory.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemFactory.cs 2007-08-02 15:43:42 UTC (rev 785) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemFactory.cs 2007-08-03 08:07:10 UTC (rev 786) @@ -122,7 +122,7 @@ item.ImportValidImagesOnly =(bool) dataReader["importvalidimagesonly"]; item.Position = Convert.ToInt32(dataReader["iposition"]); item.RefreshGUIAllowed = (bool) dataReader["refreshGUIAllowed"]; - item.SystemDefault = (string) dataReader["systemdefault"]; + item.PlatformId = Convert.ToInt32(dataReader["platformId"]); item.WaitForExit =(bool) dataReader["waitforexit"]; item.PreLaunch = (string) dataReader["preLaunch"]; item.PostLaunch =(string) dataReader["postLaunch"]; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs 2007-08-02 15:43:42 UTC (rev 785) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs 2007-08-03 08:07:10 UTC (rev 786) @@ -28,6 +28,7 @@ using System.Collections.Generic; using System.Diagnostics; +using System.Data.SQLite; using System.Drawing; using System.Drawing.Imaging; using System.IO; @@ -45,6 +46,8 @@ using MediaPortal.GUI.Library; using MediaPortal.Util; +using GUIPrograms.Database; + namespace GUIPrograms { #region enums @@ -325,5 +328,67 @@ return Result; } + + public class ListItem + { + private string text; + + public string Text + { + get { return text; } + set { text = value; } + } + private int value; + + public int Value + { + get { return this.value; } + set { this.value = value; } + } + + public ListItem(string label, int data) + { + text = label; + value = data; + } + } + public static void FillComboBox(string tableName, string orderBy, ComboBox comboBox) + { + List<ListItem> listItemList = new List<ListItem>(); + + string sqlStmt = @" + SELECT + * + + FROM + " + tableName + @" + + ORDER BY " + orderBy; + + try + { + + SQLiteCommand command = new SQLiteCommand(DatabaseHandler.SqlLiteConn); + + command.CommandText = sqlStmt; + using (SQLiteDataReader dataReader = command.ExecuteReader()) + { + while (dataReader.Read()) + { + ListItem listItem = new ListItem(dataReader[1].ToString(), Convert.ToInt32(dataReader[0])); + listItemList.Add(listItem); + } + } + } + catch (Exception exception) + { + throw exception; + } + + comboBox.DataSource = listItemList; + comboBox.ValueMember = "Value"; + comboBox.DisplayMember = "Text"; + + } } } \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/README.txt =================================================================== --- trunk/plugins/myGUIProgramsAlt/README.txt 2007-08-02 15:43:42 UTC (rev 785) +++ trunk/plugins/myGUIProgramsAlt/README.txt 2007-08-03 08:07:10 UTC (rev 786) @@ -19,7 +19,7 @@ Database/views: grouping added, fileinfodetails -Allgamesupport updated. +Allgamesupport updated./thanks chefkoch Fileinfoscraper reworked Mame, Gamebase support partially rewritten. @@ -46,16 +46,14 @@ - Appsettingsrootform: do not use inheritance, make this individual, so we easily can add global-options etc. - Dynamic checkbox list in the different filesview, allow us to "plugin" as many options we want for a special appitem -DB - - - add platformid instead of system default..application item - ThumbnailSupport: - [low] genre: thumbs for genre, for example it could be created on AllGame lookup, for first file with this genre - - ....... +Genre: + - Change to genre/categoryinstead. + --------------------- .: Things to clear :. --------------------- @@ -97,23 +95,20 @@ -> 2. can be renamed by plugin, when renaming the appItem -> 3. there could be a msgBox, which asks the user what to do, 1. or 2. ? go for two!! -------------------------------------------------------------------------------------- -Above: mabey add an advanced option for the user. In short, allowing a merge between "easy setup" (as above) +Above: maybe add an advanced option for the user. In short, allowing a merge between "easy setup" (as above) and total control filepaths etc. -MyEmu... +MyEmu...i think Add some more specific emulator support.. - - using emulator ids??? can be used for - - filter in fileinfoscraperForm.. we got system id's now.. so feel free to implement.Will add emulator table at some point. - - - easier application image assigning together with thumbsdir -> we also could provide icons for most common system + - using emulator ids??? yes at some point. this could benefit automatic downloads etc + - easier application image assigning together with thumbsdir -> we also could provide icons for most common system ConfigurationTool redesign: - - saving the path to file for import - - saving the path to image dir, or using thumbsDir of MP, are there any pros? + - saving the path to file for import. ????? what??? + - saving the path to image dir, or using thumbsDir of MP, are there any pros? - Iso moun... [truncated message content] |
From: <an...@us...> - 2007-08-02 15:43:46
|
Revision: 785 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=785&view=rev Author: and-81 Date: 2007-08-02 08:43:42 -0700 (Thu, 02 Aug 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/FusionRemoteReceiver.cs trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/IRServerPluginInterface.cs trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/IRMan Receiver.cs trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/IRTransTransceiver.cs trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug USB Receiver/IgorPlug USB Receiver.cs trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug USB Receiver/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLirc Receiver.cs trunk/plugins/IR Server Suite/IR Server Plugins/Windows Message Receiver/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/IR Server Plugins/Windows Message Receiver/Windows Message Receiver.cs trunk/plugins/IR Server Suite/IR Server Plugins/X10 Transceiver/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/IR Server Plugins/X10 Transceiver/X10Transceiver.cs trunk/plugins/IR Server Suite/IR Server Plugins/XBCDRC Receiver/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/IR Server Plugins/XBCDRC Receiver/XBCDRC Receiver.cs Modified: trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/FusionRemoteReceiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/FusionRemoteReceiver.cs 2007-08-02 15:40:55 UTC (rev 784) +++ trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/FusionRemoteReceiver.cs 2007-08-02 15:43:42 UTC (rev 785) @@ -198,7 +198,7 @@ #region Variables - static RemoteButtonHandler _remoteButtonHandler = null; + static RemoteHandler _remoteButtonHandler = null; static FileStream _deviceStream; static byte[] _deviceBuffer; @@ -209,7 +209,7 @@ #region IIRServerPlugin Members public string Name { get { return "FusionREMOTE"; } } - public string Version { get { return "1.0.3.2"; } } + public string Version { get { return "1.0.3.3"; } } public string Author { get { return "and-81"; } } public string Description { get { return "DViCO FusionREMOTE Receiver"; } } public bool CanReceive { get { return true; } } @@ -217,12 +217,16 @@ public bool CanLearn { get { return false; } } public bool CanConfigure { get { return false; } } - public RemoteButtonHandler RemoteButtonCallback + public RemoteHandler RemoteCallback { get { return _remoteButtonHandler; } set { _remoteButtonHandler = value; } } + public KeyboardHandler KeyboardCallback { get { return null; } set { } } + + public MouseHandler MouseCallback { get { return null; } set { } } + public string[] AvailablePorts { get { return Ports; } @@ -270,8 +274,9 @@ { return false; } - public LearnStatus Learn(string file) + public LearnStatus Learn(out byte[] data) { + data = null; return LearnStatus.Failure; } Modified: trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/Properties/AssemblyInfo.cs 2007-08-02 15:40:55 UTC (rev 784) +++ trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/Properties/AssemblyInfo.cs 2007-08-02 15:43:42 UTC (rev 785) @@ -29,7 +29,7 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.3.2")] -[assembly: AssemblyFileVersion("1.0.3.2")] +[assembly: AssemblyVersion("1.0.3.3")] +[assembly: AssemblyFileVersion("1.0.3.3")] [assembly: CLSCompliant(true)] Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/IRServerPluginInterface.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/IRServerPluginInterface.cs 2007-08-02 15:40:55 UTC (rev 784) +++ trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/IRServerPluginInterface.cs 2007-08-02 15:43:42 UTC (rev 785) @@ -11,8 +11,24 @@ /// IR Server callback for remote button press handling. /// </summary> /// <param name="keyCode">Remote button code.</param> - public delegate void RemoteButtonHandler(string keyCode); + public delegate void RemoteHandler(string keyCode); + /// <summary> + /// IR Server callback for keyboard key press handling. + /// </summary> + /// <param name="vKey">Virtual key code.</param> + /// <param name="keyUp">.</param> + public delegate void KeyboardHandler(int vKey, bool keyUp); + + /// <summary> + /// IR Server callback for mouse event handling. + /// </summary> + /// <param name="deltaX">Mouse movement on the X-axis.</param> + /// <param name="deltaY">Mouse movement on the Y-axis.</param> + /// <param name="rightButton">Is the right button pressed?</param> + /// <param name="leftButton">Is the left button pressed?</param> + public delegate void MouseHandler(int deltaX, int deltaY, int buttons); + #endregion Delegates #region Enumerations @@ -89,9 +105,19 @@ /// <summary> /// Callback for remote button presses. /// </summary> - RemoteButtonHandler RemoteButtonCallback { get; set; } + RemoteHandler RemoteCallback { get; set; } /// <summary> + /// Callback for keyboard presses. + /// </summary> + KeyboardHandler KeyboardCallback { get; set; } + + /// <summary> + /// Callback for mouse events. + /// </summary> + MouseHandler MouseCallback { get; set; } + + /// <summary> /// Lists the available blaster ports. /// </summary> string[] AvailablePorts { get; } @@ -141,9 +167,9 @@ /// <summary> /// Learn an infrared command. /// </summary> - /// <param name="file">New infrared command file to create.</param> + /// <param name="data">New infrared command.</param> /// <returns>Tells the calling code if the learn was Successful, Failed or Timed Out.</returns> - LearnStatus Learn(string file); + LearnStatus Learn(out byte[] data); /// <summary> /// Set the transmit port to use for infrared command output. @@ -163,4 +189,37 @@ } + /* + + public interface IConfigurable + { + + } + + public interface ITransmitIR + { + + } + + public interface ILearnIR + { + + } + + public interface IRemoteReceiver + { + + } + + public interface IKeyboardReceiver + { + + } + + public interface IMouseReceiver + { + + } + + */ } Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/Properties/AssemblyInfo.cs 2007-08-02 15:40:55 UTC (rev 784) +++ trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/Properties/AssemblyInfo.cs 2007-08-02 15:43:42 UTC (rev 785) @@ -29,7 +29,7 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.3.2")] -[assembly: AssemblyFileVersion("1.0.3.2")] +[assembly: AssemblyVersion("1.0.3.3")] +[assembly: AssemblyFileVersion("1.0.3.3")] [assembly: CLSCompliant(true)] Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/IRMan Receiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/IRMan Receiver.cs 2007-08-02 15:40:55 UTC (rev 784) +++ trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/IRMan Receiver.cs 2007-08-02 15:43:42 UTC (rev 785) @@ -34,7 +34,7 @@ SerialPort _serialPort; byte[] _deviceBuffer; - RemoteButtonHandler _remoteButtonHandler = null; + RemoteHandler _remoteButtonHandler = null; int _repeatDelay; string _serialPortName; @@ -49,7 +49,7 @@ #region IIRServerPlugin Members public string Name { get { return "IRMan"; } } - public string Version { get { return "1.0.3.2"; } } + public string Version { get { return "1.0.3.3"; } } public string Author { get { return "and-81"; } } public string Description { get { return "Receiver support for the Serial IRMan device"; } } public bool CanReceive { get { return true; } } @@ -57,13 +57,17 @@ public bool CanLearn { get { return false; } } public bool CanConfigure { get { return true; } } - public RemoteButtonHandler RemoteButtonCallback + public RemoteHandler RemoteCallback { get { return _remoteButtonHandler; } set { _remoteButtonHandler = value; } } - public string[] AvailablePorts { get { return Ports; } } + public KeyboardHandler KeyboardCallback { get { return null; } set { } } + + public MouseHandler MouseCallback { get { return null; } set { } } + + public string[] AvailablePorts { get { return Ports; } } public string[] AvailableSpeeds { get { return Speeds; } } public void Configure() @@ -134,7 +138,11 @@ } public bool Transmit(string file) { return false; } - public LearnStatus Learn(string file) { return LearnStatus.Failure; } + public LearnStatus Learn(out byte[] data) + { + data = null; + return LearnStatus.Failure; + } public bool SetPort(string port) { return true; } public bool SetSpeed(string speed) { return true; } Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/Properties/AssemblyInfo.cs 2007-08-02 15:40:55 UTC (rev 784) +++ trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/Properties/AssemblyInfo.cs 2007-08-02 15:43:42 UTC (rev 785) @@ -29,7 +29,7 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.3.2")] -[assembly: AssemblyFileVersion("1.0.3.2")] +[assembly: AssemblyVersion("1.0.3.3")] +[assembly: AssemblyFileVersion("1.0.3.3")] [assembly: CLSCompliant(true)] Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/IRTransTransceiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/IRTransTransceiver.cs 2007-08-02 15:40:55 UTC (rev 784) +++ trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/IRTransTransceiver.cs 2007-08-02 15:43:42 UTC (rev 785) @@ -204,7 +204,7 @@ #region Variables - static RemoteButtonHandler _remoteButtonHandler = null; + static RemoteHandler _remoteButtonHandler = null; static string _blasterSpeed = Speeds[0]; static string _blasterPort = Ports[0]; @@ -221,7 +221,7 @@ #region IIRServerPlugin Members public string Name { get { return "IRTrans (Experimental)"; } } - public string Version { get { return "1.0.3.2"; } } + public string Version { get { return "1.0.3.3"; } } public string Author { get { return "and-81"; } } public string Description { get { return "IRTrans Transceiver (Experimental)"; } } public bool CanReceive { get { return true; } } @@ -229,12 +229,16 @@ public bool CanLearn { get { return false; } } public bool CanConfigure { get { return true; } } - public RemoteButtonHandler RemoteButtonCallback + public RemoteHandler RemoteCallback { get { return _remoteButtonHandler; } set { _remoteButtonHandler = value; } } + public KeyboardHandler KeyboardCallback { get { return null; } set { } } + + public MouseHandler MouseCallback { get { return null; } set { } } + public string[] AvailablePorts { get { return Ports; } @@ -322,8 +326,10 @@ } */ } - public LearnStatus Learn(string file) + public LearnStatus Learn(out byte[] data) { + data = null; + /* try { Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/Properties/AssemblyInfo.cs 2007-08-02 15:40:55 UTC (rev 784) +++ trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/Properties/AssemblyInfo.cs 2007-08-02 15:43:42 UTC (rev 785) @@ -29,7 +29,7 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.3.2")] -[assembly: AssemblyFileVersion("1.0.3.2")] +[assembly: AssemblyVersion("1.0.3.3")] +[assembly: AssemblyFileVersion("1.0.3.3")] [assembly: CLSCompliant(true)] Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug USB Receiver/IgorPlug USB Receiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug USB Receiver/IgorPlug USB Receiver.cs 2007-08-02 15:40:55 UTC (rev 784) +++ trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug USB Receiver/IgorPlug USB Receiver.cs 2007-08-02 15:43:42 UTC (rev 785) @@ -27,7 +27,7 @@ #region Variables - RemoteButtonHandler _remoteButtonHandler = null; + RemoteHandler _remoteButtonHandler = null; Thread _readThread; @@ -63,7 +63,7 @@ #region IIRServerPlugin Members public string Name { get { return "IgorPlug USB"; } } - public string Version { get { return "1.0.3.2"; } } + public string Version { get { return "1.0.3.3"; } } public string Author { get { return "and-81"; } } public string Description { get { return "IgorPlug USB Receiver"; } } public bool CanReceive { get { return true; } } @@ -71,13 +71,17 @@ public bool CanLearn { get { return false; } } public bool CanConfigure { get { return false; } } - public RemoteButtonHandler RemoteButtonCallback + public RemoteHandler RemoteCallback { get { return _remoteButtonHandler; } set { _remoteButtonHandler = value; } } - public string[] AvailablePorts { get { return Ports; } } + public KeyboardHandler KeyboardCallback { get { return null; } set { } } + + public MouseHandler MouseCallback { get { return null; } set { } } + + public string[] AvailablePorts { get { return Ports; } } public string[] AvailableSpeeds { get { return Speeds; } } public void Configure() { } @@ -97,7 +101,11 @@ } public bool Transmit(string file) { return false; } - public LearnStatus Learn(string file) { return LearnStatus.Failure; } + public LearnStatus Learn(out byte[] data) + { + data = null; + return LearnStatus.Failure; + } public bool SetPort(string port) { return true; } public bool SetSpeed(string speed) { return true; } Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug USB Receiver/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug USB Receiver/Properties/AssemblyInfo.cs 2007-08-02 15:40:55 UTC (rev 784) +++ trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug USB Receiver/Properties/AssemblyInfo.cs 2007-08-02 15:43:42 UTC (rev 785) @@ -29,7 +29,7 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.3.2")] -[assembly: AssemblyFileVersion("1.0.3.2")] +[assembly: AssemblyVersion("1.0.3.3")] +[assembly: AssemblyFileVersion("1.0.3.3")] [assembly: CLSCompliant(true)] Modified: trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/Properties/AssemblyInfo.cs 2007-08-02 15:40:55 UTC (rev 784) +++ trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/Properties/AssemblyInfo.cs 2007-08-02 15:43:42 UTC (rev 785) @@ -29,7 +29,7 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.3.2")] -[assembly: AssemblyFileVersion("1.0.3.2")] +[assembly: AssemblyVersion("1.0.3.3")] +[assembly: AssemblyFileVersion("1.0.3.3")] [assembly: CLSCompliant(true)] Modified: trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/Properties/AssemblyInfo.cs 2007-08-02 15:40:55 UTC (rev 784) +++ trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/Properties/AssemblyInfo.cs 2007-08-02 15:43:42 UTC (rev 785) @@ -29,7 +29,7 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.3.2")] -[assembly: AssemblyFileVersion("1.0.3.2")] +[assembly: AssemblyVersion("1.0.3.3")] +[assembly: AssemblyFileVersion("1.0.3.3")] [assembly: CLSCompliant(true)] Modified: trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLirc Receiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLirc Receiver.cs 2007-08-02 15:40:55 UTC (rev 784) +++ trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLirc Receiver.cs 2007-08-02 15:43:42 UTC (rev 785) @@ -29,7 +29,7 @@ #region Variables - RemoteButtonHandler _remoteButtonHandler = null; + RemoteHandler _remoteButtonHandler = null; WinLircServer _server; IPAddress _serverIP; @@ -43,7 +43,7 @@ #region IIRServerPlugin Members public string Name { get { return "WinLirc"; } } - public string Version { get { return "1.0.3.2"; } } + public string Version { get { return "1.0.3.3"; } } public string Author { get { return "and-81, original code for MediaPortal by Sven"; } } public string Description { get { return "Supports WinLirc as a reciever"; } } public bool CanReceive { get { return true; } } @@ -51,12 +51,16 @@ public bool CanLearn { get { return false; } } public bool CanConfigure { get { return true; } } - public RemoteButtonHandler RemoteButtonCallback + public RemoteHandler RemoteCallback { get { return _remoteButtonHandler; } set { _remoteButtonHandler = value; } } + public KeyboardHandler KeyboardCallback { get { return null; } set { } } + + public MouseHandler MouseCallback { get { return null; } set { } } + public string[] AvailablePorts { get { return Ports; } } public string[] AvailableSpeeds { get { return Speeds; } } @@ -129,8 +133,9 @@ return false; } } - public LearnStatus Learn(string file) + public LearnStatus Learn(out byte[] data) { + data = null; return LearnStatus.Failure; } Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Windows Message Receiver/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Windows Message Receiver/Properties/AssemblyInfo.cs 2007-08-02 15:40:55 UTC (rev 784) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Windows Message Receiver/Properties/AssemblyInfo.cs 2007-08-02 15:43:42 UTC (rev 785) @@ -29,7 +29,7 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.3.2")] -[assembly: AssemblyFileVersion("1.0.3.2")] +[assembly: AssemblyVersion("1.0.3.3")] +[assembly: AssemblyFileVersion("1.0.3.3")] [assembly: CLSCompliant(true)] Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Windows Message Receiver/Windows Message Receiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Windows Message Receiver/Windows Message Receiver.cs 2007-08-02 15:40:55 UTC (rev 784) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Windows Message Receiver/Windows Message Receiver.cs 2007-08-02 15:43:42 UTC (rev 785) @@ -47,14 +47,14 @@ int _messageType = WM_APP; int _wParam = DefaultMessageID; - RemoteButtonHandler _remoteButtonHandler = null; + RemoteHandler _remoteButtonHandler = null; #endregion Variables #region IIRServerPlugin Members public string Name { get { return "Windows Messages"; } } - public string Version { get { return "1.0.3.2"; } } + public string Version { get { return "1.0.3.3"; } } public string Author { get { return "and-81"; } } public string Description { get { return "Supports receiving simulated button presses through Windows Messages"; } } public bool CanReceive { get { return true; } } @@ -62,12 +62,16 @@ public bool CanLearn { get { return false; } } public bool CanConfigure { get { return true; } } - public RemoteButtonHandler RemoteButtonCallback + public RemoteHandler RemoteCallback { get { return _remoteButtonHandler; } set { _remoteButtonHandler = value; } } + public KeyboardHandler KeyboardCallback { get { return null; } set { } } + + public MouseHandler MouseCallback { get { return null; } set { } } + public string[] AvailablePorts { get { return Ports; } } public string[] AvailableSpeeds { get { return Speeds; } } @@ -120,8 +124,9 @@ */ return false; } - public LearnStatus Learn(string file) + public LearnStatus Learn(out byte[] data) { + data = null; return LearnStatus.Failure; } Modified: trunk/plugins/IR Server Suite/IR Server Plugins/X10 Transceiver/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/X10 Transceiver/Properties/AssemblyInfo.cs 2007-08-02 15:40:55 UTC (rev 784) +++ trunk/plugins/IR Server Suite/IR Server Plugins/X10 Transceiver/Properties/AssemblyInfo.cs 2007-08-02 15:43:42 UTC (rev 785) @@ -29,7 +29,7 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.3.2")] -[assembly: AssemblyFileVersion("1.0.3.2")] +[assembly: AssemblyVersion("1.0.3.3")] +[assembly: AssemblyFileVersion("1.0.3.3")] [assembly: CLSCompliant(true)] Modified: trunk/plugins/IR Server Suite/IR Server Plugins/X10 Transceiver/X10Transceiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/X10 Transceiver/X10Transceiver.cs 2007-08-02 15:40:55 UTC (rev 784) +++ trunk/plugins/IR Server Suite/IR Server Plugins/X10 Transceiver/X10Transceiver.cs 2007-08-02 15:43:42 UTC (rev 785) @@ -28,7 +28,7 @@ #region Variables - static RemoteButtonHandler _remoteButtonHandler = null; + static RemoteHandler _remoteButtonHandler = null; static string _blasterSpeed = Speeds[0]; static string _blasterPort = Ports[0]; @@ -43,7 +43,7 @@ #region IIRServerPlugin Members public string Name { get { return "X10 (Experimental)"; } } - public string Version { get { return "1.0.3.2"; } } + public string Version { get { return "1.0.3.3"; } } public string Author { get { return "and-81"; } } public string Description { get { return "X10 Transceiver (Experimental)"; } } public bool CanReceive { get { return true; } } @@ -51,12 +51,16 @@ public bool CanLearn { get { return false; } } public bool CanConfigure { get { return false; } } - public RemoteButtonHandler RemoteButtonCallback + public RemoteHandler RemoteCallback { get { return _remoteButtonHandler; } set { _remoteButtonHandler = value; } } + public KeyboardHandler KeyboardCallback { get { return null; } set { } } + + public MouseHandler MouseCallback { get { return null; } set { } } + public string[] AvailablePorts { get { return Ports; } @@ -105,8 +109,9 @@ { return false; } - public LearnStatus Learn(string file) + public LearnStatus Learn(out byte[] data) { + data = null; return LearnStatus.Failure; } @@ -132,8 +137,8 @@ { string keyCode = Enum.GetName(typeof(X10.EX10Command), eCommand); - if (RemoteButtonCallback != null) - RemoteButtonCallback(keyCode); + if (RemoteCallback != null) + RemoteCallback(keyCode); } catch (Exception ex) { Modified: trunk/plugins/IR Server Suite/IR Server Plugins/XBCDRC Receiver/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/XBCDRC Receiver/Properties/AssemblyInfo.cs 2007-08-02 15:40:55 UTC (rev 784) +++ trunk/plugins/IR Server Suite/IR Server Plugins/XBCDRC Receiver/Properties/AssemblyInfo.cs 2007-08-02 15:43:42 UTC (rev 785) @@ -29,7 +29,7 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.3.2")] -[assembly: AssemblyFileVersion("1.0.3.2")] +[assembly: AssemblyVersion("1.0.3.3")] +[assembly: AssemblyFileVersion("1.0.3.3")] [assembly: CLSCompliant(true)] Modified: trunk/plugins/IR Server Suite/IR Server Plugins/XBCDRC Receiver/XBCDRC Receiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/XBCDRC Receiver/XBCDRC Receiver.cs 2007-08-02 15:40:55 UTC (rev 784) +++ trunk/plugins/IR Server Suite/IR Server Plugins/XBCDRC Receiver/XBCDRC Receiver.cs 2007-08-02 15:43:42 UTC (rev 785) @@ -25,7 +25,7 @@ #region Variables - RemoteButtonHandler _remoteButtonHandler = null; + RemoteHandler _remoteButtonHandler = null; FileStream _deviceStream; byte[] _deviceBuffer; @@ -187,7 +187,7 @@ #region IIRServerPlugin Members public string Name { get { return "XBCDRC"; } } - public string Version { get { return "1.0.3.2"; } } + public string Version { get { return "1.0.3.3"; } } public string Author { get { return "and-81"; } } public string Description { get { return "Supports the XBox 1 IR receiver with XBCDRC"; } } public bool CanReceive { get { return true; } } @@ -195,13 +195,17 @@ public bool CanLearn { get { return false; } } public bool CanConfigure { get { return false; } } - public RemoteButtonHandler RemoteButtonCallback + public RemoteHandler RemoteCallback { get { return _remoteButtonHandler; } set { _remoteButtonHandler = value; } } - public string[] AvailablePorts { get { return Ports; } } + public KeyboardHandler KeyboardCallback { get { return null; } set { } } + + public MouseHandler MouseCallback { get { return null; } set { } } + + public string[] AvailablePorts { get { return Ports; } } public string[] AvailableSpeeds { get { return Speeds; } } public void Configure() { } @@ -248,7 +252,11 @@ } public bool Transmit(string file) { return false; } - public LearnStatus Learn(string file) { return LearnStatus.Failure; } + public LearnStatus Learn(out byte[] data) + { + data = null; + return LearnStatus.Failure; + } public bool SetPort(string port) { return true; } public bool SetSpeed(string speed) { return true; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <an...@us...> - 2007-08-02 15:40:58
|
Revision: 784 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=784&view=rev Author: and-81 Date: 2007-08-02 08:40:55 -0700 (Thu, 02 Aug 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs trunk/plugins/IR Server Suite/Applications/Debug Client/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/Applications/IR Blast/Program.cs trunk/plugins/IR Server Suite/Applications/IR Blast/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Program.cs trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/Applications/IR Server/IR Server.csproj trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs trunk/plugins/IR Server Suite/Applications/IR Server/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/Applications/Translator/Configuration.cs trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs trunk/plugins/IR Server Suite/Applications/Translator/Forms/EditProgramForm.Designer.cs trunk/plugins/IR Server Suite/Applications/Translator/Forms/EditProgramForm.cs trunk/plugins/IR Server Suite/Applications/Translator/Forms/GetKeyCodeForm.cs trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs trunk/plugins/IR Server Suite/Applications/Translator/MappedEvent.cs trunk/plugins/IR Server Suite/Applications/Translator/Program.cs trunk/plugins/IR Server Suite/Applications/Translator/ProgramSettings.cs trunk/plugins/IR Server Suite/Applications/Translator/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/Applications/Translator/Translator.csproj trunk/plugins/IR Server Suite/Applications/Tray Launcher/GetKeyCodeForm.cs trunk/plugins/IR Server Suite/Applications/Tray Launcher/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray.cs trunk/plugins/IR Server Suite/Applications/Virtual Remote/MainForm.cs trunk/plugins/IR Server Suite/Applications/Virtual Remote/Program.cs trunk/plugins/IR Server Suite/Applications/Virtual Remote/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/MainForm.cs trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Common.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/ExternalProgram.Designer.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/ExternalProgram.cs trunk/plugins/IR Server Suite/Common/IrssUtils/IrssUtils.csproj trunk/plugins/IR Server Suite/Common/IrssUtils/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Win32.cs trunk/plugins/IR Server Suite/Common/MPUtils/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/IPC/AppModule.InterProcessComm/IClientChannel.cs trunk/plugins/IR Server Suite/IPC/AppModule.InterProcessComm/IInterProcessConnection.cs trunk/plugins/IR Server Suite/IPC/AppModule.InterProcessComm/InterProcessIOException.cs trunk/plugins/IR Server Suite/IPC/AppModule.NamedPipes/NamedPipeNative.cs trunk/plugins/IR Server Suite/IPC/Named Pipes/PipeMessage.cs trunk/plugins/IR Server Suite/IPC/Named Pipes/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/IR Server Suite.sln trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/MPBlastZonePlugin.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/SetupForm.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/InputMapper/InputHandler.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MappedEvent.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2BlasterPlugin.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/TV3BlasterPlugin.cs Added Paths: ----------- trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/WindowList.Designer.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/WindowList.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/WindowList.resx trunk/plugins/IR Server Suite/Common/IrssUtils/Keyboard.cs Removed Paths: ------------- trunk/plugins/IR Server Suite/Applications/Translator/Forms/WindowList.Designer.cs trunk/plugins/IR Server Suite/Applications/Translator/Forms/WindowList.cs trunk/plugins/IR Server Suite/Applications/Translator/Forms/WindowList.resx Modified: trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs 2007-08-02 00:09:20 UTC (rev 783) +++ trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs 2007-08-02 15:40:55 UTC (rev 784) @@ -22,7 +22,7 @@ #region Enumerations /// <summary> - /// A list of MCE remote buttons + /// A list of MCE remote buttons. /// </summary> public enum MceButton { @@ -174,6 +174,8 @@ case "Blast Success": case "Blast Failure": case "Start Learn": + case "Keyboard Event": + case "Mouse Event": return; case "Clients": @@ -204,10 +206,10 @@ return; } - case "Remote Button": + case "Remote Event": { string keyCode = Encoding.ASCII.GetString(received.Data); - RemoteButtonPressed(keyCode); + RemoteHandlerCallback(keyCode); return; } @@ -355,9 +357,9 @@ return true; } - void RemoteButtonPressed(string keyCode) + void RemoteHandlerCallback(string keyCode) { - string text = String.Format("Remote Button \"{0}\"", keyCode); + string text = String.Format("Remote Event \"{0}\"", keyCode); this.Invoke(_AddStatusLine, new Object[] { text }); } @@ -572,7 +574,7 @@ BitConverter.GetBytes(keyCode).CopyTo(data, 0); BitConverter.GetBytes(0).CopyTo(data, 4); - PipeMessage message = new PipeMessage(_localPipeName, Environment.MachineName, "Forward Remote Button", data); + PipeMessage message = new PipeMessage(_localPipeName, Environment.MachineName, "Forward Remote Event", data); PipeAccess.SendMessage(Common.ServerPipeName, _serverAddress, message.ToString()); } catch (Exception ex) Modified: trunk/plugins/IR Server Suite/Applications/Debug Client/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Debug Client/Properties/AssemblyInfo.cs 2007-08-02 00:09:20 UTC (rev 783) +++ trunk/plugins/IR Server Suite/Applications/Debug Client/Properties/AssemblyInfo.cs 2007-08-02 15:40:55 UTC (rev 784) @@ -33,7 +33,7 @@ // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.3.2")] -[assembly: AssemblyFileVersion("1.0.3.2")] +[assembly: AssemblyVersion("1.0.3.3")] +[assembly: AssemblyFileVersion("1.0.3.3")] [assembly: CLSCompliant(true)] Modified: trunk/plugins/IR Server Suite/Applications/IR Blast/Program.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Blast/Program.cs 2007-08-02 00:09:20 UTC (rev 783) +++ trunk/plugins/IR Server Suite/Applications/IR Blast/Program.cs 2007-08-02 15:40:55 UTC (rev 784) @@ -31,6 +31,7 @@ static string _blastSpeed = "None"; static bool _treatAsChannelNumber = false; + static int _padChannelNumber = 0; #endregion Variables @@ -74,6 +75,10 @@ _treatAsChannelNumber = true; continue; + case "-pad": + int.TryParse(args[++index], out _padChannelNumber); + continue; + default: irCommands.Add(args[index]); continue; @@ -109,8 +114,19 @@ if (_treatAsChannelNumber) { Info("Processing channel: {0}", command); - foreach (char digit in command) + + StringBuilder channelNumber = new StringBuilder(command); + + if (_padChannelNumber > 0) { + for (int index = 0; index < _padChannelNumber - command.Length; index++) + channelNumber.Insert(0, '0'); + + Info("Padding channel number: {0} becomes {1}", command, channelNumber.ToString()); + } + + foreach (char digit in channelNumber.ToString()) + { if (digit == '~') { Thread.Sleep(500); @@ -172,13 +188,15 @@ { IrssLog.Debug("Show Help"); - Console.WriteLine("IRBlast.exe -host <server> -port [port] -speed [speed] [-channel] <commands>"); + Console.WriteLine("IRBlast -host <server> [-port x] [-speed x] [-pad x] [-channel] <commands>"); Console.WriteLine(""); Console.WriteLine("Use -host to specify the computer that is hosting the IR Server."); Console.WriteLine("Use -port to blast to a particular blaster port (Optional)."); Console.WriteLine("Use -speed to set the blaster speed (Optional)."); Console.WriteLine("Use -channel to tell IR Blast to break apart the following IR Command and"); Console.WriteLine(" use each digit for a separate IR blast (Optional)."); + Console.WriteLine("Use -pad to tell IR Blast to pad channel numbers to a certain length"); + Console.WriteLine(" (Optional, Requires -channel)."); Console.WriteLine("Use a tilde ~ between commands to insert half second pauses."); Console.WriteLine(""); Console.WriteLine(""); @@ -194,10 +212,10 @@ Console.WriteLine("This would blast the \"Turn on surround.IR\" command on the MEDIAPC computer"); Console.WriteLine("to blaster port 2 at the default blaster speed."); Console.WriteLine(""); - Console.WriteLine("IRBlast -host HTPC -channel 302"); + Console.WriteLine("IRBlast -host HTPC -pad 4 -channel 302"); Console.WriteLine(""); - Console.WriteLine("This would blast the 3.IR, 0.IR, and 2.IR commands on the HTPC computer to"); - Console.WriteLine("the default blaster port at the default blaster speed."); + Console.WriteLine("This would blast the 0.IR (for padding), 3.IR, 0.IR, and 2.IR commands on"); + Console.WriteLine("the HTPC computer to the default blaster port at the default blaster speed."); Console.WriteLine(""); Console.WriteLine(""); } @@ -435,7 +453,9 @@ { switch (received.Name) { - case "Remote Button": + case "Remote Event": + case "Keyboard Event": + case "Mouse Event": break; case "Blast Success": Modified: trunk/plugins/IR Server Suite/Applications/IR Blast/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Blast/Properties/AssemblyInfo.cs 2007-08-02 00:09:20 UTC (rev 783) +++ trunk/plugins/IR Server Suite/Applications/IR Blast/Properties/AssemblyInfo.cs 2007-08-02 15:40:55 UTC (rev 784) @@ -33,7 +33,7 @@ // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.3.2")] -[assembly: AssemblyFileVersion("1.0.3.2")] +[assembly: AssemblyVersion("1.0.3.3")] +[assembly: AssemblyFileVersion("1.0.3.3")] [assembly: CLSCompliant(true)] \ No newline at end of file Modified: trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Program.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Program.cs 2007-08-02 00:09:20 UTC (rev 783) +++ trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Program.cs 2007-08-02 15:40:55 UTC (rev 784) @@ -32,6 +32,7 @@ static string _blastSpeed = "None"; static bool _treatAsChannelNumber = false; + static int _padChannelNumber = 0; #endregion Variables @@ -73,6 +74,10 @@ _treatAsChannelNumber = true; continue; + case "-pad": + int.TryParse(args[++index], out _padChannelNumber); + continue; + default: irCommands.Add(args[index]); continue; @@ -108,8 +113,19 @@ if (_treatAsChannelNumber) { IrssLog.Info("Processing channel: {0}", command); - foreach (char digit in command) + + StringBuilder channelNumber = new StringBuilder(command); + + if (_padChannelNumber > 0) { + for (int index = 0; index < _padChannelNumber - command.Length; index++) + channelNumber.Insert(0, '0'); + + IrssLog.Info("Padding channel number: {0} becomes {1}", command, channelNumber.ToString()); + } + + foreach (char digit in channelNumber.ToString()) + { if (digit == '~') { Thread.Sleep(500); @@ -141,7 +157,7 @@ } } - else + else // Give help ... { ShowHelp(); } @@ -399,7 +415,9 @@ { switch (received.Name) { - case "Remote Button": + case "Remote Event": + case "Keyboard Event": + case "Mouse Event": break; case "Blast Success": Modified: trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Properties/AssemblyInfo.cs 2007-08-02 00:09:20 UTC (rev 783) +++ trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Properties/AssemblyInfo.cs 2007-08-02 15:40:55 UTC (rev 784) @@ -33,7 +33,7 @@ // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.3.2")] -[assembly: AssemblyFileVersion("1.0.3.2")] +[assembly: AssemblyVersion("1.0.3.3")] +[assembly: AssemblyFileVersion("1.0.3.3")] [assembly: CLSCompliant(true)] \ No newline at end of file Modified: trunk/plugins/IR Server Suite/Applications/IR Server/IR Server.csproj =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/IR Server.csproj 2007-08-02 00:09:20 UTC (rev 783) +++ trunk/plugins/IR Server Suite/Applications/IR Server/IR Server.csproj 2007-08-02 15:40:55 UTC (rev 784) @@ -120,10 +120,6 @@ <Project>{CA15769C-232E-4CA7-94FD-206A06CA3ABB}</Project> <Name>IrssUtils</Name> </ProjectReference> - <ProjectReference Include="..\..\Common\MPUtils\MPUtils.csproj"> - <Project>{08F57DD7-2C6E-484E-9CC5-835F70C5BC64}</Project> - <Name>MPUtils</Name> - </ProjectReference> <ProjectReference Include="..\..\IPC\Named Pipes\Named Pipes.csproj"> <Project>{F4EA6055-7133-4F18-8971-E19ADEB482C1}</Project> <Name>Named Pipes</Name> Modified: trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2007-08-02 00:09:20 UTC (rev 783) +++ trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2007-08-02 15:40:55 UTC (rev 784) @@ -46,7 +46,7 @@ #region Constants - public static readonly string ConfigurationFile = Common.FolderAppData + "IR Server\\IR Server.xml"; + static readonly string ConfigurationFile = Common.FolderAppData + "IR Server\\IR Server.xml"; #endregion Constants @@ -98,7 +98,7 @@ /// <summary> /// Start the server /// </summary> - /// <returns>success</returns> + /// <returns>success.</returns> internal bool Start() { try @@ -202,7 +202,11 @@ } if (_pluginReceive != null && _pluginReceive.CanReceive) - _pluginReceive.RemoteButtonCallback += new RemoteButtonHandler(RemoteButtonPressed); + { + _pluginReceive.RemoteCallback += new RemoteHandler(RemoteHandlerCallback); + _pluginReceive.KeyboardCallback += new KeyboardHandler(KeyboardHandlerCallback); + _pluginReceive.MouseCallback += new MouseHandler(MouseHandlerCallback); + } _notifyIcon.Visible = true; @@ -233,7 +237,11 @@ } if (_pluginReceive != null && _pluginReceive.CanReceive) - _pluginReceive.RemoteButtonCallback -= new RemoteButtonHandler(RemoteButtonPressed); + { + _pluginReceive.RemoteCallback -= new RemoteHandler(RemoteHandlerCallback); + _pluginReceive.KeyboardCallback -= new KeyboardHandler(KeyboardHandlerCallback); + _pluginReceive.MouseCallback -= new MouseHandler(MouseHandlerCallback); + } // Stop Plugin(s) try @@ -486,36 +494,102 @@ catch { } } - void RemoteButtonPressed(string keyCode) + void RemoteHandlerCallback(string keyCode) { - IrssLog.Debug("Remote Button Pressed: {0}", keyCode); - + IrssLog.Debug("Remote Event: {0}", keyCode); + byte[] bytes = Encoding.ASCII.GetBytes(keyCode); switch (_mode) { case IRServerMode.ServerMode: { - PipeMessage message = new PipeMessage(Common.ServerPipeName, Environment.MachineName, "Remote Button", bytes); + PipeMessage message = new PipeMessage(Common.ServerPipeName, Environment.MachineName, "Remote Event", bytes); SendToAll(message); break; } case IRServerMode.RelayMode: { - PipeMessage message = new PipeMessage(_localPipeName, Environment.MachineName, "Forward Remote Button", bytes); + PipeMessage message = new PipeMessage(_localPipeName, Environment.MachineName, "Forward Remote Event", bytes); SendTo(Common.ServerPipeName, _hostComputer, message); break; } case IRServerMode.RepeaterMode: { - IrssLog.Debug("Remote button press ignored, IR Server is in Repeater Mode."); + IrssLog.Debug("Remote event ignored, IR Server is in Repeater Mode."); break; } } } + void KeyboardHandlerCallback(int vKey, bool keyUp) + { + IrssLog.Debug("Keyboard Event: {0}, keyUp: {1}", vKey, keyUp); + + byte[] bytes = new byte[8]; + BitConverter.GetBytes(vKey).CopyTo(bytes, 0); + BitConverter.GetBytes(keyUp).CopyTo(bytes, 4); + + switch (_mode) + { + case IRServerMode.ServerMode: + { + PipeMessage message = new PipeMessage(Common.ServerPipeName, Environment.MachineName, "Keyboard Event", bytes); + SendToAll(message); + break; + } + + case IRServerMode.RelayMode: + { + PipeMessage message = new PipeMessage(_localPipeName, Environment.MachineName, "Forward Keyboard Event", bytes); + SendTo(Common.ServerPipeName, _hostComputer, message); + break; + } + + case IRServerMode.RepeaterMode: + { + IrssLog.Debug("Keyboard event ignored, IR Server is in Repeater Mode."); + break; + } + } + } + + void MouseHandlerCallback(int deltaX, int deltaY, int buttons) + { + IrssLog.Debug("Mouse Event - deltaX: {0}, deltaY: {1}, buttons: {2}", deltaX, deltaY, buttons); + + byte[] bytes = new byte[12]; + BitConverter.GetBytes(deltaX).CopyTo(bytes, 0); + BitConverter.GetBytes(deltaY).CopyTo(bytes, 4); + BitConverter.GetBytes(buttons).CopyTo(bytes, 8); + + switch (_mode) + { + case IRServerMode.ServerMode: + { + PipeMessage message = new PipeMessage(Common.ServerPipeName, Environment.MachineName, "Mouse Event", bytes); + SendToAll(message); + break; + } + + case IRServerMode.RelayMode: + { + PipeMessage message = new PipeMessage(_localPipeName, Environment.MachineName, "Forward Mouse Event", bytes); + SendTo(Common.ServerPipeName, _hostComputer, message); + break; + } + + case IRServerMode.RepeaterMode: + { + IrssLog.Debug("Mouse event ignored, IR Server is in Repeater Mode."); + break; + } + } + } + + void SendToAll(PipeMessage message) { IrssLog.Debug("SendToAll({0})", message.ToString()); @@ -814,28 +888,14 @@ } byte[] data = null; - FileStream fileStream = null; try { - string tempFile = Path.GetTempFileName(); - - LearnStatus status = _pluginTransmit.Learn(tempFile); + LearnStatus status = _pluginTransmit.Learn(out data); switch (status) { case LearnStatus.Success: - fileStream = new FileStream(tempFile, FileMode.Open); - - if (fileStream != null && fileStream.Length != 0) - { - data = new byte[fileStream.Length]; - fileStream.Read(data, 0, (int)fileStream.Length); - } - - fileStream.Close(); - fileStream = null; - - File.Delete(tempFile); + IrssLog.Info("Learn IR success"); break; case LearnStatus.Failure: @@ -850,9 +910,6 @@ catch (Exception ex) { IrssLog.Error(ex.ToString()); - - if (fileStream != null) - fileStream.Close(); } return data; @@ -866,7 +923,9 @@ { switch (received.Name) { - case "Remote Button": + case "Remote Event": + case "Keyboard Event": + case "Mouse Event": break; case "Register Success": @@ -883,9 +942,9 @@ break; } - case "Forward Remote Button": + case "Forward Remote Event": { - PipeMessage forward = new PipeMessage(Common.ServerPipeName, Environment.MachineName, "Remote Button", received.Data); + PipeMessage forward = new PipeMessage(Common.ServerPipeName, Environment.MachineName, "Remote Event", received.Data); if (_mode == IRServerMode.RelayMode) { forward.Name = received.Name; @@ -898,6 +957,36 @@ break; } + case "Forward Keyboard Event": + { + PipeMessage forward = new PipeMessage(Common.ServerPipeName, Environment.MachineName, "Keyboard Event", received.Data); + if (_mode == IRServerMode.RelayMode) + { + forward.Name = received.Name; + SendTo(Common.ServerPipeName, _hostComputer, forward); + } + else + { + SendToAllExcept(received.FromPipe, received.FromServer, forward); + } + break; + } + + case "Forward Mouse Event": + { + PipeMessage forward = new PipeMessage(Common.ServerPipeName, Environment.MachineName, "Mouse Event", received.Data); + if (_mode == IRServerMode.RelayMode) + { + forward.Name = received.Name; + SendTo(Common.ServerPipeName, _hostComputer, forward); + } + else + { + SendToAllExcept(received.FromPipe, received.FromServer, forward); + } + break; + } + case "List": { if (_mode != IRServerMode.RelayMode) Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/Properties/AssemblyInfo.cs 2007-08-02 00:09:20 UTC (rev 783) +++ trunk/plugins/IR Server Suite/Applications/IR Server/Properties/AssemblyInfo.cs 2007-08-02 15:40:55 UTC (rev 784) @@ -34,8 +34,8 @@ // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.3.2")] -[assembly: AssemblyFileVersion("1.0.3.2")] +[assembly: AssemblyVersion("1.0.3.3")] +[assembly: AssemblyFileVersion("1.0.3.3")] [assembly: CLSCompliant(true)] Modified: trunk/plugins/IR Server Suite/Applications/Translator/Configuration.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Configuration.cs 2007-08-02 00:09:20 UTC (rev 783) +++ trunk/plugins/IR Server Suite/Applications/Translator/Configuration.cs 2007-08-02 15:40:55 UTC (rev 784) @@ -9,7 +9,10 @@ namespace Translator { - + + /// <summary> + /// Translator configuration. + /// </summary> [XmlRoot] public class Configuration { @@ -26,6 +29,9 @@ #region Properties + /// <summary> + /// IR Server host. + /// </summary> [XmlElement] public string ServerHost { @@ -33,6 +39,9 @@ set { _serverHost = value; } } + /// <summary> + /// System wide button mappings. + /// </summary> [XmlArray] public List<ButtonMapping> SystemWideMappings { @@ -40,6 +49,9 @@ set { _systemWideMappings = value; } } + /// <summary> + /// Program settings. + /// </summary> [XmlArray] public List<ProgramSettings> Programs { @@ -47,6 +59,9 @@ set { _programSettings = value; } } + /// <summary> + /// Mapped events. + /// </summary> [XmlArray] public List<MappedEvent> Events { Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs 2007-08-02 00:09:20 UTC (rev 783) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs 2007-08-02 15:40:55 UTC (rev 784) @@ -431,7 +431,7 @@ } else if (radioButtonWindowTitle.Checked) { - WindowList windowList = new WindowList(); + IrssUtils.Forms.WindowList windowList = new IrssUtils.Forms.WindowList(); if (windowList.ShowDialog(this) == DialogResult.OK) textBoxMsgTarget.Text = windowList.SelectedWindowTitle; } Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/EditProgramForm.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/EditProgramForm.Designer.cs 2007-08-02 00:09:20 UTC (rev 783) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/EditProgramForm.Designer.cs 2007-08-02 15:40:55 UTC (rev 784) @@ -46,13 +46,16 @@ this.comboBoxWindowStyle = new System.Windows.Forms.ComboBox(); this.labelWindowStyle = new System.Windows.Forms.Label(); this.checkBoxIgnoreSystemWide = new System.Windows.Forms.CheckBox(); + this.checkBoxForceFocus = new System.Windows.Forms.CheckBox(); + this.groupBoxOptions = new System.Windows.Forms.GroupBox(); + this.groupBoxOptions.SuspendLayout(); this.SuspendLayout(); // // textBoxApp // this.textBoxApp.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.textBoxApp.Location = new System.Drawing.Point(8, 56); + this.textBoxApp.Location = new System.Drawing.Point(8, 72); this.textBoxApp.Name = "textBoxApp"; this.textBoxApp.Size = new System.Drawing.Size(336, 20); this.textBoxApp.TabIndex = 3; @@ -60,7 +63,7 @@ // buttonLocate // this.buttonLocate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.buttonLocate.Location = new System.Drawing.Point(352, 56); + this.buttonLocate.Location = new System.Drawing.Point(352, 72); this.buttonLocate.Name = "buttonLocate"; this.buttonLocate.Size = new System.Drawing.Size(24, 20); this.buttonLocate.TabIndex = 4; @@ -72,7 +75,7 @@ // this.labelApplication.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.labelApplication.Location = new System.Drawing.Point(8, 40); + this.labelApplication.Location = new System.Drawing.Point(8, 56); this.labelApplication.Name = "labelApplication"; this.labelApplication.Size = new System.Drawing.Size(336, 16); this.labelApplication.TabIndex = 2; @@ -80,27 +83,28 @@ // // labelAppDisplayName // + this.labelAppDisplayName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.labelAppDisplayName.Location = new System.Drawing.Point(8, 8); this.labelAppDisplayName.Name = "labelAppDisplayName"; - this.labelAppDisplayName.Size = new System.Drawing.Size(144, 20); + this.labelAppDisplayName.Size = new System.Drawing.Size(368, 16); this.labelAppDisplayName.TabIndex = 0; this.labelAppDisplayName.Text = "Application display name:"; - this.labelAppDisplayName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // textBoxDisplayName // this.textBoxDisplayName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.textBoxDisplayName.Location = new System.Drawing.Point(152, 8); + this.textBoxDisplayName.Location = new System.Drawing.Point(8, 24); this.textBoxDisplayName.Name = "textBoxDisplayName"; - this.textBoxDisplayName.Size = new System.Drawing.Size(224, 20); + this.textBoxDisplayName.Size = new System.Drawing.Size(368, 20); this.textBoxDisplayName.TabIndex = 1; // // labelStartupFolder // this.labelStartupFolder.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.labelStartupFolder.Location = new System.Drawing.Point(8, 88); + this.labelStartupFolder.Location = new System.Drawing.Point(8, 104); this.labelStartupFolder.Name = "labelStartupFolder"; this.labelStartupFolder.Size = new System.Drawing.Size(336, 16); this.labelStartupFolder.TabIndex = 5; @@ -109,7 +113,7 @@ // buttonStartupFolder // this.buttonStartupFolder.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.buttonStartupFolder.Location = new System.Drawing.Point(352, 104); + this.buttonStartupFolder.Location = new System.Drawing.Point(352, 120); this.buttonStartupFolder.Name = "buttonStartupFolder"; this.buttonStartupFolder.Size = new System.Drawing.Size(24, 20); this.buttonStartupFolder.TabIndex = 7; @@ -121,7 +125,7 @@ // this.textBoxAppStartFolder.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.textBoxAppStartFolder.Location = new System.Drawing.Point(8, 104); + this.textBoxAppStartFolder.Location = new System.Drawing.Point(8, 120); this.textBoxAppStartFolder.Name = "textBoxAppStartFolder"; this.textBoxAppStartFolder.Size = new System.Drawing.Size(336, 20); this.textBoxAppStartFolder.TabIndex = 6; @@ -130,7 +134,7 @@ // this.labelAppParams.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.labelAppParams.Location = new System.Drawing.Point(8, 136); + this.labelAppParams.Location = new System.Drawing.Point(8, 152); this.labelAppParams.Name = "labelAppParams"; this.labelAppParams.Size = new System.Drawing.Size(368, 16); this.labelAppParams.TabIndex = 8; @@ -140,7 +144,7 @@ // this.textBoxApplicationParameters.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.textBoxApplicationParameters.Location = new System.Drawing.Point(8, 152); + this.textBoxApplicationParameters.Location = new System.Drawing.Point(8, 168); this.textBoxApplicationParameters.Name = "textBoxApplicationParameters"; this.textBoxApplicationParameters.Size = new System.Drawing.Size(368, 20); this.textBoxApplicationParameters.TabIndex = 9; @@ -148,10 +152,10 @@ // buttonOK // this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.buttonOK.Location = new System.Drawing.Point(224, 248); + this.buttonOK.Location = new System.Drawing.Point(224, 336); this.buttonOK.Name = "buttonOK"; this.buttonOK.Size = new System.Drawing.Size(72, 24); - this.buttonOK.TabIndex = 15; + this.buttonOK.TabIndex = 14; this.buttonOK.Text = "OK"; this.buttonOK.UseVisualStyleBackColor = true; this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click); @@ -160,10 +164,10 @@ // this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.buttonCancel.Location = new System.Drawing.Point(304, 248); + this.buttonCancel.Location = new System.Drawing.Point(304, 336); this.buttonCancel.Name = "buttonCancel"; this.buttonCancel.Size = new System.Drawing.Size(72, 24); - this.buttonCancel.TabIndex = 16; + this.buttonCancel.TabIndex = 15; this.buttonCancel.Text = "Cancel"; this.buttonCancel.UseVisualStyleBackColor = true; this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click); @@ -171,20 +175,20 @@ // buttonTest // this.buttonTest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.buttonTest.Location = new System.Drawing.Point(8, 248); + this.buttonTest.Location = new System.Drawing.Point(8, 336); this.buttonTest.Name = "buttonTest"; this.buttonTest.Size = new System.Drawing.Size(72, 24); - this.buttonTest.TabIndex = 14; + this.buttonTest.TabIndex = 13; this.buttonTest.Text = "Test"; this.buttonTest.UseVisualStyleBackColor = true; this.buttonTest.Click += new System.EventHandler(this.buttonTest_Click); // // checkBoxShellExecute // - this.checkBoxShellExecute.Location = new System.Drawing.Point(8, 216); + this.checkBoxShellExecute.Location = new System.Drawing.Point(16, 24); this.checkBoxShellExecute.Name = "checkBoxShellExecute"; this.checkBoxShellExecute.Size = new System.Drawing.Size(176, 24); - this.checkBoxShellExecute.TabIndex = 12; + this.checkBoxShellExecute.TabIndex = 0; this.checkBoxShellExecute.Text = "Start using ShellExecute"; this.checkBoxShellExecute.UseVisualStyleBackColor = true; // @@ -194,7 +198,7 @@ | System.Windows.Forms.AnchorStyles.Right))); this.comboBoxWindowStyle.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBoxWindowStyle.FormattingEnabled = true; - this.comboBoxWindowStyle.Location = new System.Drawing.Point(96, 184); + this.comboBoxWindowStyle.Location = new System.Drawing.Point(96, 200); this.comboBoxWindowStyle.MaxDropDownItems = 4; this.comboBoxWindowStyle.Name = "comboBoxWindowStyle"; this.comboBoxWindowStyle.Size = new System.Drawing.Size(152, 21); @@ -202,7 +206,7 @@ // // labelWindowStyle // - this.labelWindowStyle.Location = new System.Drawing.Point(8, 184); + this.labelWindowStyle.Location = new System.Drawing.Point(8, 200); this.labelWindowStyle.Name = "labelWindowStyle"; this.labelWindowStyle.Size = new System.Drawing.Size(88, 21); this.labelWindowStyle.TabIndex = 10; @@ -211,22 +215,44 @@ // // checkBoxIgnoreSystemWide // - this.checkBoxIgnoreSystemWide.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.checkBoxIgnoreSystemWide.Location = new System.Drawing.Point(200, 216); + this.checkBoxIgnoreSystemWide.Location = new System.Drawing.Point(16, 56); this.checkBoxIgnoreSystemWide.Name = "checkBoxIgnoreSystemWide"; this.checkBoxIgnoreSystemWide.Size = new System.Drawing.Size(176, 24); - this.checkBoxIgnoreSystemWide.TabIndex = 13; + this.checkBoxIgnoreSystemWide.TabIndex = 2; this.checkBoxIgnoreSystemWide.Text = "Ignore System-Wide mappings"; this.checkBoxIgnoreSystemWide.UseVisualStyleBackColor = true; // + // checkBoxForceFocus + // + this.checkBoxForceFocus.Location = new System.Drawing.Point(208, 24); + this.checkBoxForceFocus.Name = "checkBoxForceFocus"; + this.checkBoxForceFocus.Size = new System.Drawing.Size(152, 24); + this.checkBoxForceFocus.TabIndex = 1; + this.checkBoxForceFocus.Text = "Force window focus"; + this.checkBoxForceFocus.UseVisualStyleBackColor = true; + // + // groupBoxOptions + // + this.groupBoxOptions.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBoxOptions.Controls.Add(this.checkBoxShellExecute); + this.groupBoxOptions.Controls.Add(this.checkBoxForceFocus); + this.groupBoxOptions.Controls.Add(this.checkBoxIgnoreSystemWide); + this.groupBoxOptions.Location = new System.Drawing.Point(8, 232); + this.groupBoxOptions.Name = "groupBoxOptions"; + this.groupBoxOptions.Size = new System.Drawing.Size(368, 88); + this.groupBoxOptions.TabIndex = 12; + this.groupBoxOptions.TabStop = false; + this.groupBoxOptions.Text = "Options"; + // // EditProgramForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(384, 281); - this.Controls.Add(this.checkBoxIgnoreSystemWide); + this.ClientSize = new System.Drawing.Size(384, 369); + this.Controls.Add(this.groupBoxOptions); this.Controls.Add(this.buttonTest); - this.Controls.Add(this.checkBoxShellExecute); this.Controls.Add(this.comboBoxWindowStyle); this.Controls.Add(this.labelWindowStyle); this.Controls.Add(this.buttonCancel); @@ -248,6 +274,7 @@ this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Application"; + this.groupBoxOptions.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); @@ -272,5 +299,7 @@ private System.Windows.Forms.ComboBox comboBoxWindowStyle; private System.Windows.Forms.Label labelWindowStyle; private System.Windows.Forms.CheckBox checkBoxIgnoreSystemWide; + private System.Windows.Forms.CheckBox checkBoxForceFocus; + private System.Windows.Forms.GroupBox groupBoxOptions; } } \ No newline at end of file Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/EditProgramForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/EditProgramForm.cs 2007-08-02 00:09:20 UTC (rev 783) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/EditProgramForm.cs 2007-08-02 15:40:55 UTC (rev 784) @@ -6,6 +6,7 @@ using System.Drawing; using System.IO; using System.Text; +using System.Threading; using System.Windows.Forms; using IrssUtils; @@ -48,6 +49,11 @@ get { return checkBoxShellExecute.Checked; } set { checkBoxShellExecute.Checked = value; } } + public bool ForceWindowFocus + { + get { return checkBoxForceFocus.Checked; } + set { checkBoxForceFocus.Checked = value; } + } public bool IgnoreSystemWide { get { return checkBoxIgnoreSystemWide.Checked; } @@ -66,13 +72,14 @@ if (progSettings != null) { - DisplayName = progSettings.Name; - Filename = progSettings.Filename; - StartupFolder = progSettings.Folder; - Parameters = progSettings.Arguments; - StartState = progSettings.WindowState; - UseShellExecute = progSettings.UseShellExecute; - IgnoreSystemWide = progSettings.IgnoreSystemWide; + DisplayName = progSettings.Name; + Filename = progSettings.Filename; + StartupFolder = progSettings.Folder; + Parameters = progSettings.Arguments; + StartState = progSettings.WindowState; + UseShellExecute = progSettings.UseShellExecute; + ForceWindowFocus = progSettings.ForceWindowFocus; + IgnoreSystemWide = progSettings.IgnoreSystemWide; } } @@ -114,15 +121,33 @@ try { Process process = new Process(); - process.StartInfo.FileName = Filename; - process.StartInfo.WorkingDirectory = StartupFolder; - process.StartInfo.Arguments = Parameters; - process.StartInfo.WindowStyle = StartState; - process.StartInfo.UseShellExecute = UseShellExecute; + process.StartInfo.FileName = Filename; + process.StartInfo.WorkingDirectory = StartupFolder; + process.StartInfo.Arguments = Parameters; + process.StartInfo.WindowStyle = StartState; + process.StartInfo.UseShellExecute = UseShellExecute; IrssLog.Info("Launching program {0}", DisplayName); process.Start(); + + // Give new process focus ... + if (StartState != ProcessWindowStyle.Hidden && ForceWindowFocus) + { + IntPtr processWindow = IntPtr.Zero; + while (!process.HasExited) + { + processWindow = process.MainWindowHandle; + if (processWindow != IntPtr.Zero) + { + Win32.SetForegroundWindow(processWindow); + break; + } + + Thread.Sleep(500); + } + } + } catch (Exception ex) { Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/GetKeyCodeForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/GetKeyCodeForm.cs 2007-08-02 00:09:20 UTC (rev 783) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/GetKeyCodeForm.cs 2007-08-02 15:40:55 UTC (rev 784) @@ -61,7 +61,7 @@ { PipeMessage received = PipeMessage.FromString(message); - if (received.Name == "Remote Button") + if (received.Name == "Remote Event") { _keyCode = Encoding.ASCII.GetString(received.Data); Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs 2007-08-02 00:09:20 UTC (rev 783) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs 2007-08-02 15:40:55 UTC (rev 784) @@ -20,7 +20,7 @@ #region Enumerations /// <summary> - /// A list of MCE remote buttons + /// A list of MCE remote buttons. /// </summary> public enum MceButton { @@ -881,7 +881,7 @@ } private void aboutToolStripMenuItem_Click(object sender, EventArgs e) { - MessageBox.Show(this, "Translator\nVersion 1.0.3.2 for IR Server Suite\nBy Aaron Dinnage, 2007", "About Translator", MessageBoxButtons.OK, MessageBoxIcon.Information); + MessageBox.Show(this, "Translator\nVersion 1.0.3.3 for IR Server Suite\nBy Aaron Dinnage, 2007", "About Translator", MessageBoxButtons.OK, MessageBoxIcon.Information); } #endregion Menu Deleted: trunk/plugins/IR Server Suite/Applications/Translator/Forms/WindowList.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/WindowList.Designer.cs 2007-08-02 00:09:20 UTC (rev 783) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/WindowList.Designer.cs 2007-08-02 15:40:55 UTC (rev 784) @@ -1,70 +0,0 @@ -namespace Translator -{ - partial class WindowList - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { - this.listBoxWindows = new System.Windows.Forms.ListBox(); - this.SuspendLayout(); - // - // listBoxWindows - // - this.listBoxWindows.Dock = System.Windows.Forms.DockStyle.Fill; - this.listBoxWindows.FormattingEnabled = true; - this.listBoxWindows.HorizontalScrollbar = true; - this.listBoxWindows.IntegralHeight = false; - this.listBoxWindows.Location = new System.Drawing.Point(0, 0); - this.listBoxWindows.Name = "listBoxWindows"; - this.listBoxWindows.Size = new System.Drawing.Size(292, 376); - this.listBoxWindows.TabIndex = 0; - this.listBoxWindows.DoubleClick += new System.EventHandler(this.listBoxWindows_DoubleClick); - this.listBoxWindows.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.listBoxWindows_KeyPress); - // - // WindowList - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(292, 376); - this.Controls.Add(this.listBoxWindows); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "WindowList"; - this.ShowIcon = false; - this.ShowInTaskbar = false; - this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "Window List"; - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.ListBox listBoxWindows; - } -} \ No newline at end of file Deleted: trunk/plugins/IR Server Suite/Applications/Translator/Forms/WindowList.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/WindowList.cs 2007-08-02 00:09:20 UTC (rev 783) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/WindowList.cs 2007-08-02 15:40:55 UTC (rev 784) @@ -1,83 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Runtime.InteropServices; -using System.Text; -using System.Windows.Forms; - -namespace Translator -{ - - public partial class WindowList : Form - { - - #region Interop - - public delegate bool EnumWindowsProc(int hWnd, int lParam); - - [DllImport("user32.dll")] - private static extern int GetWindowText(int hWnd, StringBuilder title, int size); - - [DllImport("user32.dll")] - private static extern int EnumWindows(EnumWindowsProc ewp, int lParam); - - #endregion Interop - - #region Properties - - public string SelectedWindowTitle - { - get { return listBoxWindows.SelectedItem as string; } - } - - #endregion Properties - - #region Constructor - - public WindowList() - { - InitializeComponent(); - - PopulateList(); - } - - #endregion Constructor - - void PopulateList() - { - EnumWindowsProc ewp = new EnumWindowsProc(AddWindow); - - EnumWindows(ewp, 0); - } - - bool AddWindow(int hWnd, int lParam) - { - StringBuilder title = new StringBuilder(256); - GetWindowText(hWnd, title, 256); - - if (title.Length != 0) - listBoxWindows.Items.Add(title.ToString()); - - return true; - } - - private void listBoxWindows_DoubleClick(object sender, EventArgs e) - { - this.DialogResult = DialogResult.OK; - this.Close(); - } - - private void listBoxWindows_KeyPress(object sender, KeyPressEventArgs e) - { - if (e.KeyChar == 27) - { - this.DialogResult = DialogResult.Cancel; - this.Close(); - } - } - - } - -} Deleted: trunk/plugins/IR Server Suite/Applications/Translator/Forms/WindowList.resx =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/WindowList.resx 2007-08-02 00:09:20 UTC (rev 783) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/WindowList.resx 2007-08-02 15:40:55 UTC (rev 784) @@ -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/IR Server Suite/Applications/Translator/MappedEvent.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/MappedEvent.cs 2007-08-02 00:09:20 UTC (rev 783) +++ trunk/plugins/IR Server Suite/Applications/Translator/MappedEvent.cs 2007-08-02 15:40:55 UTC (rev 784) @@ -9,72 +9,24 @@ #region Enumerations /// <summary> - /// A list of events that can be mapped in the Event Mapper + /// A list of events that can be mapped in the Event Mapper. /// </summary> public enum MappingEvent { None, - //Time_Schedule, - //Program_Launch, Translator_Start, Translator_Quit, PC_Shutdown, PC_Suspend, PC_Resume, PC_Logoff, + Scheduled_Event, } - #region TODO - /* - public enum ScheduleRepeatDelay - { - // Repeat - In_1_Minute, - In_5_Minutes, - In_10_Minutes, - In_15_Minutes, - In_30_Minutes, - In_45_Minutes, - In_1_Hour, - In_2_Hours, - In_6_Hours, - In_12_Hours, - In_24_Hours, - In_48_Hours, - In_7_Days, - In_14_Days, - In_21_Days, - In_28_Days, - In_60_Days, - In_365_Days, - - // When - At_Noon, - At_Midnight, - At_6_AM, - At_6_PM, - - // Repeat? - Weekdays, - Weekends, - Mondays, - Tuesdays, - Wednesdays, - Thursdays, - Fridays, - Saturdays, - Sundays, - - - } - */ - - #endregion TODO - #endregion Enumerations /// <summary> - /// MappedEvent class is used to pass events into the Event Mapper feature + /// MappedEvent class is used to pass events into the Event Mapper feature. /// </summary> public class MappedEvent { @@ -83,13 +35,15 @@ MappingEvent _eventType; string _command; - + + //EventSchedule _schedule; + #endregion Variables #region Properties /// <summary> - /// Type of event + /// Type of event. /// </summary> [XmlAttribute] public MappingEvent EventType @@ -99,7 +53,7 @@ } /// <summary> - /// Command to execute when mapped event occurs + /// Command to execute when mapped event occurs. /// </summary> [XmlAttribute] public string Command @@ -113,15 +67,15 @@ #region Constructors /// <summary> - /// Default constructor + /// Default constructor. /// </summary> public MappedEvent() : this(MappingEvent.None, String.Empty) { } /// <summary> - /// Used to run the Event Mapper + /// Used to run the Event Mapper. /// </summary> - /// <param name="eventType">Event to act on</param> - /// <param name="command">Command to execute when event occurs</param> + /// <param name="eventType">Event to act on.</param> + /// <param name="command">Command to execute when event occurs.</param... [truncated message content] |
From: <nor...@us...> - 2007-08-02 00:09:22
|
Revision: 783 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=783&view=rev Author: northern_sky Date: 2007-08-01 17:09:20 -0700 (Wed, 01 Aug 2007) Log Message: ----------- misc: etc parameters. imoprts blazing fast now Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/GamebaseImport.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemDirectoryCache.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemFactory.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemGrouper.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/BaseItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/FileItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/FilelinkItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramSort.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramViewHandler.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/skin/BlueTwo/myprograms.xml trunk/plugins/myGUIProgramsAlt/README.txt Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs 2007-08-01 14:33:47 UTC (rev 782) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs 2007-08-02 00:09:20 UTC (rev 783) @@ -38,98 +38,98 @@ namespace GUIPrograms.Database { - /// <summary> - /// DBhandling methods - /// </summary> - public class DatabaseHandler - { + /// <summary> + /// DBhandling methods + /// </summary> + public class DatabaseHandler + { - private static SQLiteConnection sqlLiteConn = null; + private static SQLiteConnection sqlLiteConn = null; - static List<ApplicationItem> globalApplicationItemList = new List<ApplicationItem>(); - private const string DATABASEFILE = "myProgramsAltDatabaseV1.db3"; + static List<ApplicationItem> globalApplicationItemList = new List<ApplicationItem>(); + private const string DATABASEFILE = "myProgramsAltDatabaseV1.db3"; - public static bool useMPsThumbDirectory = false; + public static bool useMPsThumbDirectory = false; - // singleton. Dont allow any instance of this class - private DatabaseHandler() { } + // singleton. Dont allow any instance of this class + private DatabaseHandler() { } - static DatabaseHandler() - { - string DatabasePath = Config.GetFile(Config.Dir.Database, DATABASEFILE); + static DatabaseHandler() + { + string DatabasePath = Config.GetFile( Config.Dir.Database, DATABASEFILE ); - try - { + try + { - //check if database exists - if (!File.Exists(DatabasePath)) - { - SQLiteConnection.CreateFile(Config.GetFile(Config.Dir.Database, DATABASEFILE)); - string connString = "Data Source=" + Config.GetFile(Config.Dir.Database, DATABASEFILE); - sqlLiteConn = new SQLiteConnection(connString); - - SetPragmas(); + //check if database exists + if ( !File.Exists( DatabasePath ) ) + { + SQLiteConnection.CreateFile( Config.GetFile( Config.Dir.Database, DATABASEFILE ) ); + string connString = "Data Source=" + Config.GetFile( Config.Dir.Database, DATABASEFILE ); + sqlLiteConn = new SQLiteConnection( connString ); - // make sure the DB-structure is complete - CreateDBTables(); + SetPragmas(); - //fill upp some default lexicon values - InsertDefaultDBValues(); - } - else - { - string connString = "Data Source=" + Config.GetFile(Config.Dir.Database, DATABASEFILE) + ";Version=3"; - sqlLiteConn = new SQLiteConnection(connString); - } - //globalApplicationItemList = new ApplicationItemList(sqlDB, new ApplicationItem.FilelinkLaunchEventHandler(LaunchFilelink)); - LoadAllApplicationItems(); - } - catch (SQLiteException ex) - { - Log.Info("programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); - } - } - static private void SetPragmas() - { - ExecuteStmtNonQuery("PRAGMA default_cache_size=3000"); - ExecuteStmtNonQuery("PRAGMA count_changes=1"); - ExecuteStmtNonQuery("PRAGMA short_column_names=1"); - ExecuteStmtNonQuery("PRAGMA auto_vacuum=1"); + // make sure the DB-structure is complete + CreateDBTables(); - } + //fill upp some default lexicon values + InsertDefaultDBValues(); + } + else + { + string connString = "Data Source=" + Config.GetFile( Config.Dir.Database, DATABASEFILE ) + ";Version=3"; + sqlLiteConn = new SQLiteConnection( connString ); + } + //globalApplicationItemList = new ApplicationItemList(sqlDB, new ApplicationItem.FilelinkLaunchEventHandler(LaunchFilelink)); + LoadAllApplicationItems(); + } + catch ( SQLiteException ex ) + { + Log.Info( "programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace ); + } + } + static private void SetPragmas() + { + ExecuteStmtNonQuery( "PRAGMA default_cache_size=3000" ); + ExecuteStmtNonQuery( "PRAGMA count_changes=1" ); + ExecuteStmtNonQuery( "PRAGMA short_column_names=1" ); + ExecuteStmtNonQuery( "PRAGMA auto_vacuum=1" ); - /*static void LaunchFilelink(FilelinkItem curLink, bool MPGUIMode) - { - ApplicationItem targetApp = globalApplicationItemList.GetAppByID(curLink.TargetAppID); - if (targetApp != null) - { - targetApp.LaunchFile(curLink, MPGUIMode); - } - }*/ + } - // we can always keep an connection open in sqllite.. - //to expensive closing it - public static SQLiteConnection SqlLiteConn - { - get - { - if (sqlLiteConn.State == ConnectionState.Closed) - { - sqlLiteConn.Open(); - } - return sqlLiteConn; - } - } + /*static void LaunchFilelink(FilelinkItem curLink, bool MPGUIMode) + { + ApplicationItem targetApp = globalApplicationItemList.GetAppByID(curLink.TargetAppID); + if (targetApp != null) + { + targetApp.LaunchFile(curLink, MPGUIMode); + } + }*/ - /// <summary> - /// Create db tables etc,if not already exist - /// </summary> - /// <returns></returns> - static bool CreateDBTables() - { - string sqlStmt = @"CREATE TABLE - tblApplicationItem + // we can always keep an connection open in sqllite.. + //to expensive closing it + public static SQLiteConnection SqlLiteConn + { + get + { + if ( sqlLiteConn.State == ConnectionState.Closed ) + { + sqlLiteConn.Open(); + } + return sqlLiteConn; + } + } + + /// <summary> + /// Create db tables etc,if not already exist + /// </summary> + /// <returns></returns> + static bool CreateDBTables() + { + string sqlStmt = @"CREATE TABLE + tblApplicationItem ( applicationId INTEGER PRIMARY KEY, fatherNodeId INTEGER, @@ -157,56 +157,56 @@ )"; - ExecuteStmtNonQuery(sqlStmt); + ExecuteStmtNonQuery( sqlStmt ); - sqlStmt = @"CREATE TABLE tblFileItem (fileid INTEGER PRIMARY KEY, applicationId INTEGER, title TEXT, filename TEXT, imagefile TEXT, mainGenreId INTEGER, subGenreId INTEGER, country TEXT, manufacturerId INTEGER, year INTEGER, rating INTEGER, overview TEXT, platformId INTEGER, lastTimeLaunched TEXT, launchcount INTEGER, isfolder BOOL, categorydata TEXT, gameInfoUrl TEXT)"; - ExecuteStmtNonQuery(sqlStmt); - sqlStmt = @"CREATE TABLE tblFilterItem (applicationId INTEGER, grouperAppID INTEGER, fileID INTEGER, filename TEXT, tag INTEGER)"; - ExecuteStmtNonQuery(sqlStmt); - sqlStmt = @"CREATE TABLE tblSetting (settingid INTEGER PRIMARY KEY, key TEXT, value TEXT)"; - ExecuteStmtNonQuery(sqlStmt); + sqlStmt = @"CREATE TABLE tblFileItem (fileid INTEGER PRIMARY KEY, applicationId INTEGER, title TEXT, filename TEXT, imagefile TEXT, mainGenreId INTEGER, subGenreId INTEGER, country TEXT, manufacturerId INTEGER, year INTEGER, rating INTEGER, overview TEXT, platformId INTEGER, lastTimeLaunched TEXT, launchcount INTEGER, categorydata TEXT, gameInfoUrl TEXT)"; + ExecuteStmtNonQuery( sqlStmt ); + sqlStmt = @"CREATE TABLE tblFilterItem (applicationId INTEGER, grouperAppID INTEGER, fileID INTEGER, filename TEXT, tag INTEGER)"; + ExecuteStmtNonQuery( sqlStmt ); + sqlStmt = @"CREATE TABLE tblSetting (settingid INTEGER PRIMARY KEY, key TEXT, value TEXT)"; + ExecuteStmtNonQuery( sqlStmt ); - sqlStmt = @"CREATE TABLE + sqlStmt = @"CREATE TABLE tblGenre ( genreId INTEGER PRIMARY KEY, genre TEXT )"; - ExecuteStmtNonQuery(sqlStmt); - sqlStmt = @"CREATE TABLE + ExecuteStmtNonQuery( sqlStmt ); + sqlStmt = @"CREATE TABLE tblPlatform ( platformId INTEGER PRIMARY KEY, platform TEXT )"; - ExecuteStmtNonQuery(sqlStmt); - sqlStmt = @"CREATE TABLE + ExecuteStmtNonQuery( sqlStmt ); + sqlStmt = @"CREATE TABLE tblManufacturer ( manufacturerId INTEGER PRIMARY KEY, manufacturer TEXT )"; - ExecuteStmtNonQuery(sqlStmt); + ExecuteStmtNonQuery( sqlStmt ); - sqlStmt = @"CREATE INDEX idxFile1 ON tblFileItem(applicationId)"; - ExecuteStmtNonQuery(sqlStmt); - sqlStmt = @"CREATE INDEX idxApp1 ON tblApplicationItem(fatherNodeId)"; - ExecuteStmtNonQuery(sqlStmt); - sqlStmt = @"CREATE UNIQUE INDEX idxFilterItem1 ON tblFilterItem(applicationId, fileID, grouperAppID)"; - ExecuteStmtNonQuery(sqlStmt); + sqlStmt = @"CREATE INDEX idxFile1 ON tblFileItem(applicationId)"; + ExecuteStmtNonQuery( sqlStmt ); + sqlStmt = @"CREATE INDEX idxApp1 ON tblApplicationItem(fatherNodeId)"; + ExecuteStmtNonQuery( sqlStmt ); + sqlStmt = @"CREATE UNIQUE INDEX idxFilterItem1 ON tblFilterItem(applicationId, fileID, grouperAppID)"; + ExecuteStmtNonQuery( sqlStmt ); - return true; - } + return true; + } - /// <summary> - /// Inserting some default values so that the db is preloaded - /// Should always be there. - /// </summary> - private static void InsertDefaultDBValues() - { + /// <summary> + /// Inserting some default values so that the db is preloaded + /// Should always be there. + /// </summary> + private static void InsertDefaultDBValues() + { - string sqlStmt = @"INSERT INTO + string sqlStmt = @"INSERT INTO tblGenre ( genre @@ -216,9 +216,9 @@ 'Unknown' )"; - ExecuteStmtNonQuery(sqlStmt); + ExecuteStmtNonQuery( sqlStmt ); - sqlStmt = @"INSERT INTO + sqlStmt = @"INSERT INTO tblManufacturer ( manufacturer @@ -229,9 +229,9 @@ )"; - ExecuteStmtNonQuery(sqlStmt); + ExecuteStmtNonQuery( sqlStmt ); - sqlStmt = @"INSERT INTO + sqlStmt = @"INSERT INTO tblPlatform ( platform @@ -241,45 +241,53 @@ 'Unknown' )"; - ExecuteStmtNonQuery(sqlStmt); + ExecuteStmtNonQuery( sqlStmt ); - FillDefaultDBLexiconHelper("tblPlatform", "platform", CreateSystemLexiconList()); - FillDefaultDBLexiconHelper("tblManufacturer", "manufacturer", CreateManufacturerLexiconList()); - FillDefaultDBLexiconHelper("tblGenre", "genre", CreateGenreLexiconList()); - } + using ( SQLiteTransaction transaction = SqlLiteConn.BeginTransaction() ) + { + FillDefaultDBLexiconHelper( "tblPlatform", "platform", CreateSystemLexiconList() ); + FillDefaultDBLexiconHelper( "tblManufacturer", "manufacturer", CreateManufacturerLexiconList() ); + FillDefaultDBLexiconHelper( "tblGenre", "genre", CreateGenreLexiconList() ); - private static void FillDefaultDBLexiconHelper(string tableName, string columnName, List<string> itemList) - {// dont support parameters..... yet at least - //AND mediaportals sqlite support dont support multiple inserst with ; bettween... gaaa - //change to to net provider as soon as we can + transaction.Commit(); + } - string sqlStmt = string.Empty; + } - foreach (string insertValue in itemList) - { - sqlStmt = @" + private static void FillDefaultDBLexiconHelper(string tableName, string columnName, List<string> itemList) + { + SQLiteParameter[] paramCollection = new SQLiteParameter[1]; + SQLiteParameter paramInsertValue = new SQLiteParameter( "@insertValue", DbType.String ); + paramCollection[0] = paramInsertValue; + + string sqlStmt = @" INSERT INTO - " + tableName + @" + " + tableName + @" ( - " + columnName + @" + " + columnName + @" ) VALUES ( - '" + insertValue + @"' + @insertValue );"; - ExecuteStmtNonQuery(sqlStmt); - } - } + foreach ( string insertValue in itemList ) + { - #region dbsettings - static public string ReadSetting(string Key) - { - string sqlStmt = string.Empty; - string keyValue = string.Empty; - sqlStmt = @" + paramCollection[0].Value = insertValue; + ExecuteStmtNonQuery( sqlStmt, paramCollection ); + } + } + + #region dbsettings + static public string ReadSetting(string Key) + { + string sqlStmt = string.Empty; + + string keyValue = string.Empty; + sqlStmt = @" SELECT value @@ -290,19 +298,19 @@ key ='" + Key + "'"; - object o = ExecuteStmtScalar(sqlStmt); - if (o != null) - { - keyValue = o.ToString(); - } - return keyValue; - } + object o = ExecuteStmtScalar( sqlStmt ); + if ( o != null ) + { + keyValue = o.ToString(); + } + return keyValue; + } - static int CountKey(string Key) - { - string sqlStmt = string.Empty; - int keyValue = 0; - sqlStmt = @" + static int CountKey(string Key) + { + string sqlStmt = string.Empty; + int keyValue = 0; + sqlStmt = @" SELECT COUNT(*) @@ -311,22 +319,22 @@ WHERE key ='" + Key + "'"; - keyValue = Convert.ToInt32(ExecuteStmtScalar(sqlStmt)); - return keyValue; - } + keyValue = Convert.ToInt32( ExecuteStmtScalar( sqlStmt ) ); + return keyValue; + } - static public bool KeyExists(string Key) - { - return (CountKey(Key) > 0); - } + static public bool KeyExists(string Key) + { + return ( CountKey( Key ) > 0 ); + } - static public void WriteSetting(string Key, string Value) - { - string sqlStmt = string.Empty; + static public void WriteSetting(string Key, string Value) + { + string sqlStmt = string.Empty; - if (KeyExists(Key)) - { - sqlStmt = @" + if ( KeyExists( Key ) ) + { + sqlStmt = @" UPDATE tblSetting @@ -336,30 +344,34 @@ WHERE key = '" + Key + "'"; - } - else - { - sqlStmt = @" + } + else + { + sqlStmt = @" INSERT INTO tblSetting (key, value) VALUES('" + Key + "', '" + Value + "')"; - } - ExecuteStmtNonQuery(sqlStmt); - } + } + ExecuteStmtNonQuery( sqlStmt ); + } - static public void DeleteSetting(string Key) - { + static public void DeleteSetting(string Key) + { - string sqlStmt = "DELETE FROM tblSetting WHERE key = '" + Key + "'"; - ExecuteStmtNonQuery(sqlStmt); - } - #endregion dbsettings + string sqlStmt = "DELETE FROM tblSetting WHERE key = '" + Key + "'"; + ExecuteStmtNonQuery( sqlStmt ); + } + #endregion dbsettings - public static int LexiconDataExists(string tableName, string columnName, string fieldValue) - { + public static int LexiconDataExists(string tableName, string columnName, string fieldValue) + { - string sqlStmt = @" + SQLiteParameter[] parameterArray = new SQLiteParameter[1]; + parameterArray[0] = GetParameter<string>( fieldValue, "@fieldValue", DbType.String ); + + + string sqlStmt = @" SELECT " + columnName + @"id @@ -367,9 +379,9 @@ " + tableName + @" WHERE - " + columnName + @" LIKE '" + ProgramUtils.Encode(fieldValue) + "'"; + " + columnName + @" LIKE @fieldValue"; - string sqlStmtInsert = @" + string sqlStmtInsert = @" INSERT INTO " + tableName + @" ( @@ -377,167 +389,227 @@ ) VALUES ( - '" + ProgramUtils.Encode(fieldValue) + @"' + @fieldValue );"; - try - { + try + { - object o = ExecuteStmtScalar(sqlStmt); + int lexiconId= ExecuteStmtScalar<Int32>( sqlStmt, parameterArray); - //lexion didnt exist, we save it - if (o == null) - { - ExecuteStmtNonQuery(sqlStmtInsert); - return Convert.ToInt32(ExecuteStmtScalar(sqlStmt)); - } - else - { - return Convert.ToInt32(o); - } - } - catch (SQLiteException ex) - { - throw ex; - } - } + //lexion didnt exist, we save it + if ( lexiconId == 0 ) + { + ExecuteStmtNonQuery( sqlStmtInsert,parameterArray ); + return ExecuteStmtScalar<Int32>( sqlStmt,parameterArray ); + } + else + { + return lexiconId; + } + } + catch ( SQLiteException ex ) + { + throw ex; + } + } - #region default lexiconvalues - private static List<string> CreateGenreLexiconList() - { - List<string> genreList = new List<string>(); + #region default lexiconvalues + private static List<string> CreateGenreLexiconList() + { + List<string> genreList = new List<string>(); - genreList.Add("Shooter"); - genreList.Add("Platform"); - genreList.Add("Adventure"); + genreList.Add( "Shooter" ); + genreList.Add( "Platform" ); + genreList.Add( "Adventure" ); - return genreList; - } + return genreList; + } - private static List<string> CreateManufacturerLexiconList() - { - List<string> manufacturerList = new List<string>(); + private static List<string> CreateManufacturerLexiconList() + { + List<string> manufacturerList = new List<string>(); - manufacturerList.Add("Sega"); - manufacturerList.Add("Nintendo"); - manufacturerList.Add("Konami"); + manufacturerList.Add( "Sega" ); + manufacturerList.Add( "Nintendo" ); + manufacturerList.Add( "Konami" ); - return manufacturerList; - } + return manufacturerList; + } - private static List<string> CreateSystemLexiconList() - { - List<string> systemList = new List<string>(); + private static List<string> CreateSystemLexiconList() + { + List<string> systemList = new List<string>(); - systemList.Add("Sega Mastersystem"); - systemList.Add("Arcade"); - systemList.Add("PC"); - return systemList; - } + systemList.Add( "Sega Mastersystem" ); + systemList.Add( "Arcade" ); + systemList.Add( "PC" ); + return systemList; + } - #endregion default lexiconvalues + #endregion default lexiconvalues - static public List<ApplicationItem> ApplicationItemList - { - get - { - return globalApplicationItemList; - } - } + static public List<ApplicationItem> ApplicationItemList + { + get + { + return globalApplicationItemList; + } + } - static public ItemType GetItemType(string columnName, string tableName, int id) - { - ItemType itemType = ItemType.UNKNOWN; + static public ItemType GetItemType(string columnName, string tableName, int id) + { + ItemType itemType = ItemType.UNKNOWN; - string sqlStmt = "select " + columnName + " from " + tableName + " where applicationid = " + id; + string sqlStmt = "select " + columnName + " from " + tableName + " where applicationid = " + id; - itemType = ProgramUtils.StringToSourceType(ExecuteStmtScalar(sqlStmt).ToString()); - return itemType; - } + itemType = ProgramUtils.StringToSourceType( ExecuteStmtScalar( sqlStmt ).ToString() ); + return itemType; + } + #region dataaccess help methods - public static DataTable ExecuteStmtDataTable(string stmt) - { - DataTable dataTable = new DataTable(); + public static DataTable ExecuteStmtDataTable(string stmt) + { + DataTable dataTable = new DataTable(); - try - { + try + { - using (SQLiteCommand command = new SQLiteCommand(SqlLiteConn)) - { - command.CommandText = stmt; - using (SQLiteDataAdapter dataAdapter = new SQLiteDataAdapter(command)) - { - dataAdapter.Fill(dataTable); - } - } - } - catch (Exception exception) - { - throw exception; - } - return dataTable; - } + using ( SQLiteCommand command = new SQLiteCommand( SqlLiteConn ) ) + { + command.CommandText = stmt; + using ( SQLiteDataAdapter dataAdapter = new SQLiteDataAdapter( command ) ) + { + dataAdapter.Fill( dataTable ); + } + } + } + catch ( Exception exception ) + { + throw exception; + } + return dataTable; + } - public static void ExecuteStmtNonQuery(string stmt) - { - try - { - using (SQLiteCommand command = new SQLiteCommand(SqlLiteConn)) - { - command.CommandText = stmt; - command.ExecuteNonQuery(); - } - } - catch (Exception exception) - { - throw exception; - } - } + public static void ExecuteStmtNonQuery(string stmt) + { + try + { + using ( SQLiteCommand command = new SQLiteCommand( SqlLiteConn ) ) + { + command.CommandText = stmt; + command.ExecuteNonQuery(); + } + } + catch ( Exception exception ) + { + throw exception; + } + } + public static void ExecuteStmtNonQuery(string stmt, SQLiteParameter[] paramcollection) + { + try + { + using ( SQLiteCommand command = new SQLiteCommand( SqlLiteConn ) ) + { + command.CommandText = stmt; + command.Parameters.AddRange( paramcollection ); + command.ExecuteNonQuery(); + } + } + catch ( Exception exception ) + { + throw exception; + } + } - public static object ExecuteStmtScalar(string stmt) - { + public static T ExecuteStmtScalar<T>(string stmt, SQLiteParameter[] paramcollection) + { + object o = null; - try - { - using (SQLiteCommand command = new SQLiteCommand(SqlLiteConn)) - { - command.CommandText = stmt; - o = command.ExecuteScalar(); - } - } - catch (Exception exception) - { - throw exception; - } - return o; - } + try + { + using ( SQLiteCommand command = new SQLiteCommand( SqlLiteConn ) ) + { + command.CommandText = stmt; + command.Parameters.AddRange( paramcollection ); + o = command.ExecuteScalar(); - public static void LoadAllApplicationItems() - { - try - { - globalApplicationItemList.Clear(); + if (o != null) + { + return (T) Convert.ChangeType(o, typeof(T)); + } + return default(T); + + } + } + catch ( Exception exception ) + { + throw exception; + } + } - string sqlStmt = "select * from tblApplicationItem order by iposition"; - DataTable dataTable = ExecuteStmtDataTable(sqlStmt); - foreach (DataRow row in dataTable.Rows) - { - ApplicationItem applicationItem = (ApplicationItem)ApplicationItemFactory.AppFactory.GetApplicationItem(GetItemType("applicationItemType", "tblApplicationItem", Convert.ToInt32(row["applicationId"])), row); - // applicationItem.OnLaunchFilelink += new ApplicationItem.FilelinkLaunchEventHandler(LaunchFilelink); - globalApplicationItemList.Add(applicationItem); - } - } - catch (SQLiteException ex) - { - Log.Info("programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); - } - } - } + + public static object ExecuteStmtScalar(string stmt) + { + object o = null; + try + { + using ( SQLiteCommand command = new SQLiteCommand( SqlLiteConn ) ) + { + command.CommandText = stmt; + o = command.ExecuteScalar(); + } + } + catch ( Exception exception ) + { + throw exception; + } + return o; + } + + public static SQLiteParameter GetParameter<G>(G value, string parameterName, DbType type) + { + SQLiteParameter parameter = new SQLiteParameter(parameterName,type); + parameter.Value = value; + + return parameter; + } + + #endregion dataaccess help methods + + public static void LoadAllApplicationItems() + { + try + { + globalApplicationItemList.Clear(); + + using ( SQLiteCommand command = SqlLiteConn.CreateCommand() ) + { + command.CommandText = "SELECT * FROM tblApplicationItem order by iposition"; + using ( SQLiteDataReader dataReader = command.ExecuteReader() ) + { + while ( dataReader.Read() ) + { + ApplicationItem applicationItem = ( ApplicationItem ) ApplicationItemFactory.AppFactory.GetApplicationItem( GetItemType( "applicationItemType", "tblApplicationItem", Convert.ToInt32( dataReader["applicationId"] ) ), dataReader ); + // applicationItem.OnLaunchFilelink += new ApplicationItem.FilelinkLaunchEventHandler(LaunchFilelink); + globalApplicationItemList.Add( applicationItem ); + } + + } + } + } + catch ( SQLiteException ex ) + { + Log.Info( "programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace ); + } + } + } } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs 2007-08-01 14:33:47 UTC (rev 782) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs 2007-08-02 00:09:20 UTC (rev 783) @@ -111,14 +111,14 @@ FileItem file = (FileItem)item; ListViewItem curItem = new ListViewItem(file.Title); curItem.Tag = file; - if (file.IsFolder) + /* if (file.IsFolder) { curItem.ImageIndex = 0; } else - { + {*/ curItem.ImageIndex = 1; - } + // } fileListView.Items.Add(curItem); } } @@ -146,12 +146,12 @@ FileItem file = (FileItem)fileListView.SelectedItems[0].Tag; if (file != null) { - if (!file.IsFolder) - { + // if (!file.IsFolder) + //{ editButton.Enabled = true; deleteButton.Enabled = true; launchButton.Enabled = (file.Filename != ""); - } + //} } } else if (fileListView.SelectedItems.Count > 1) @@ -519,14 +519,14 @@ FileItem file = (FileItem)fileListView.SelectedItems[0].Tag; if (file != null) { - if (file.IsFolder) - { - ChangeFilePath(file.Filename); // filename becomes filepath in next view... :) - } - else - { + // if (file.IsFolder) + //{ + //ChangeFilePath(file.Filename); // filename becomes filepath in next view... :) + //} + //else + //{ EditItem(); - } + //} } } } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs 2007-08-01 14:33:47 UTC (rev 782) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs 2007-08-02 00:09:20 UTC (rev 783) @@ -87,14 +87,9 @@ FileItemToGenre(); manufacturerComboBox.SelectedValue = CurFile.ManufacturerId; //txtManufacturer.Text = m_CurFile.Manufacturer; - if (m_CurFile.Year > 1900) - { + txtYear.Text = m_CurFile.Year.ToString(); - } - else - { - txtYear.Text = ""; - } + cbRating.SelectedIndex = m_CurFile.Rating; txtCountry.Text = m_CurFile.Country; // txtSystem.Text = m_CurFile.Platform; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs 2007-08-01 14:33:47 UTC (rev 782) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs 2007-08-02 00:09:20 UTC (rev 783) @@ -260,11 +260,11 @@ ListViewItem curItem = new ListViewItem(file.Title); file.ToFileInfoFavourite(); curItem.Tag = file; - if (!file.IsFolder) - { + // if (!file.IsFolder) + //{ ListViewItem newItem = listViewFileList.Items.Add(curItem); newItem.SubItems.Add("<unknown>"); - } + //} } } finally Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.Designer.cs 2007-08-01 14:33:47 UTC (rev 782) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.Designer.cs 2007-08-02 00:09:20 UTC (rev 783) @@ -28,439 +28,440 @@ /// </summary> private void InitializeComponent() { - System.Windows.Forms.TreeNode treeNode3 = new System.Windows.Forms.TreeNode("Applications"); - this.menuStrip = new System.Windows.Forms.MenuStrip(); - this.addDeleteApplicationsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.addApplicationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.applicationWithFiledirectoryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.addGroupnodeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.extendedApplicationItemToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.mameImportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.importGamebaseItemToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.deleteApplicationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolsStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.premadeConfigurationsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.emulatorSetupToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.treeView = new System.Windows.Forms.TreeView(); - this.tabControl = new System.Windows.Forms.TabControl(); - this.detailsTabPage = new System.Windows.Forms.TabPage(); - this.directoryTabPage = new System.Windows.Forms.TabPage(); - this.viewTabPage = new System.Windows.Forms.TabPage(); - this.dbOptionsTabPage = new System.Windows.Forms.TabPage(); - this.generalFileItemOptionsGroupBox = new System.Windows.Forms.GroupBox(); - this.removePlatformComboBox = new System.Windows.Forms.ComboBox(); - this.removePlatformLabel = new System.Windows.Forms.Label(); - this.removePlatformButton = new System.Windows.Forms.Button(); - this.addPlatformLabel = new System.Windows.Forms.Label(); - this.addPlatformTextBox = new System.Windows.Forms.TextBox(); - this.addPlatformButton = new System.Windows.Forms.Button(); - this.removeManufacturerComboBox = new System.Windows.Forms.ComboBox(); - this.removeManufacturerLabel = new System.Windows.Forms.Label(); - this.removeManufacturerButton = new System.Windows.Forms.Button(); - this.addManufacturerLabel = new System.Windows.Forms.Label(); - this.addManufacturerTextBox = new System.Windows.Forms.TextBox(); - this.addManufacturerButton = new System.Windows.Forms.Button(); - this.removeGenreComboBox = new System.Windows.Forms.ComboBox(); - this.removeGenreLabel = new System.Windows.Forms.Label(); - this.removeGenreButton = new System.Windows.Forms.Button(); - this.addGenreLabel = new System.Windows.Forms.Label(); - this.addGenreTextBox = new System.Windows.Forms.TextBox(); - this.addGenreButton = new System.Windows.Forms.Button(); - this.menuStrip.SuspendLayout(); - this.tabControl.SuspendLayout(); - this.dbOptionsTabPage.SuspendLayout(); - this.generalFileItemOptionsGroupBox.SuspendLayout(); - this.SuspendLayout(); - // - // menuStrip - // - this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode( "Applications" ); + this.menuStrip = new System.Windows.Forms.MenuStrip(); + this.addDeleteApplicationsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.addApplicationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.applicationWithFiledirectoryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.addGroupnodeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.extendedApplicationItemToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.mameImportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.importGamebaseItemToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.deleteApplicationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolsStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.premadeConfigurationsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.emulatorSetupToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.treeView = new System.Windows.Forms.TreeView(); + this.tabControl = new System.Windows.Forms.TabControl(); + this.detailsTabPage = new System.Windows.Forms.TabPage(); + this.directoryTabPage = new System.Windows.Forms.TabPage(); + this.viewTabPage = new System.Windows.Forms.TabPage(); + this.dbOptionsTabPage = new System.Windows.Forms.TabPage(); + this.generalFileItemOptionsGroupBox = new System.Windows.Forms.GroupBox(); + this.removePlatformComboBox = new System.Windows.Forms.ComboBox(); + this.removePlatformLabel = new System.Windows.Forms.Label(); + this.removePlatformButton = new System.Windows.Forms.Button(); + this.addPlatformLabel = new System.Windows.Forms.Label(); + this.addPlatformTextBox = new System.Windows.Forms.TextBox(); + this.addPlatformButton = new System.Windows.Forms.Button(); + this.removeManufacturerComboBox = new System.Windows.Forms.ComboBox(); + this.removeManufacturerLabel = new System.Windows.Forms.Label(); + this.removeManufacturerButton = new System.Windows.Forms.Button(); + this.addManufacturerLabel = new System.Windows.Forms.Label(); + this.addManufacturerTextBox = new System.Windows.Forms.TextBox(); + this.addManufacturerButton = new System.Windows.Forms.Button(); + this.removeGenreComboBox = new System.Windows.Forms.ComboBox(); + this.removeGenreLabel = new System.Windows.Forms.Label(); + this.removeGenreButton = new System.Windows.Forms.Button(); + this.addGenreLabel = new System.Windows.Forms.Label(); + this.addGenreTextBox = new System.Windows.Forms.TextBox(); + this.addGenreButton = new System.Windows.Forms.Button(); + this.menuStrip.SuspendLayout(); + this.tabControl.SuspendLayout(); + this.dbOptionsTabPage.SuspendLayout(); + this.generalFileItemOptionsGroupBox.SuspendLayout(); + this.SuspendLayout(); + // + // menuStrip + // + this.menuStrip.Items.AddRange( new System.Windows.Forms.ToolStripItem[] { this.addDeleteApplicationsToolStripMenuItem, - this.toolsStripMenuItem}); - this.menuStrip.Location = new System.Drawing.Point(0, 0); - this.menuStrip.Name = "menuStrip"; - this.menuStrip.Size = new System.Drawing.Size(747, 24); - this.menuStrip.TabIndex = 0; - this.menuStrip.Text = "menuStrip"; - // - // addDeleteApplicationsToolStripMenuItem - // - this.addDeleteApplicationsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolsStripMenuItem} ); + this.menuStrip.Location = new System.Drawing.Point( 0, 0 ); + this.menuStrip.Name = "menuStrip"; + this.menuStrip.RenderMode = System.Windows.Forms.ToolStripRenderMode.System; + this.menuStrip.Size = new System.Drawing.Size( 747, 24 ); + this.menuStrip.TabIndex = 0; + this.menuStrip.Text = "menuStrip"; + // + // addDeleteApplicationsToolStripMenuItem + // + this.addDeleteApplicationsToolStripMenuItem.DropDownItems.AddRange( new System.Windows.Forms.ToolStripItem[] { this.addApplicationToolStripMenuItem, - this.deleteApplicationToolStripMenuItem}); - this.addDeleteApplicationsToolStripMenuItem.Name = "addDeleteApplicationsToolStripMenuItem"; - this.addDeleteApplicationsToolStripMenuItem.Size = new System.Drawing.Size(146, 20); - this.addDeleteApplicationsToolStripMenuItem.Text = "Add/Delete applications"; - // - // addApplicationToolStripMenuItem - // - this.addApplicationToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.deleteApplicationToolStripMenuItem} ); + this.addDeleteApplicationsToolStripMenuItem.Name = "addDeleteApplicationsToolStripMenuItem"; + this.addDeleteApplicationsToolStripMenuItem.Size = new System.Drawing.Size( 132, 20 ); + this.addDeleteApplicationsToolStripMenuItem.Text = "Add/Delete applications"; + // + // addApplicationToolStripMenuItem + // + this.addApplicationToolStripMenuItem.DropDownItems.AddRange( new System.Windows.Forms.ToolStripItem[] { this.applicationWithFiledirectoryToolStripMenuItem, this.addGroupnodeToolStripMenuItem, - this.extendedApplicationItemToolStripMenuItem}); - this.addApplicationToolStripMenuItem.Name = "addApplicationToolStripMenuItem"; - this.addApplicationToolStripMenuItem.Size = new System.Drawing.Size(169, 22); - this.addApplicationToolStripMenuItem.Text = "Add application"; - // - // applicationWithFiledirectoryToolStripMenuItem - // - this.applicationWithFiledirectoryToolStripMenuItem.Name = "applicationWithFiledirectoryToolStripMenuItem"; - this.applicationWithFiledirectoryToolStripMenuItem.Size = new System.Drawing.Size(208, 22); - this.applicationWithFiledirectoryToolStripMenuItem.Text = "Applicationitem"; - this.applicationWithFiledirectoryToolStripMenuItem.Click += new System.EventHandler(this.applicationWithFiledirectoryToolStripMenuItem_Click); - // - // addGroupnodeToolStripMenuItem - // - this.addGroupnodeToolStripMenuItem.Name = "addGroupnodeToolStripMenuItem"; - this.addGroupnodeToolStripMenuItem.Size = new System.Drawing.Size(208, 22); - this.addGroupnodeToolStripMenuItem.Text = "Groupingtem"; - this.addGroupnodeToolStripMenuItem.Click += new System.EventHandler(this.addGroupnodeToolStripMenuItem_Click); - // - // extendedApplicationItemToolStripMenuItem - // - this.extendedApplicationItemToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.extendedApplicationItemToolStripMenuItem} ); + this.addApplicationToolStripMenuItem.Name = "addApplicationToolStripMenuItem"; + this.addApplicationToolStripMenuItem.Size = new System.Drawing.Size( 170, 22 ); + this.addApplicationToolStripMenuItem.Text = "Add application"; + // + // applicationWithFiledirectoryToolStripMenuItem + // + this.applicationWithFiledirectoryToolStripMenuItem.Name = "applicationWithFiledirectoryToolStripMenuItem"; + this.applicationWithFiledirectoryToolStripMenuItem.Size = new System.Drawing.Size( 207, 22 ); + this.applicationWithFiledirectoryToolStripMenuItem.Text = "Applicationitem"; + this.applicationWithFiledirectoryToolStripMenuItem.Click += new System.EventHandler( this.applicationWithFiledirectoryToolStripMenuItem_Click ); + // + // addGroupnodeToolStripMenuItem + // + this.addGroupnodeToolStripMenuItem.Name = "addGroupnodeToolStripMenuItem"; + this.addGroupnodeToolStripMenuItem.Size = new System.Drawing.Size( 207, 22 ); + this.addGroupnodeToolStripMenuItem.Text = "Groupingtem"; + this.addGroupnodeToolStripMenuItem.Click += new System.EventHandler( this.addGroupnodeToolStripMenuItem_Click ); + // + // extendedApplicationItemToolStripMenuItem + // + this.extendedApplicationItemToolStripMenuItem.DropDownItems.AddRange( new System.Windows.Forms.ToolStripItem[] { this.mameImportToolStripMenuItem, - this.importGamebaseItemToolStripMenuItem}); - this.extendedApplicationItemToolStripMenuItem.Name = "extendedApplicationItemToolStripMenuItem"; - this.extendedApplicationItemToolStripMenuItem.Size = new System.Drawing.Size(208, 22); - this.extendedApplicationItemToolStripMenuItem.Text = "Extended applicationItem"; - // - // mameImportToolStripMenuItem - // - this.mameImportToolStripMenuItem.Name = "mameImportToolStripMenuItem"; - this.mameImportToolStripMenuItem.Size = new System.Drawing.Size(168, 22); - this.mameImportToolStripMenuItem.Text = "Import Mame"; - this.mameImportToolStripMenuItem.Click += new System.EventHandler(this.mameImportToolStripMenuItem_Click); - // - // importGamebaseItemToolStripMenuItem - // - this.importGamebaseItemToolStripMenuItem.Name = "importGamebaseItemToolStripMenuItem"; - this.importGamebaseItemToolStripMenuItem.Size = new System.Drawing.Size(168, 22); - this.importGamebaseItemToolStripMenuItem.Text = "Import Gamebase"; - this.importGamebaseItemToolStripMenuItem.Click += new System.EventHandler(this.importGamebaseItemToolStripMenuItem_Click); - // - // deleteApplicationToolStripMenuItem - // - this.deleteApplicationToolStripMenuItem.Image = global::GUIPrograms.Properties.Resources.deleteButton_Image; - this.deleteApplicationToolStripMenuItem.Name = "deleteApplicationToolStripMenuItem"; - this.deleteApplicationToolStripMenuItem.Size = new System.Drawing.Size(169, 22); - this.deleteApplicationToolStripMenuItem.Text = "Delete application"; - this.deleteApplicationToolStripMenuItem.Click += new System.EventHandler(this.deleteApplicationToolStripMenuItem_Click); - // - // toolsStripMenuItem - // - this.toolsStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.premadeConfigurationsToolStripMenuItem}); - this.toolsStripMenuItem.Name = "toolsStripMenuItem"; - this.toolsStripMenuItem.Size = new System.Drawing.Size(48, 20); - this.toolsStripMenuItem.Text = "Tools"; - // - // premadeConfigurationsToolStripMenuItem - // - this.premadeConfigurationsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.emulatorSetupToolStripMenuItem}); - this.premadeConfigurationsToolStripMenuItem.Name = "premadeConfigurationsToolStripMenuItem"; - this.premadeConfigurationsToolStripMenuItem.Size = new System.Drawing.Size(153, 22); - this.premadeConfigurationsToolStripMenuItem.Text = "Configurations"; - // - // emulatorSetupToolStripMenuItem - // - this.emulatorSetupToolStripMenuItem.Name = "emulatorSetupToolStripMenuItem"; - this.emulatorSetupToolStripMenuItem.Size = new System.Drawing.Size(155, 22); - this.emulatorSetupToolStripMenuItem.Text = "Emulator Setup"; - // - // treeView - // - this.treeView.AllowDrop = true; - this.treeView.HideSelection = false; - this.treeView.HotTracking = true; - this.treeView.LabelEdit = true; - this.treeView.Location = new System.Drawing.Point(0, 27); - this.treeView.Name = "treeView"; - treeNode3.Name = "applicationNode"; - treeNode3.Text = "Applications"; - this.treeView.Nodes.AddRange(new System.Windows.Forms.TreeNode[] { - treeNode3}); - this.treeView.Size = new System.Drawing.Size(224, 576); - this.treeView.TabIndex = 8; - this.treeView.DragDrop += new System.Windows.Forms.DragEventHandler(this.treeView_DragDrop); - this.treeView.DragOver += new System.Windows.Forms.DragEventHandler(this.treeView_DragOver); - this.treeView.AfterLabelEdit += new System.Windows.Forms.NodeLabelEditEventHandler(this.treeView_AfterLabelEdit); - this.treeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView_AfterSelect); - this.treeView.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView_NodeMouseClick); - this.treeView.DragEnter += new System.Windows.Forms.DragEventHandler(this.treeView_DragEnter); - this.treeView.BeforeLabelEdit += new System.Windows.Forms.NodeLabelEditEventHandler(this.treeView_BeforeLabelEdit); - this.treeView.BeforeSelect += new System.Windows.Forms.TreeViewCancelEventHandler(this.treeView_BeforeSelect); - this.treeView.ItemDrag += new System.Windows.Forms.ItemDragEventHandler(this.treeView_ItemDrag); - // - // tabControl - // - this.tabControl.Controls.Add(this.detailsTabPage); - this.tabControl.Controls.Add(this.directoryTabPage); - this.tabControl.Controls.Add(this.viewTabPage); - this.tabControl.Controls.Add(this.dbOptionsTabPage); - this.tabControl.Location = new System.Drawing.Point(230, 27); - this.tabControl.Name = "tabControl"; - this.tabControl.SelectedIndex = 0; - this.tabControl.ShowToolTips = true; - this.tabControl.Size = new System.Drawing.Size(505, 577); - this.tabControl.TabIndex = 2; - this.tabControl.Click += new System.EventHandler(this.dbOptionsTabPage_Click); - this.tabControl.SelectedIndexChanged += new System.EventHandler(this.tabControl_SelectedIndexChanged); - // - // detailsTabPage - // - this.detailsTabPage.BackColor = System.Drawing.SystemColors.Control; - this.detailsTabPage.Location = new System.Drawing.Point(4, 22); - this.detailsTabPage.Name = "detailsTabPage"; - this.detailsTabPage.Padding = new System.Windows.Forms.Padding(3); - this.detailsTabPage.Size = new System.Drawing.Size(497, 551); - this.detailsTabPage.TabIndex = 0; - this.detailsTabPage.Text = "Details"; - // - // directoryTabPage - // - this.directoryTabPage.BackColor = System.Drawing.SystemColors.Control; - this.directoryTabPage.Location = new System.Drawing.Point(4, 22); - this.directoryTabPage.Name = "directoryTabPage"; - this.directoryTabPage.Padding = new System.Windows.Forms.Padding(3); - this.directoryTabPage.Size = new System.Drawing.Size(497, 551); - this.directoryTabPage.TabIndex = 1; - this.directoryTabPage.Text = "Files"; - // - // viewTabPage - // - this.viewTabPage.BackColor = System.Drawing.SystemColors.Control; - this.viewTabPage.Location = new System.Drawing.Point(4, 22); - this.viewTabPage.Name = "viewTabPage"; - this.viewTabPage.Padding = new System.Windows.Forms.Padding(3); - this.viewTabPage.Size = new System.Drawing.Size(497, 551); - this.viewTabPage.TabIndex = 2; - this.viewTabPage.Text = "Views"; - // - // dbOptionsTabPage - // - this.dbOptionsTabPage.Controls.Add(this.generalFileItemOptionsGroupBox); - this.dbOptionsTabPage.Location = new System.Drawing.Point(4, 22); - this.dbOptionsTabPage.Name = "dbOptionsTabPage"; - this.dbOptionsTabPage.Padding = new System.Windows.Forms.Padding(3); - this.dbOptionsTabPage.Size = new System.Drawing.Size(497, 551); - this.dbOptionsTabPage.TabIndex = 3; - this.dbOptionsTabPage.Text = "DB options"; - this.dbOptionsTabPage.UseVisualStyleBackColor = true; - this.dbOptionsTabPage.Click += new System.EventHandler(this.dbOptionsTabPage_Click); - // - // generalFileItemOptionsGroupBox - // - this.generalFileItemOptionsGroupBox.Controls.Add(this.removePlatformComboBox); - this.generalFileItemOptionsGroupBox.Controls.Add(this.removePlatformLabel); - this.generalFileItemOptionsGroupBox.Controls.Add(this.removePlatformButton); - this.generalFileItemOptionsGroupBox.Controls.Add(this.addPlatformLabel); - this.generalFileItemOptionsGroupBox.Controls.Add(this.addPlatformTextBox); - this.generalFileItemOptionsGroupBox.Controls.Add(this.addPlatformButton); - this.generalFileItemOptionsGroupBox.Controls.Add(this.removeManufacturerComboBox); - this.generalFileItemOptionsGroupBox.Controls.Add(this.removeManufacturerLabel); - this.generalFileItemOptionsGroupBox.Controls.Add(this.removeManufacturerButton); - this.generalFileItemOptionsGroupBox.Controls.Add(this.addManufacturerLabel); - this.generalFileItemOptionsGroupBox.Controls.Add(this.addManufacturerTextBox); - this.generalFileItemOptionsGroupBox.Controls.Add(this.addManufacturerButton); - this.generalFileItemOptionsGroupBox.Controls.Add(this.removeGenreComboBox); - this.generalFileItemOptionsGroupBox.Controls.Add(this.removeGenreLabel); - this.generalFileItemOptionsGroupBox.Controls.Add(this.removeGenreButton); - this.generalFileItemOptionsGroupBox.Controls.Add(this.addGenreLabel); - this.generalFileItemOptionsGroupBox.Controls.Add(this.addGenreTextBox); - this.generalFileItemOptionsGroupBox.Controls.Add(this.addGenreButton); - this.generalFileItemOptionsGroupBox.Location = new System.Drawing.Point(3, 6); - this.generalFileItemOptionsGroupBox.Name = "generalFileItemOptionsGroupBox"; - this.generalFileItemOptionsGroupBox.Size = new System.Drawing.Size(488, 496); - this.generalFileItemOptionsGroupBox.TabIndex = 79; - this.generalFileItemOptionsGroupBox.TabStop = false; - // - // removePlatformComboBox - // - this.removePlatformComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.removePlatformComboBox.FormattingEnabled = true; - this.removePlatformComboBox.Location = new System.Drawing.Point(99, 249); - this.removePlatformComboBox.Name = "removePlatformComboBox"; - this.removePlatformComboBox.Size = new System.Drawing.Size(306, 21); - this.removePlatformComboBox.TabIndex = 92; - // - // removePlatformLabel - // - this.removePlatformLabel.AutoSize = true; - this.removePlatformLabel.Location = new System.Drawing.Point(6, 252); - this.removePlatformLabel.Name = "removePlatformLabel"; - this.removePlatformLabel.Size = new System.Drawing.Size(87, 13); - this.removePlatformLabel.TabIndex = 91; - this.removePlatformLabel.Text = "Remove platform"; - // - // removePlatformButton - // - this.removePlatformButton.Location = new System.Drawing.Point(411, 249); - this.removePlatformButton.Name = "removePlatformButton"; - this.removePlatformButton.Size = new System.Drawing.Size(62, 23); - this.removePlatformButton.TabIndex = 90; - this.removePlatformButton.Text = "Remove.."; - this.removePlatformButton.UseVisualStyleBackColor = true; - this.removePlatformButton.Click += new System.EventHandler(this.removePlatformButton_Click); - // - // addPlatformLabel - // - this.addPlatformLabel.AutoSize = true; - this.addPlatformLabel.Location = new System.Drawing.Point(6, 216); - this.addPlatformLabel.Name = "addPlatformLabel"; - this.addPlatformLabel.Size = new System.Drawing.Size(72, 13); - this.addPlatformLabel.TabIndex = 87; - this.addPlatformLabel.Text = "Add platform.."; - // - // addPlatformTextBox - // - this.addPlatformTextBox.Location = new System.Drawing.Point(99, 213); - this.addPlatformTextBox.Name = "addPlatformTextBox"; - this.addPlatformTextBox.Size = new System.Drawing.Size(306, 20); - this.addPlatformTextBox.TabIndex = 88; - // - // addPlatformButton - // - this.addPlatformButton.Location = new System.Drawing.Point(411, 213); - this.addPlatformButton.Name = "addPlatformButton"; - this.addPlatformButton.Size = new System.Drawing.Size(62, 23); - this.addPlatformButton.TabIndex = 89; - this.addPlatformButton.Text = "Add.."; - this.addPlatformButton.UseVisualStyleBackColor = true; - this.addPlatformButton.Click += new System.EventHandler(this.addPlatformButton_Click); - // - // removeManufacturerComboBox - // - this.removeManufacturerComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.removeManufacturerComboBox.FormattingEnabled = true; - this.removeManufacturerComboBox.Location = new System.Drawing.Point(99, 165); - this.removeManufacturerComboBox.Name = "removeManufacturerComboBox"; - this.removeManufacturerComboBox.Size = new System.Drawing.Size(306, 21); - this.removeManufacturerComboBox.TabIndex = 86; - // - // removeManufacturerLabel - // - this.removeManufacturerLabel.Location = new System.Drawing.Point(6, 157); - this.removeManufacturerLabel.Name = "removeManufacturerLabel"; - this.removeManufacturerLabel.Size = new System.Drawing.Size(82, 29); - this.removeManufacturerLabel.TabIndex = 85; - this.removeManufacturerLabel.Text = "Remove Manufacturer"; - // - // removeManufacturerButton - // - this.removeManufacturerButton.Location = new System.Drawing.Point(411, 165); - this.removeManufacturerButton.Name = "removeManufacturerButton"; - this.removeManufacturerButton.Size = new System.Drawing.Size(62, 23); - this.removeManufacturerButton.TabIndex = 84; - this.removeManufacturerButton.Text = "Remove.."; - this.removeManufacturerButton.UseVisualStyleBackColor = true; - this.removeManufacturerButton.Click += new System.EventHandler(this.removeManufacturerButton_Click); - // - // addManufacturerLabel - // - this.addManufacturerLabel.Location = new System.Drawing.Point(6, 121); - this.addManufacturerLabel.Name = "addManufacturerLabel"; - this.addManufacturerLabel.Size = new System.Drawing.Size(82, 36); - this.addManufacturerLabel.TabIndex = 81; - this.addManufacturerLabel.Text = "Add Manufacturer.."; - // - // addManufacturerTextBox - // - this.addManufacturerTextBox.Location = new System.Drawing.Point(99, 129); - this.addManufacturerTextBox.Name = "addManufacturerTextBox"; - this.addManufacturerTextBox.Size = new System.Drawing.Size(306, 20); - this.addManufacturerTextBox.TabIndex = 82; - // - // addManufacturerButton - // - this.addManufacturerButton.Location = new System.Drawing.Point(411, 129); - this.addManufacturerButton.Name = "addManufacturerButton"; - this.addManufacturerButton.Size = new System.Drawing.Size(62, 23); - this.addManufacturerButton.TabIndex = 83; - this.addManufacturerButton.Text = "Add.."; - this.addManufacturerButton.UseVisualStyleBackColor = true; - this.addManufacturerButton.Click += new System.EventHandler(this.addManufacturerButton_Click); - // - // removeGenreComboBox - // - this.removeGenreComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.removeGenreComboBox.FormattingEnabled = true; - this.removeGenreComboBox.Location = new System.Drawing.Point(99, 70); - this.removeGenreComboBox.Name = "removeGenreComboBox"; - this.removeGenreComboBox.Size = new System.Drawing.Size(306, 21); - this.removeGenreComboBox.TabIndex = 80; - // - // removeGenreLabel - // - this.removeGenreLabel.AutoSize = true; - this.removeGenreLabel.Location = new System.Drawing.Point(6, 73); - this.removeGenreLabel.Name = "removeGenreLabel"; - this.removeGenreLabel.Size = new System.Drawing.Size(77, 13); - this.removeGenreLabel.TabIndex = 79; - this.removeGenreLabel.Text = "Remove genre"; - // - // removeGenreButton - // - this.removeGenreButton.Location = new System.Drawing.Point(411, 70); - this.removeGenreButton.Name = "removeGenreButton"; - this.removeGenreButton.Size = new System.Drawing.Size(62, 23); - this.removeGenreButton.TabIndex = 78; - this.removeGenreButton.Text = "Remove.."; - this.removeGenreButton.UseVisualStyleBackColor = true; - this.removeGenreButton.Click += new System.EventHandler(this.removeGenreButton_Click); - // - // addGenreLabel - // - this.addGenreLabel.AutoSize = true; - this.addGenreLabel.Location = new System.Drawing.Point(6, 37); - this.addGenreLabel.Name = "addGenreLabel"; - this.addGenreLabel.Size = new System.Drawing.Size(62, 13); - this.addGenreLabel.TabIndex = 74; - this.addGenreLabel.Text = "Add genre.."; - // - // addGenreTextBox - // - this.addGenreTextBox.Location = new System.Drawing.Point(99, 34); - this.addGenreTextBox.Name = "addGenreTextBox"; - this.addGenreTextBox.Size = new System.Drawing.Size(306, 20); - this.addGenreTextBox.TabIndex = 75; - // - // addGenreButton - // - this.addGenreButton.Location = new System.Drawing.Point(411, 34); - this.addGenreButton.Name = "addGenreButton"; - this.addGenreButton.Size = new System.Drawing.Size(62, 23); - this.addGenreButton.TabIndex = 76; - this.addGenreButton.Text = "Add.."; - this.addGenreButton.UseVisualStyleBackColor = true; - this.addGenreButton.Click += new System.EventHandler(this.addGenreButton_Click); - // ... [truncated message content] |
From: <i-...@us...> - 2007-08-01 14:34:02
|
Revision: 782 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=782&view=rev Author: i-loop Date: 2007-08-01 07:33:47 -0700 (Wed, 01 Aug 2007) Log Message: ----------- synced with latest BlueTwo changes Modified Paths: -------------- trunk/skins/BlueTwoBig/Development Version/myvideo.xml trunk/skins/BlueTwoBig/Development Version/myvideoTitle.xml Modified: trunk/skins/BlueTwoBig/Development Version/myvideo.xml =================================================================== --- trunk/skins/BlueTwoBig/Development Version/myvideo.xml 2007-07-31 14:41:26 UTC (rev 781) +++ trunk/skins/BlueTwoBig/Development Version/myvideo.xml 2007-08-01 14:33:47 UTC (rev 782) @@ -77,7 +77,17 @@ <id>9</id> <label>983</label> <onright>50</onright> + <ondown>10</ondown> + </control> + <control> + <description>TV Shows</description> + <type>button</type> + <id>10</id> + <hyperlink>9811</hyperlink> + <label>1300</label> + <onright>50</onright> <ondown>8</ondown> + <visible>plugin.isenabled(MP-TV Series)</visible> </control> <control> <description>Trailers</description> Modified: trunk/skins/BlueTwoBig/Development Version/myvideoTitle.xml =================================================================== --- trunk/skins/BlueTwoBig/Development Version/myvideoTitle.xml 2007-07-31 14:41:26 UTC (rev 781) +++ trunk/skins/BlueTwoBig/Development Version/myvideoTitle.xml 2007-08-01 14:33:47 UTC (rev 782) @@ -95,7 +95,17 @@ <id>9</id> <label>983</label> <onright>50</onright> + <ondown>10</ondown> + </control> + <control> + <description>TV Shows</description> + <type>button</type> + <id>10</id> + <hyperlink>9811</hyperlink> + <label>1300</label> + <onright>50</onright> <ondown>8</ondown> + <visible>plugin.isenabled(MP-TV Series)</visible> </control> <control> <description>Trailers</description> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rs...@us...> - 2007-07-31 14:41:29
|
Revision: 781 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=781&view=rev Author: rsparey Date: 2007-07-31 07:41:26 -0700 (Tue, 31 Jul 2007) Log Message: ----------- Modified Paths: -------------- trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/background.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/bottom_strip.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tab_down.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tab_left_corner_down.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tab_left_corner_up.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tab_up.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/top-strip.png Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/background.png =================================================================== (Binary files differ) Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/bottom_strip.png =================================================================== (Binary files differ) Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tab_down.png =================================================================== (Binary files differ) Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tab_left_corner_down.png =================================================================== (Binary files differ) Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tab_left_corner_up.png =================================================================== (Binary files differ) Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tab_up.png =================================================================== (Binary files differ) Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/top-strip.png =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nor...@us...> - 2007-07-28 08:35:12
|
Revision: 780 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=780&view=rev Author: northern_sky Date: 2007-07-28 01:35:10 -0700 (Sat, 28 Jul 2007) Log Message: ----------- replaced dbcalls with opensource ado.net System.Data.SQLite + misc other changes It rocks! Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAltFileInfo.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/GamebaseImport.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/MameImport.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemDirectoryCache.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemFactory.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemGameBase.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemGrouper.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemMame.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/BaseItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/FileItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/FileItemInfo.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/FilelinkItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/FilterItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramSort.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramViewHandler.cs trunk/plugins/myGUIProgramsAlt/README.txt Added Paths: ----------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/SqlNet/ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/SqlNet/System.Data.SQLite.DLL Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs 2007-07-27 18:24:42 UTC (rev 779) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs 2007-07-28 08:35:10 UTC (rev 780) @@ -27,13 +27,13 @@ using System.Collections; using System.Collections.Generic; using System.IO; +using System.Data; using MediaPortal.GUI.Library; using GUIPrograms; -using SQLite.NET; using MediaPortal.Database; using MediaPortal.Util; using MediaPortal.Configuration; - +using System.Data.SQLite; using GUIPrograms.Items; namespace GUIPrograms.Database @@ -43,7 +43,10 @@ /// </summary> public class DatabaseHandler { - public static SQLiteClient sqlDB = null; + + private static SQLiteConnection sqlLiteConn = null; + + static List<ApplicationItem> globalApplicationItemList = new List<ApplicationItem>(); private const string DATABASEFILE = "myProgramsAltDatabaseV1.db3"; @@ -62,8 +65,11 @@ //check if database exists if (!File.Exists(DatabasePath)) { - sqlDB = new SQLiteClient(Config.GetFile(Config.Dir.Database, DATABASEFILE)); - DatabaseUtility.SetPragmas(sqlDB); + SQLiteConnection.CreateFile(Config.GetFile(Config.Dir.Database, DATABASEFILE)); + string connString = "Data Source=" + Config.GetFile(Config.Dir.Database, DATABASEFILE); + sqlLiteConn = new SQLiteConnection(connString); + + SetPragmas(); // make sure the DB-structure is complete CreateDBTables(); @@ -73,9 +79,9 @@ } else { - sqlDB = new SQLiteClient(Config.GetFile(Config.Dir.Database, DATABASEFILE)); - - } + string connString = "Data Source=" + Config.GetFile(Config.Dir.Database, DATABASEFILE) + ";Version=3"; + sqlLiteConn = new SQLiteConnection(connString); + } //globalApplicationItemList = new ApplicationItemList(sqlDB, new ApplicationItem.FilelinkLaunchEventHandler(LaunchFilelink)); LoadAllApplicationItems(); } @@ -83,10 +89,16 @@ { Log.Info("programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); } - - } + static private void SetPragmas() + { + ExecuteStmtNonQuery("PRAGMA default_cache_size=3000"); + ExecuteStmtNonQuery("PRAGMA count_changes=1"); + ExecuteStmtNonQuery("PRAGMA short_column_names=1"); + ExecuteStmtNonQuery("PRAGMA auto_vacuum=1"); + } + /*static void LaunchFilelink(FilelinkItem curLink, bool MPGUIMode) { ApplicationItem targetApp = globalApplicationItemList.GetAppByID(curLink.TargetAppID); @@ -96,75 +108,94 @@ } }*/ + // we can always keep an connection open in sqllite.. + //to expensive closing it + public static SQLiteConnection SqlLiteConn + { + get + { + if (sqlLiteConn.State == ConnectionState.Closed) + { + sqlLiteConn.Open(); + } + return sqlLiteConn; + } + } + /// <summary> /// Create db tables etc,if not already exist /// </summary> /// <returns></returns> static bool CreateDBTables() { - if (sqlDB == null) - return false; - - - DatabaseUtility.AddTable(sqlDB, "tblApplicationItem", @"CREATE TABLE + string sqlStmt = @"CREATE TABLE tblApplicationItem ( applicationId INTEGER PRIMARY KEY, - fatherNodeId INTEGER, + fatherNodeId INTEGER, title TEXT, filename TEXT, arguments TEXT, windowstyle TEXT, startupdir TEXT, - useShellExecute TEXT, - useQuotes TEXT, + useShellExecute BOOL, + useQuotes BOOL, applicationItemType TEXT, source TEXT, imagefile TEXT, filedirectory TEXT, imagedirectory TEXT, validExtensions TEXT, - enabled TEXT, - importValidImagesOnly TEXT, - iposition INTEGER, - refreshGUIAllowed TEXT, + enabled BOOL, + importValidImagesOnly BOOL, + iposition INTEGER, + refreshGUIAllowed BOOL, systemdefault TEXT, - waitForExit TEXT, + waitForExit BOOL, preLaunch TEXT, postLaunch TEXT - )"); + )"; - DatabaseUtility.AddTable(sqlDB, "tblFileItem", "CREATE TABLE tblFileItem (fileid INTEGER PRIMARY KEY, applicationId INTEGER, title TEXT, filename TEXT, imagefile TEXT, mainGenreId INTEGER, subGenreId INTEGER, country TEXT, manufacturerId INTEGER, year INTEGER, rating INTEGER, overview TEXT, platformId INTEGER, import_flag INTEGER, lastTimeLaunched TEXT, launchcount INTEGER, isfolder TEXT, uppertitle TEXT,categorydata TEXT, gameInfoUrl TEXT)"); - DatabaseUtility.AddTable(sqlDB, "tblFilterItem", "CREATE TABLE tblFilterItem (applicationId INTEGER, grouperAppID INTEGER, fileID INTEGER, filename TEXT, tag INTEGER)"); - DatabaseUtility.AddTable(sqlDB, "tblSetting", "CREATE TABLE tblSetting (settingid INTEGER PRIMARY KEY, key TEXT, value TEXT)"); + ExecuteStmtNonQuery(sqlStmt); - DatabaseUtility.AddTable(sqlDB, "tblGenre", @"CREATE TABLE + + sqlStmt = @"CREATE TABLE tblFileItem (fileid INTEGER PRIMARY KEY, applicationId INTEGER, title TEXT, filename TEXT, imagefile TEXT, mainGenreId INTEGER, subGenreId INTEGER, country TEXT, manufacturerId INTEGER, year INTEGER, rating INTEGER, overview TEXT, platformId INTEGER, lastTimeLaunched TEXT, launchcount INTEGER, isfolder BOOL, categorydata TEXT, gameInfoUrl TEXT)"; + ExecuteStmtNonQuery(sqlStmt); + sqlStmt = @"CREATE TABLE tblFilterItem (applicationId INTEGER, grouperAppID INTEGER, fileID INTEGER, filename TEXT, tag INTEGER)"; + ExecuteStmtNonQuery(sqlStmt); + sqlStmt = @"CREATE TABLE tblSetting (settingid INTEGER PRIMARY KEY, key TEXT, value TEXT)"; + ExecuteStmtNonQuery(sqlStmt); + + sqlStmt = @"CREATE TABLE tblGenre ( genreId INTEGER PRIMARY KEY, genre TEXT - )"); - - DatabaseUtility.AddTable(sqlDB, "tblPlatform", @"CREATE TABLE + )"; + ExecuteStmtNonQuery(sqlStmt); + sqlStmt = @"CREATE TABLE tblPlatform ( platformId INTEGER PRIMARY KEY, platform TEXT - )"); - - DatabaseUtility.AddTable(sqlDB, "tblManufacturer", @"CREATE TABLE + )"; + ExecuteStmtNonQuery(sqlStmt); + sqlStmt = @"CREATE TABLE tblManufacturer ( manufacturerId INTEGER PRIMARY KEY, manufacturer TEXT - )"); - - - DatabaseUtility.AddIndex(sqlDB, "idxFile1", "CREATE INDEX idxFile1 ON tblFileItem(applicationId)"); - DatabaseUtility.AddIndex(sqlDB, "idxApp1", "CREATE INDEX idxApp1 ON tblApplicationItem(fatherNodeId)"); - DatabaseUtility.AddIndex(sqlDB, "idxFilterItem1", "CREATE UNIQUE INDEX idxFilterItem1 ON tblFilterItem(applicationId, fileID, grouperAppID)"); + )"; + ExecuteStmtNonQuery(sqlStmt); + sqlStmt = @"CREATE INDEX idxFile1 ON tblFileItem(applicationId)"; + ExecuteStmtNonQuery(sqlStmt); + sqlStmt = @"CREATE INDEX idxApp1 ON tblApplicationItem(fatherNodeId)"; + ExecuteStmtNonQuery(sqlStmt); + sqlStmt = @"CREATE UNIQUE INDEX idxFilterItem1 ON tblFilterItem(applicationId, fileID, grouperAppID)"; + ExecuteStmtNonQuery(sqlStmt); + return true; } @@ -174,9 +205,8 @@ /// </summary> private static void InsertDefaultDBValues() { - //Insert these - - sqlDB.Execute(@"INSERT INTO + + string sqlStmt = @"INSERT INTO tblGenre ( genre @@ -184,9 +214,11 @@ VALUES ( 'Unknown' - )"); + )"; - sqlDB.Execute(@"INSERT INTO + ExecuteStmtNonQuery(sqlStmt); + + sqlStmt = @"INSERT INTO tblManufacturer ( manufacturer @@ -194,10 +226,12 @@ VALUES ( 'Unknown' - )"); + )"; - sqlDB.Execute(@"INSERT INTO + ExecuteStmtNonQuery(sqlStmt); + + sqlStmt = @"INSERT INTO tblPlatform ( platform @@ -205,20 +239,23 @@ VALUES ( 'Unknown' - )"); + )"; - FillDefaultDBLexiconHelper("tblPlatform","platform",CreateSystemLexiconList()); - FillDefaultDBLexiconHelper("tblManufacturer","manufacturer",CreateManufacturerLexiconList()); + ExecuteStmtNonQuery(sqlStmt); + + FillDefaultDBLexiconHelper("tblPlatform", "platform", CreateSystemLexiconList()); + FillDefaultDBLexiconHelper("tblManufacturer", "manufacturer", CreateManufacturerLexiconList()); FillDefaultDBLexiconHelper("tblGenre", "genre", CreateGenreLexiconList()); } - private static void FillDefaultDBLexiconHelper(string tableName,string columnName,List<string> itemList) + private static void FillDefaultDBLexiconHelper(string tableName, string columnName, List<string> itemList) {// dont support parameters..... yet at least //AND mediaportals sqlite support dont support multiple inserst with ; bettween... gaaa //change to to net provider as soon as we can - string sqlStmt = ""; + string sqlStmt = string.Empty; + foreach (string insertValue in itemList) { sqlStmt = @" @@ -232,18 +269,17 @@ '" + insertValue + @"' );"; - sqlDB.Execute(sqlStmt); + ExecuteStmtNonQuery(sqlStmt); } - - } #region dbsettings static public string ReadSetting(string Key) { - SQLiteResultSet results; - string res = null; - string SQL = @" + string sqlStmt = string.Empty; + + string keyValue = string.Empty; + sqlStmt = @" SELECT value @@ -253,36 +289,30 @@ WHERE key ='" + Key + "'"; - results = sqlDB.Execute(SQL); - if (results != null && results.Rows.Count > 0) + object o = ExecuteStmtScalar(sqlStmt); + if (o != null) { - SQLiteResultSet.Row arr = results.Rows[0]; - res = arr.fields[0]; + keyValue = o.ToString(); } - //Log.Info("dw read setting key:{0}\nvalue:{1}", Key, applicationItem); - return res; + return keyValue; } static int CountKey(string Key) { - SQLiteResultSet results; - int res = 0; - results = sqlDB.Execute(@" + string sqlStmt = string.Empty; + int keyValue = 0; + sqlStmt = @" SELECT COUNT(*) FROM tblSetting - WHERE key ='" + Key + "'"); + WHERE key ='" + Key + "'"; - if (results != null && results.Rows.Count > 0) - { - SQLiteResultSet.Row arr = results.Rows[0]; - res = Int32.Parse(arr.fields[0]); - } - return res; + keyValue = Convert.ToInt32(ExecuteStmtScalar(sqlStmt)); + return keyValue; } static public bool KeyExists(string Key) @@ -292,9 +322,11 @@ static public void WriteSetting(string Key, string Value) { + string sqlStmt = string.Empty; + if (KeyExists(Key)) { - sqlDB.Execute(@" + sqlStmt = @" UPDATE tblSetting @@ -302,31 +334,34 @@ value = '" + Value + @"' WHERE - key = '" + Key + "'"); + key = '" + Key + "'"; + } else { - sqlDB.Execute(@" + sqlStmt = @" INSERT INTO tblSetting (key, value) - VALUES('" + Key + "', '" + Value + "')"); + VALUES('" + Key + "', '" + Value + "')"; } + ExecuteStmtNonQuery(sqlStmt); } static public void DeleteSetting(string Key) { - sqlDB.Execute("DELETE FROM tblSetting WHERE key = '" + Key + "'"); + + string sqlStmt = "DELETE FROM tblSetting WHERE key = '" + Key + "'"; + ExecuteStmtNonQuery(sqlStmt); } #endregion dbsettings public static int LexiconDataExists(string tableName, string columnName, string fieldValue) { - SQLiteResultSet result = null; string sqlStmt = @" SELECT - * + " + columnName + @"id FROM " + tableName + @" @@ -343,20 +378,22 @@ VALUES ( '" + ProgramUtils.Encode(fieldValue) + @"' - )"; + );"; try { - result = sqlDB.Execute(sqlStmt); - if (result.Rows.Count > 0) + + object o = ExecuteStmtScalar(sqlStmt); + + //lexion didnt exist, we save it + if (o == null) { - return Convert.ToInt32(result.Rows[0].fields[0]); + ExecuteStmtNonQuery(sqlStmtInsert); + return Convert.ToInt32(ExecuteStmtScalar(sqlStmt)); } else - {//lexion didnt exist, we save it - - sqlDB.Execute(sqlStmtInsert); - return sqlDB.LastInsertID(); + { + return Convert.ToInt32(o); } } catch (SQLiteException ex) @@ -367,7 +404,7 @@ #region default lexiconvalues - private static List<string> CreateGenreLexiconList() + private static List<string> CreateGenreLexiconList() { List<string> genreList = new List<string>(); @@ -379,7 +416,7 @@ return genreList; } - private static List<string> CreateManufacturerLexiconList() + private static List<string> CreateManufacturerLexiconList() { List<string> manufacturerList = new List<string>(); @@ -390,7 +427,7 @@ return manufacturerList; } - private static List<string> CreateSystemLexiconList() + private static List<string> CreateSystemLexiconList() { List<string> systemList = new List<string>(); @@ -412,20 +449,88 @@ } } + static public ItemType GetItemType(string columnName, string tableName, int id) + { + ItemType itemType = ItemType.UNKNOWN; + + string sqlStmt = "select " + columnName + " from " + tableName + " where applicationid = " + id; + + itemType = ProgramUtils.StringToSourceType(ExecuteStmtScalar(sqlStmt).ToString()); + return itemType; + } + + + public static DataTable ExecuteStmtDataTable(string stmt) + { + DataTable dataTable = new DataTable(); + + try + { + + using (SQLiteCommand command = new SQLiteCommand(SqlLiteConn)) + { + command.CommandText = stmt; + using (SQLiteDataAdapter dataAdapter = new SQLiteDataAdapter(command)) + { + dataAdapter.Fill(dataTable); + } + } + } + catch (Exception exception) + { + throw exception; + } + return dataTable; + } + + public static void ExecuteStmtNonQuery(string stmt) + { + try + { + using (SQLiteCommand command = new SQLiteCommand(SqlLiteConn)) + { + command.CommandText = stmt; + command.ExecuteNonQuery(); + } + } + catch (Exception exception) + { + throw exception; + } + } + + + public static object ExecuteStmtScalar(string stmt) + { + object o = null; + try + { + using (SQLiteCommand command = new SQLiteCommand(SqlLiteConn)) + { + command.CommandText = stmt; + o = command.ExecuteScalar(); + } + } + catch (Exception exception) + { + throw exception; + } + return o; + } + public static void LoadAllApplicationItems() { try { globalApplicationItemList.Clear(); - SQLiteResultSet results = sqlDB.Execute("select * from tblApplicationItem order by iposition"); - if (results.Rows.Count == 0) - return; - - for (int row = 0; row < results.Rows.Count; row++) + string sqlStmt = "select * from tblApplicationItem order by iposition"; + DataTable dataTable = ExecuteStmtDataTable(sqlStmt); + + foreach (DataRow row in dataTable.Rows) { - ApplicationItem applicationItem = (ApplicationItem)ApplicationItemFactory.AppFactory.GetApplicationItem( ProgramUtils.GetSourceType(results, row, "applicationItemType"), results, row); - // applicationItem.OnLaunchFilelink += new ApplicationItem.FilelinkLaunchEventHandler(LaunchFilelink); + ApplicationItem applicationItem = (ApplicationItem)ApplicationItemFactory.AppFactory.GetApplicationItem(GetItemType("applicationItemType", "tblApplicationItem", Convert.ToInt32(row["applicationId"])), row); + // applicationItem.OnLaunchFilelink += new ApplicationItem.FilelinkLaunchEventHandler(LaunchFilelink); globalApplicationItemList.Add(applicationItem); } } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs 2007-07-27 18:24:42 UTC (rev 779) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs 2007-07-28 08:35:10 UTC (rev 780) @@ -228,7 +228,7 @@ private void AddItem() { - FileItem file = new FileItem(currentApplication.db); + FileItem file = new FileItem(); file.AppID = currentApplication.AppID; // CRUCIAL!! :-) FileDetailsForm frmFileDetails = new FileDetailsForm(); frmFileDetails.CurApp = currentApplication; @@ -541,7 +541,7 @@ foreach (ListViewItem curItem in fileListView.SelectedItems) { FileItem curFile = (FileItem)curItem.Tag; - FilelinkItem newLink = new FilelinkItem(currentApplication.db); + FilelinkItem newLink = new FilelinkItem(); // example: "add the 'MAME' game 'r-type' to the 'top 20 shooters'" // 'MAME' : targetAppID // 'r-type': fileid Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs 2007-07-27 18:24:42 UTC (rev 779) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs 2007-07-28 08:35:10 UTC (rev 780) @@ -34,7 +34,7 @@ using GUIPrograms; using GUIPrograms.Items; using GUIPrograms.Database; -using SQLite.NET; +using System.Data.SQLite; namespace GUIPrograms.Design @@ -116,9 +116,11 @@ List<ListItem> listItemList = new List<ListItem>(); - SQLiteResultSet resultSet = null; + SQLiteCommand command = DatabaseHandler.SqlLiteConn.CreateCommand(); + + - string sqlStmt = @" + command.CommandText = @" SELECT * @@ -129,29 +131,27 @@ try { - resultSet = DatabaseHandler.sqlDB.Execute(sqlStmt); + + using (SQLiteDataReader dataReader = command.ExecuteReader()) + { + while (dataReader.Read()) + { + + ListItem listItem = new ListItem(dataReader[1].ToString(), Convert.ToInt32(dataReader[0])); + listItemList.Add(listItem); + + } + } } catch (Exception exception) { throw exception; } - if (resultSet.Rows.Count > 0) - { - for (int i = 0; i < resultSet.Rows.Count; i++) - { - //genreid why oh why cant the implementation offer getvalue from columname... arrghr - //maybe can use the sqlnet provider later on.. - - ListItem listItem = new ListItem(resultSet.Rows[i].fields[1].ToString(), Convert.ToInt32(resultSet.Rows[i].fields[0])); - listItemList.Add(listItem); - } - - comboBox.DataSource = listItemList; comboBox.ValueMember = "Value"; comboBox.DisplayMember = "Text"; - } + } private void UpdateComboBoxes() Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.cs 2007-07-27 18:24:42 UTC (rev 779) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.cs 2007-07-28 08:35:10 UTC (rev 780) @@ -10,7 +10,7 @@ using System.Windows.Forms; using MediaPortal.GUI.Library; using MediaPortal.Util; -using SQLite.NET; +using System.Data.SQLite; using MediaPortal.Configuration; using System.IO; @@ -78,7 +78,7 @@ public SetupForm() { InitializeComponent(); - + appSettingsFileEditView.OnRefreshClick += new EventHandler(this.RefreshClick); //when imagefolder was clicked on filesview... appSettingsFileEditView.OnImageFolderSearch += new EventHandler(this.ImageSearchClick); @@ -341,7 +341,7 @@ #endregion Treeview helper Methods - + private void AttachFilesView() { this.tabControl.TabPages["directoryTabPage"].Controls.Clear(); @@ -360,8 +360,8 @@ this.tabControl.TabPages["directoryTabPage"].Controls.Add(filesProgress); } - + private AppSettingsBase GetCurrentSettingsPage() { AppSettingsBase appSettings = null; @@ -640,7 +640,7 @@ if (pageCurrentSettings != null) { // create a pseudo-appitem and read the values from the xml node - ApplicationItem tempApp = new ApplicationItem(curApp.db); + ApplicationItem tempApp = new ApplicationItem(); tempApp.LoadFromXmlProfile(node); pageCurrentSettings.LoadFromAppItem(tempApp); appSettingsFileEditView.FileExtensionsText = tempApp.ValidExtensions; @@ -686,7 +686,7 @@ { if (SaveAppItem()) { - ApplicationItem newApplication = (ApplicationItem)ApplicationItemFactory.AppFactory.GetApplicationItem(newSourceType, null, 0); + ApplicationItem newApplication = (ApplicationItem)ApplicationItemFactory.AppFactory.GetApplicationItem(newSourceType, null); globalApplicationList.Add(newApplication); newApplication.FatherID = GetTreeNodeApplicationItemId(); @@ -801,8 +801,8 @@ } } - + private void treeView_DragDrop(object sender, DragEventArgs e) { // Retrieve the client coordinates of the drop location. @@ -958,11 +958,17 @@ } } } + + //close conn + if (DatabaseHandler.SqlLiteConn.State == ConnectionState.Open) + { + DatabaseHandler.SqlLiteConn.Close(); + } } - - + + private void DoRefresh() { bool DoIt = false; @@ -1028,10 +1034,7 @@ private void FillComboBox(string tableName, string orderBy, ComboBox comboBox) { - - List<ListItem> listItemList = new List<ListItem>(); - SQLiteResultSet resultSet = null; string sqlStmt = @" SELECT @@ -1044,29 +1047,28 @@ try { - resultSet = DatabaseHandler.sqlDB.Execute(sqlStmt); + + SQLiteCommand command = new SQLiteCommand(DatabaseHandler.SqlLiteConn); + + command.CommandText = sqlStmt; + using (SQLiteDataReader dataReader = command.ExecuteReader()) + { + while (dataReader.Read()) + { + ListItem listItem = new ListItem(dataReader[1].ToString(), Convert.ToInt32(dataReader[0])); + listItemList.Add(listItem); + } + } } catch (Exception exception) { throw exception; } - if (resultSet.Rows.Count > 0) - { - for (int i = 0; i < resultSet.Rows.Count; i++) - { - //genreid why oh why cant the implementation offer getvalue from columname... arrghr - //maybe can use the sqlnet provider later on.. + comboBox.DataSource = listItemList; + comboBox.ValueMember = "Value"; + comboBox.DisplayMember = "Text"; - ListItem listItem = new ListItem(resultSet.Rows[i].fields[1].ToString(), Convert.ToInt32(resultSet.Rows[i].fields[0])); - listItemList.Add(listItem); - } - - - comboBox.DataSource = listItemList; - comboBox.ValueMember = "Value"; - comboBox.DisplayMember = "Text"; - } } private void mameImportToolStripMenuItem_Click(object sender, EventArgs e) @@ -1128,6 +1130,7 @@ private void InsertData(string tableName, string column, string insertValue) { + string sqlStmt = @" INSERT INTO " + tableName + @" @@ -1142,7 +1145,7 @@ try { - DatabaseHandler.sqlDB.Execute(sqlStmt); + DatabaseHandler.ExecuteStmtNonQuery(sqlStmt); } catch (Exception exception) { @@ -1166,7 +1169,7 @@ try { - DatabaseHandler.sqlDB.Execute(sqlStmt); + DatabaseHandler.ExecuteStmtNonQuery(sqlStmt); } catch (Exception exception) { @@ -1189,7 +1192,7 @@ " + column + @" <> 1 "; try { - DatabaseHandler.sqlDB.Execute(sqlStmt); + DatabaseHandler.ExecuteStmtNonQuery(sqlStmt); } catch (Exception exception) { Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs 2007-07-27 18:24:42 UTC (rev 779) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs 2007-07-28 08:35:10 UTC (rev 780) @@ -44,6 +44,8 @@ using GUIPrograms.Items; using GUIPrograms.Database; using GUIPrograms.Design; +using System.Data.SQLite; +using System.Data; namespace GUIPrograms { @@ -93,7 +95,7 @@ } public string Author() { - return "Reconstruct by Northern/Chefkoch"; + return "Reconstruct by Northern.Thanks to chefkoch,waebard"; } public void ShowPlugin() { @@ -427,12 +429,18 @@ { selectedItemIndex = GetSelectedItemNo(); } + + + if (DatabaseHandler.SqlLiteConn.State == ConnectionState.Open) + { + DatabaseHandler.SqlLiteConn.Close(); + } } void InitMyPrograms() { LoadFolderSettings(""); - + if (skipInit) { mapSettings.LastAppID = -1; @@ -444,14 +452,14 @@ lastApp = GetAppByID(mapSettings.LastAppID); if (lastApp != null) { - lastFilepath = lastApp.DefaultFilepath(); + prevFilepath = lastApp.DefaultFilepath(); this.CurrentSortAsc = mapSettings.SortAscending; ViewHandler.CurrentLevel = mapSettings.LastViewLevel; lastApp.ViewHandler = this.ViewHandler; } else { - lastFilepath = ""; + prevFilepath = ""; } UpdateListControl(); ShowThumbPanel(); @@ -465,7 +473,7 @@ static int startWindow = (int)GUIWindow.Window.WINDOW_FILES; protected ProgramSort.SortMethod currentSortMethod = ProgramSort.SortMethod.Name; - string currentView = ""; + bool currentSortAsc = true; ProgramViewHandler viewHandler = ProgramViewHandler.Instance; @@ -474,7 +482,7 @@ DirectoryHistory itemHistory = new DirectoryHistory(); public ApplicationItem lastApp = null; - public string lastFilepath = ""; + public string prevFilepath = ""; public int selectedItemIndex = -1; int slideSpeed = 3000; // speed in milliseconds between two slides long slideTime = 0; @@ -510,12 +518,6 @@ } } - public string CurrentView - { - get { return currentView; } - set { currentView = value; } - } - public int StartWindow { get { return startWindow; } @@ -664,7 +666,7 @@ protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { base.OnClicked(controlId, control, actionType); - + if (control == btnViewAs) { mapSettings.SwitchToNextViewLayout(); @@ -693,7 +695,7 @@ if (lastApp != null) { lastApp.Refresh(true); - lastFilepath = lastApp.DefaultFilepath(); + prevFilepath = lastApp.DefaultFilepath(); // todo: reset viewHandler UpdateButtonStates(); UpdateListControl(); @@ -758,11 +760,8 @@ _lastThumbnailPath = ThumbnailPath; } - RenderThumbnail(timePassed); } - - #endregion #region Display @@ -840,7 +839,6 @@ btnSortBy.Label = sortBy; btnSortBy.IsAscending = CurrentSortAsc; } - SetLabels(); } void ShowThumbPanel() @@ -931,6 +929,7 @@ { GUIControl.SelectItemControl(GetID, facadeView.GetID, selectedItemIndex); } + SetLabels(); } int DisplayFiles() @@ -938,10 +937,10 @@ if (lastApp == null) return 0; // Refresh FileList if view has changed, while this appItem was not active - if (lastApp.CurrentView != this.CurrentView) + if ((lastApp.CurrentView != ViewHandler.CurrentView) || (lastApp.filesAreLoaded == false)) { lastApp.LoadFiles(); - lastApp.CurrentView = this.CurrentView; + lastApp.CurrentView = ViewHandler.CurrentView; } int totalFiles = lastApp.DisplayFiles(lastApp.FileDirectory, facadeView); @@ -1020,11 +1019,10 @@ { if (lastApp != null) { - if ((lastFilepath != null) && (lastFilepath != "") && (lastFilepath != lastApp.FileDirectory)) + if ((prevFilepath != null) && (prevFilepath != "") && (prevFilepath != lastApp.FileDirectory)) { // back item in filelist clicked - string newFilepath = Path.GetDirectoryName(lastFilepath); - lastFilepath = newFilepath; + prevFilepath = Path.GetDirectoryName(prevFilepath); } else { @@ -1061,19 +1059,19 @@ if (lastApp != null) { mapSettings.LastAppID = lastApp.AppID; - lastFilepath = lastApp.DefaultFilepath(); + prevFilepath = lastApp.DefaultFilepath(); } else { // back to home screen..... mapSettings.LastAppID = -1; - lastFilepath = ""; + prevFilepath = ""; } } } UpdateButtonStates(); UpdateListControl(); - RestoreItemIndex(lastApp, lastFilepath); + RestoreItemIndex(lastApp, prevFilepath); } else { @@ -1242,9 +1240,6 @@ } } - - - void OnClick() { GUIListItem item = GetSelectedItem(); @@ -1331,6 +1326,8 @@ if (item.Label.Equals(ProgramUtils.cBackLabel)) return; if (item.MusicTag == null) return; + if (item.MusicTag is ApplicationItem) return; + if (item.MusicTag is FileItem) { curFile = (FileItem)item.MusicTag; @@ -1379,7 +1376,6 @@ int nNewWindow = (int)Window.WINDOW_FILES; StartWindow = nNewWindow; CurrentLayout = Layout.List; - CurrentView = GUILocalizeStrings.Get(100000 + GetID);//my files ViewHandler.CurrentView = GUILocalizeStrings.Get(100000 + GetID);//my files if (nNewWindow != GetID) { @@ -1389,8 +1385,6 @@ else { ViewDefinition selectedView = (ViewDefinition)ViewHandler.Views[dlg.SelectedLabel - 1]; - CurrentView = selectedView.Name; - ViewHandler.CurrentView = selectedView.Name; int nNewWindow = (int)Window.WINDOW_FILES; if (GetID != nNewWindow) Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj 2007-07-27 18:24:42 UTC (rev 779) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj 2007-07-28 08:35:10 UTC (rev 780) @@ -43,6 +43,7 @@ <Reference Include="Microsoft.DirectX.Direct3D, Version=1.0.2902.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> <Reference Include="System" /> <Reference Include="System.Data" /> + <Reference Include="System.Data.SQLite, Version=1.0.44.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=x86" /> <Reference Include="System.Drawing" /> <Reference Include="System.Management" /> <Reference Include="System.Runtime.Serialization.Formatters.Soap" /> @@ -163,6 +164,7 @@ <Content Include="MetaData\myProgramsAltPreconfiguration.xml" /> <Content Include="skin\BlueTwo\myprograms.xml" /> <Content Include="skin\BlueTwo\myProgramsAltFileInfo.xml" /> + <Content Include="SqlNet\System.Data.SQLite.DLL" /> </ItemGroup> <ItemGroup> <EmbeddedResource Include="Design\AppFilesImportProgress.resx"> Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAltFileInfo.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAltFileInfo.cs 2007-07-27 18:24:42 UTC (rev 779) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAltFileInfo.cs 2007-07-28 08:35:10 UTC (rev 780) @@ -233,14 +233,11 @@ { coverArtImage = currentFileItem.Imagefile; } - - - } } catch (Exception ex2) { - Log.Error("GUIVideoInfo: Error creating new thumbs for {0} - {1}", currentFileItem.Imagefile, ex2.Message); + Log.Error("GUIProgramsAltInfo: Error creating new thumbs for {0} - {1}", currentFileItem.Imagefile, ex2.Message); } currentFileItem.SetProperties(); } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/GamebaseImport.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/GamebaseImport.cs 2007-07-27 18:24:42 UTC (rev 779) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/GamebaseImport.cs 2007-07-28 08:35:10 UTC (rev 780) @@ -51,17 +51,16 @@ public event MyEventHandler OnSendMessage = null; - public GamebaseImport(ApplicationItem objApp, SQLiteClient objDB) + public GamebaseImport(ApplicationItem objApp) { applicationItem = objApp; - sqlDB = objDB; } void DBImportGamebaseItem(OleDbDataReader myReader, string romFilename, string imgFilename, int curPos, int maxGames) { - FileItem curFile = new FileItem(sqlDB); + FileItem curFile = new FileItem(); curFile.FileID = -1; // to force an INSERT statement when writing the item curFile.AppID = applicationItem.AppID; curFile.Title = myReader["name"].ToString(); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/MameImport.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/MameImport.cs 2007-07-27 18:24:42 UTC (rev 779) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/MameImport.cs 2007-07-28 08:35:10 UTC (rev 780) @@ -31,7 +31,7 @@ using System.IO; using Core.Util; using MediaPortal.GUI.Library; -using SQLite.NET; +using System.Data.SQLite; using System.Text.RegularExpressions; using System.Text; @@ -49,7 +49,6 @@ public class MameImport { ApplicationItem currentApplication = null; - SQLiteClient sqliteClient = null; // event: read new file public delegate void MyEventHandler(string informationMessage, int progressBarCtr); @@ -76,11 +75,10 @@ List<string> localRomNames = new List<string>(); - public MameImport(ApplicationItem applicationItem, SQLiteClient objDB) + public MameImport(ApplicationItem applicationItem) { currentApplication = applicationItem; - sqliteClient = objDB; } @@ -106,7 +104,6 @@ { while ((line = streamReader.ReadLine()) != null) { - Match match = regexMameGameName.Match(line); if (match.Success) @@ -323,11 +320,18 @@ localRomNames.Reverse(); double total = localRomNames.Count; - foreach (string fileName in localRomNames) - {// - FillFileItem(fileName, i, total); - i++; + + using (SQLiteTransaction transaction = DatabaseHandler.SqlLiteConn.BeginTransaction()) + { + foreach (string fileName in localRomNames) + {// + FillFileItem(fileName, i, total); + i++; + } + transaction.Commit(); } + + SendText("Import done...................", 100); } @@ -373,7 +377,7 @@ if ((!onlyOriginals) || (onlyOriginals && (!cloneRomDictionary.ContainsKey(curRomname)))) { - FileItem curFile = new FileItem(sqliteClient); + FileItem curFile = new FileItem(); curFile.AppID = currentApplication.AppID; curFile.Filename = fullRomname; curFile.Imagefile = GetImageFile(curRomname); @@ -435,7 +439,8 @@ ProcessFullEntry(curFile, fullEntry); ProcessGenreEntry(curFile, genreEntry); ProcessVersionEntry(curFile, versionEntry); - + + int LexiconId = DatabaseHandler.LexiconDataExists("tblPlatform", "platform", "Arcade"); curFile.PlatformId = LexiconId; @@ -455,8 +460,7 @@ } } - - void ProcessFullEntry(FileItem curFile, string fullEntry) + void ProcessFullEntry(FileItem curFile, string fullEntry) { // mspacman "Ms. Pac-Man" Match m = regexMameGameName.Match(fullEntry); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs 2007-07-27 18:24:42 UTC (rev 779) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs 2007-07-28 08:35:10 UTC (rev 780) @@ -25,10 +25,11 @@ using System; using System.Collections.Generic; -using System.Diagnostics; +using System.Diagnostics; using System.IO; using System.Xml; -using SQLite.NET; +using System.Data.SQLite; +using System.Data; using MediaPortal.Configuration; using MediaPortal.GUI.Library; @@ -47,8 +48,6 @@ { #region Variables - - int appID; int fatherID; string title; @@ -68,22 +67,16 @@ string currentView = ""; + public List<BaseItem> ItemList = new List<BaseItem>(); public bool filesAreLoaded = false; // load on demand.... - // protected FileItemList fileList = null; + // protected FileItemList fileList = null; public bool linksAreLoaded = false; // load on demand.... - - bool importMamePlaychoice10 = false; bool importMameMahjong = false; bool refreshGUIAllowed = false; - - - - - // more variables, maybe need some renaming or anything else Process proc; ItemType sourceType; string sourceFile; @@ -103,18 +96,11 @@ protected string lastFilepath = ""; // cached path - //private DatabaseSorter dbPc = new DatabaseSorter(); - //private ProgramSort dbPc = new ProgramSort(ProgramSort.SortMethod.Name, true); - #endregion #region Properties // Helper Routines - public SQLiteClient db - { - get { return sqlDB; } - } public int AppID { @@ -211,7 +197,6 @@ set { appPosition = value; } } - public string CurrentView { get { return currentView; } @@ -229,7 +214,6 @@ set { importMameMahjong = value; } } - // more Properties, maybe need some renaming or anything else public string FileDirectory { @@ -301,10 +285,10 @@ #region Constructor - public ApplicationItem(SQLiteClient initSqlDb) : base(initSqlDb) + public ApplicationItem() { - - // .. init member variables ... + + // .. init member variables ... appID = -1; fatherID = -1; title = ""; @@ -333,10 +317,7 @@ #endregion - - - - protected void LaunchFilelink(FilelinkItem curLink, bool MPGUIMode) + protected void LaunchFilelink(FilelinkItem curLink, bool MPGUIMode) { /*ApplicationItem targetApp = GetAppByID(curLink.TargetAppID); if (targetApp != null) @@ -356,9 +337,6 @@ protected int GetID = ProgramUtils.GetID; - - - public FileItem PrevFile(FileItem curFile) { if (ItemList == null) return null; @@ -402,13 +380,13 @@ // Launch File by item if (mpGuiMode) - curFileItem.UpdateLaunchInfo(); + curFileItem.UpdateLaunchInfo(); ProcessStartInfo procStart = new ProcessStartInfo(); if (this.Filename != "") { // use the APPLICATION launcher and add current file information - + // filename of the application procStart.FileName = this.Filename; @@ -480,7 +458,8 @@ proc.StartInfo = procStart; ProgramUtils.StartProcess(proc, this.WaitForExit); - */Utils.StartProcess(procStart, this.WaitForExit); + */ + Utils.StartProcess(procStart, this.WaitForExit); if (mpGuiMode) { @@ -533,6 +512,42 @@ } } + public override void ItemLoad(int appID, string pathSubfolders) + { + + try + { + ItemList.Clear(); + + filePath = pathSubfolders; + string sqlQuery = ViewHandler.BuildQuery(appID, pathSubfolders); + DataTable dataTable = new DataTable(); + SQLiteCommand command = sqlDB.CreateCommand(); + command.CommandText = sqlQuery; + SQLiteDataAdapter dataAdapter = new SQLiteDataAdapter(command); + dataAdapter.Fill(dataTable); + + foreach (DataRow row in dataTable.Rows) + { + if (ViewHandler.IsFilterQuery) + { + FilterItem curFile = (FilterItem)ApplicationItemFactory.AppFactory.GetApplicationItem(ItemType.FILTERITEM, row); + ItemList.Add(curFile); + } + else + { + FileItem curFile = (FileItem)ApplicationItemFactory.AppFactory.GetApplicationItem(ItemType.FILEITEM, row); + ItemList.Add(curFile); + } + } + + } + catch (SQLiteException ex) + { + Log.Info("Filedatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + } + protected void LaunchCmd(string commands) { string results = ""; @@ -589,29 +604,24 @@ public virtual int DisplayFiles(string filePath, GUIFacadeControl facadeView) { int totalItems = 0; - if (filePath != lastFilepath) - { - ItemLoad(AppID, filePath); - //Filelinks.Load(AppID, filePath); - } + totalItems = totalItems + DisplayItemList(filePath, this.ItemList, facadeView); - // totalItems = totalItems + DisplayArrayList(filePath, this.Filelinks, facadeView); - lastFilepath = filePath; + return totalItems; } - public override void OnClick(BaseItem baseItem,GUIPrograms guiPrograms) + public override void OnClick(BaseItem baseItem, GUIPrograms guiPrograms) { ApplicationItem candidate = (ApplicationItem)baseItem; guiPrograms.SaveItemIndex(guiPrograms.GetSelectedItemNo().ToString(), guiPrograms.lastApp, lastFilepath); guiPrograms.lastApp = candidate; guiPrograms.mapSettings.LastAppID = guiPrograms.lastApp.AppID; - guiPrograms.lastFilepath = guiPrograms.lastApp.DefaultFilepath(); + guiPrograms.prevFilepath = guiPrograms.lastApp.DefaultFilepath(); guiPrograms.ViewHandler.CurrentLevel = 0; guiPrograms.lastApp.ViewHandler = guiPrograms.ViewHandler; } - protected int DisplayArrayList(string filePath, List<object> dbItems, GUIFacadeControl facadeView) + /* protected int DisplayArrayList(string filePath, List<object> dbItems, GUIFacadeControl facadeView) { int totalItems = 0; //foreach (FileItem currentFileItem in dbItems) @@ -632,10 +642,8 @@ } return totalItems; } + */ - - - public virtual bool FileEditorAllowed() { return true; // otherwise, override this in child class @@ -680,33 +688,24 @@ /// </summary> private int GetNewAppID() { - if (sqlDB == null) return -1; - + int result = 0; // won't work in multiuser environment :) - SQLiteResultSet results; - int res = 0; - results = sqlDB.Execute("SELECT MAX(applicationId) FROM tblApplicationItem"); - SQLiteResultSet.Row arr = results.Rows[0]; - if (arr.fields[0] != null) + string sqlStmt = "SELECT MAX(applicationId) FROM tblApplicationItem"; + object o = DatabaseHandler.ExecuteStmtScalar(sqlStmt); + if (o.ToString() != "") { - if (arr.fields[0] != "") - { - res = Int32.Parse(arr.fields[0]); - } + result = Convert.ToInt32(o); } - return res + 1; + return result + 1; } private void Insert() { - if (sqlDB == null) return; - string sql = ""; - try { AppID = GetNewAppID(); // important to avoid subsequent inserts! - sql = String.Format(@" + string sqlStmt = @" INSERT INTO tblApplicationItem ( @@ -736,33 +735,33 @@ ) VALUES ( - '"+ AppID + @"', - '"+ FatherID + @"', - '"+ ProgramUtils.Encode(Title) +@"', - '"+ ProgramUtils.Encode(Filename) +@"', - '"+ ProgramUtils.Encode(Arguments) + @"', - '"+ ProgramUtils.WindowStyleToStr(WindowStyle) +@"', - '"+ ProgramUtils.Encode(StartupDir) +@"', - '"+ ProgramUtils.BooleanToStr(UseShellExecute) +@"', - '"+ ProgramUtils.BooleanToStr(UseQuotes) +@"', - '"+ ProgramUtils.ApplicationTypeToString(SourceType) +@"', - '"+ ProgramUtils.Encode(Source) +@"', - '"+ ProgramUtils.Encode(Imagefile) +@"', - '"+ ProgramUtils.Encode(FileDirectory) +@"', - '"+ ProgramUtils.Encode(ImageDirectory)+@"', - '"+ ProgramUtils.Encode(ValidExtensions)+@"', - '"+ ProgramUtils.BooleanToStr(importValidImagesOnly)+@"', - '"+ Position+@"', - '"+ ProgramUtils.BooleanToStr(Enabled)+@"', - '" + ProgramUtils.BooleanToStr(RefreshGUIAllowed)+@"', - '"+ ProgramUtils.Encode(SystemDefault)+@"', - '"+ ProgramUtils.BooleanToStr(WaitForExit) +@"', - '"+ ProgramUtils.Encode(PreLaunch)+@"', - '"+ ProgramUtils.Encode(PostLaunch)+@"' + " + AppID + @", + " + FatherID + @", + '" + ProgramUtils.Encode(Title) + @"', + '" + ProgramUtils.Encode(Filename) + @"', + '" + ProgramUtils.Encode(Arguments) + @"', + '" + ProgramUtils.WindowStyleToStr(WindowStyle) + @"', + '" + ProgramUtils.Encode(StartupDir) + @"', + " + ProgramUtils.TrueOrFalseToInt(UseShellExecute.ToString()) + @", + '" + UseQuotes + @"', + '" + ProgramUtils.ApplicationTypeToString(SourceType) + @"', + '" + ProgramUtils.Encode(Source) + @"', + '" + ProgramUtils.Encode(Imagefile) + @"', + '" + ProgramUtils.Encode(FileDirectory) + @"', + '" + ProgramUtils.Encode(ImageDirectory) + @"', + '" + ProgramUtils.Encode(ValidExtensions) + @"', + " + ProgramUtils.TrueOrFalseToInt(importValidImagesOnly.ToString()) + @", + " + Position + @", + " + ProgramUtils.TrueOrFalseToInt(Enabled.ToString()) + @", + " + ProgramUtils.TrueOrFalseToInt(RefreshGUIAllowed.ToString()) + @", + '" + ProgramUtils.Encode(SystemDefault) + @"', + " + ProgramUtils.TrueOrFalseToInt(WaitForExit.ToString()) + @", + '" + ProgramUtils.Encode(PreLaunch) + @"', + '" + ProgramUtils.Encode(PostLaunch) + @"' )" - - ); - sqlDB.Execute(sql); + ; + + DatabaseHandler.ExecuteStmtNonQuery(sqlStmt); } catch (SQLiteException ex) { @@ -772,15 +771,13 @@ private void Update() { - if (sqlDB == null) return; + if (AppID == -1) return; - string sql = ""; - try { - sql = String.Format( - @"UPDATE + string sqlStmt = + @"UPDATE tblApplicationItem SET title = '" + ProgramUtils.Encode(Title) + @"', @@ -788,44 +785,43 @@ arguments = '" + ProgramUtils.Encode(Arguments) + @"', windowstyle = '" + ProgramUtils.WindowStyleToStr(WindowStyle) + @"', startupdir = '" + ProgramUtils.Encode(StartupDir) + @"', - useShellExecute = '" + ProgramUtils.BooleanToStr(UseShellExecute) + @"', - useQuotes = '" + ProgramUtils.BooleanToStr(UseQuotes) + @"', + useShellExecute = " + ProgramUtils.TrueOrFalseToInt(UseShellExecute.ToString()) + @", + useQuotes = " + ProgramUtils.TrueOrFalseToInt(UseQuotes.ToString()) + @", applicationItemType = '" + ProgramUtils.ApplicationTypeToString(SourceType) + @"', source = '" + ProgramUtils.Encode(Source) + @"', imagefile = '" + ProgramUtils.Encode(Imagefile) + @"', filedirectory = '" + ProgramUtils.Encode(FileDirectory) + @"', imagedirectory = '" + ProgramUtils.Encode(ImageDirectory) + @"', validExtensions = '" + ProgramUtils.Encode(ValidExtensions) + @"', - importValidImagesOnly = '" + ProgramUtils.BooleanToStr(importValidImagesOnly) + @"', + importValidImagesOnly = " + ProgramUtils.TrueOrFalseToInt(importValidImagesOnly.ToString()) + @", iposition = " + Position + @", - enabled = '" + ProgramUtils.BooleanToStr(Enabled) + @"', + enabled = " + ProgramUtils.TrueOrFalseToInt(Enabled.ToString()) + @", fatherNodeId = '" + FatherID + @"', - refreshGUIAllowed = '" + ProgramUtils.BooleanToStr(RefreshGUIAllowed) +@"', + refreshGUIAllowed = " + ProgramUtils.TrueOrFalseToInt(RefreshGUIAllowed.ToString()) + @", systemDefault = '" + ProgramUtils.Encode(SystemDefault) + @"', - waitForExit = '" + ProgramUtils.BooleanToStr(WaitForExit) + @"', + waitForExit = " + ProgramUtils.TrueOrFalseToInt(WaitForExit.ToString()) + @", preLaunch = '" + ProgramUtils.Encode(PreLaunch) + @"', postLaunch = '" + ProgramUtils.Encode(PostLaunch) + @"' - WHERE applicationId = " + AppID); - sqlDB.Execute(sql); + WHERE applicationId = " + AppID; + + DatabaseHandler.ExecuteStmtNonQuery(sqlStmt); ; } catch (SQLiteException ex) { Log.Info("programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); - Log.Info("sql \n{0}", sql); } } public void Delete() { - if (sqlDB == null) return; if (AppID == -1) return; try { DeleteFiles(); DeleteFileLinks(); - sqlDB.Execute(String.Format("delete from tblApplicationItem where applicationId = {0}", AppID)); + DatabaseHandler.ExecuteStmtNonQuery("delete from tblApplicationItem where applicationId = " + AppID); } catch (SQLiteException ex) { @@ -836,12 +832,11 @@ protected void DeleteFiles() { - if (sqlDB == null) return; - if (AppID == -1) return; + if (AppID == -1) return; try { - sqlDB.Execute(String.Format("delete from tblFileItem where applicationId = {0}", AppID)); + DatabaseHandler.ExecuteStmtNonQuery("delete from tblFileItem where applicationId = " + AppID); } catch (SQLiteException ex) { @@ -851,12 +846,11 @@ protected void DeleteFileLinks() { - if (sqlDB == null) return; if (AppID == -1) return; try { - sqlDB.Execute(String.Format("delete from tblFilterItem where applicationId = {0} or grouperappid = {0}", AppID)); + DatabaseHandler.ExecuteStmtNonQuery("delete from tblFilterItem where applicationId = " + AppID + " or grouperappid = " + AppID); } catch (SQLiteException ex) { @@ -866,18 +860,11 @@ public virtual void LoadFiles() { - //linksAreLoaded = true; - if (sqlDB == null) return; - lastFilepath = ""; ItemLoad(AppID, ""); filesAreLoaded = true; } - - - - public void InsertOrUpdateSettings() { if (appID == -1) @@ -896,33 +883,32 @@ // query with data to fix string sqlSelectDataToFix = String.Format("select fi.applicationId, fi.fileid as oldfileid, f.fileid as newfileid, fi.filename as filename from tblFilterItem fi, tblFileItem f where fi.applicationId = f.applicationId and fi.filename = f.filename and fi.applicationId = {0}", AppID); + DataTable dataTable = null; - // update command to fix one single link - string sqlFixOneLink = "update tblFilterItem set fileID = {0}, tag = 0 where applicationId = {1} and filename = '{2}'"; - - SQLiteResultSet rows2fix; - - try { - // 1) initialize TAG - sqlDB.Execute(String.Format("update tblFilterItem set tag = 1234 where applicationId = {0}", AppID)); + // 1) initialize TAG.. // update command to fix one single link + DatabaseHandler.ExecuteStmtNonQuery("update tblFilterItem set tag = 1234 where applicationId = " + AppID); + dataTable = DatabaseHandler.ExecuteStmtDataTable(sqlSelectDataToFix); + // 2) fix all file... [truncated message content] |
From: <gre...@us...> - 2007-07-27 18:24:44
|
Revision: 779 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=779&view=rev Author: gregmac45 Date: 2007-07-27 11:24:42 -0700 (Fri, 27 Jul 2007) Log Message: ----------- Added getSiteId Methods Added Configuration screen Added OnlineVideoSettings class Fixed youtube not working when user and password were Added initial support for Stage6 Modified Paths: -------------- trunk/plugins/OnlineVideos/Source/OnlineVideos/BlipTvUtil.cs trunk/plugins/OnlineVideos/Source/OnlineVideos/BreakUtil.cs trunk/plugins/OnlineVideos/Source/OnlineVideos/CbsUtil.cs trunk/plugins/OnlineVideos/Source/OnlineVideos/DailyMotionUtil.cs trunk/plugins/OnlineVideos/Source/OnlineVideos/DownloadedVideoUtil.cs trunk/plugins/OnlineVideos/Source/OnlineVideos/GUIOnlineVideos.cs trunk/plugins/OnlineVideos/Source/OnlineVideos/GameTrailersUtil.cs trunk/plugins/OnlineVideos/Source/OnlineVideos/GoogleVideoUtil.cs trunk/plugins/OnlineVideos/Source/OnlineVideos/GrouperUtil.cs trunk/plugins/OnlineVideos/Source/OnlineVideos/GubaUtil.cs trunk/plugins/OnlineVideos/Source/OnlineVideos/ImageDowloader.cs trunk/plugins/OnlineVideos/Source/OnlineVideos/ItunesTrailerUtil.cs trunk/plugins/OnlineVideos/Source/OnlineVideos/ItunesUtils/HttpReader.cs trunk/plugins/OnlineVideos/Source/OnlineVideos/ItunesUtils/ItmsHelper.cs trunk/plugins/OnlineVideos/Source/OnlineVideos/Main.cs trunk/plugins/OnlineVideos/Source/OnlineVideos/MetaCafeUtil.cs trunk/plugins/OnlineVideos/Source/OnlineVideos/MyVideodeUtil.cs trunk/plugins/OnlineVideos/Source/OnlineVideos/OnlineVideos.csproj trunk/plugins/OnlineVideos/Source/OnlineVideos/RocketboomUtil.cs trunk/plugins/OnlineVideos/Source/OnlineVideos/Runner.csproj trunk/plugins/OnlineVideos/Source/OnlineVideos/SiteUtilBase.cs trunk/plugins/OnlineVideos/Source/OnlineVideos/SiteUtilFactory.cs trunk/plugins/OnlineVideos/Source/OnlineVideos/SoapBoxUtil.cs trunk/plugins/OnlineVideos/Source/OnlineVideos/VideoJugUtil.cs trunk/plugins/OnlineVideos/Source/OnlineVideos/VidiLifeUtil.cs trunk/plugins/OnlineVideos/Source/OnlineVideos/YouTubeUtil.cs Added Paths: ----------- trunk/plugins/OnlineVideos/Source/OnlineVideos/Configuration.Designer.cs trunk/plugins/OnlineVideos/Source/OnlineVideos/Configuration.cs trunk/plugins/OnlineVideos/Source/OnlineVideos/OnlineVideoSettings.cs trunk/plugins/OnlineVideos/Source/OnlineVideos/Stage6Util.cs Modified: trunk/plugins/OnlineVideos/Source/OnlineVideos/BlipTvUtil.cs =================================================================== --- trunk/plugins/OnlineVideos/Source/OnlineVideos/BlipTvUtil.cs 2007-07-27 15:26:53 UTC (rev 778) +++ trunk/plugins/OnlineVideos/Source/OnlineVideos/BlipTvUtil.cs 2007-07-27 18:24:42 UTC (rev 779) @@ -19,7 +19,10 @@ { public class BlipTvUtil:SiteUtilBase { - + public override string getSiteId() + { + return "9"; + } public override String getUrl(String fsId) { Modified: trunk/plugins/OnlineVideos/Source/OnlineVideos/BreakUtil.cs =================================================================== --- trunk/plugins/OnlineVideos/Source/OnlineVideos/BreakUtil.cs 2007-07-27 15:26:53 UTC (rev 778) +++ trunk/plugins/OnlineVideos/Source/OnlineVideos/BreakUtil.cs 2007-07-27 18:24:42 UTC (rev 779) @@ -19,6 +19,10 @@ { public class BreakUtil:SiteUtilBase { + public override string getSiteId() + { + return "break"; + } public override String getUrl(String fsId) { @@ -32,7 +36,7 @@ String lsFileName = loMatch.Groups[1].Value; String lsPathName = loMatch.Groups[2].Value; lsUrl = lsUrl+lsPathName+"/"+lsFileName+".flv"; - Log.Write("break flv url = {0}",lsUrl); + Log.Info("break flv url = {0}",lsUrl); return lsUrl; } public override List<GUIOnlineVideos.VideoInfo> getVideoList(string fsUrl) Modified: trunk/plugins/OnlineVideos/Source/OnlineVideos/CbsUtil.cs =================================================================== --- trunk/plugins/OnlineVideos/Source/OnlineVideos/CbsUtil.cs 2007-07-27 15:26:53 UTC (rev 778) +++ trunk/plugins/OnlineVideos/Source/OnlineVideos/CbsUtil.cs 2007-07-27 18:24:42 UTC (rev 779) @@ -19,8 +19,11 @@ { public class CbsUtil:SiteUtilBase { + public override string getSiteId() + { + return "10"; + } - public override String getUrl(String fsId) { @@ -92,7 +95,7 @@ //loRssItem. //This loops through each node found in the nodeList and adds the //Node data to the DataTable. - XmlAttributeCollection ac; + //XmlAttributeCollection ac; List<GUIOnlineVideos.VideoInfo> loRssItems = new List<GUIOnlineVideos.VideoInfo>(); GUIOnlineVideos.VideoInfo loRssItem; //GUIListItem loListItem; Added: trunk/plugins/OnlineVideos/Source/OnlineVideos/Configuration.Designer.cs =================================================================== --- trunk/plugins/OnlineVideos/Source/OnlineVideos/Configuration.Designer.cs (rev 0) +++ trunk/plugins/OnlineVideos/Source/OnlineVideos/Configuration.Designer.cs 2007-07-27 18:24:42 UTC (rev 779) @@ -0,0 +1,387 @@ +/* + * Created by SharpDevelop. + * User: GZamor1 + * Date: 7/24/2007 + * Time: 9:34 AM + * + * To change this template use Tools | Options | Coding | Edit Standard Headers. + */ + +namespace OnlineVideos +{ + partial class Configuration + { + /// <summary> + /// Designer variable used to keep track of non-visual components. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Disposes resources used by the form. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing) { + if (components != null) { + components.Dispose(); + } + } + base.Dispose(disposing); + } + + /// <summary> + /// This method is required for Windows Forms designer support. + /// Do not change the method contents inside the source code editor. The Forms designer might + /// not be able to load this method if it was changed manually. + /// </summary> + private void InitializeComponent() + { + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.General_Tab = new System.Windows.Forms.TabPage(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.btnAdd = new System.Windows.Forms.Button(); + this.CategoryList = new System.Windows.Forms.ListBox(); + this.btnDeleteRss = new System.Windows.Forms.Button(); + this.txtRssUrl = new System.Windows.Forms.TextBox(); + this.btnRssSave = new System.Windows.Forms.Button(); + this.label26 = new System.Windows.Forms.Label(); + this.txtRssName = new System.Windows.Forms.TextBox(); + this.label25 = new System.Windows.Forms.Label(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.txtPassword = new System.Windows.Forms.TextBox(); + this.txtUserId = new System.Windows.Forms.TextBox(); + this.chkAgeConfirm = new System.Windows.Forms.CheckBox(); + this.label30 = new System.Windows.Forms.Label(); + this.label29 = new System.Windows.Forms.Label(); + this.btnSiteSave = new System.Windows.Forms.Button(); + this.TxtSiteId = new System.Windows.Forms.TextBox(); + this.txtSiteName = new System.Windows.Forms.TextBox(); + this.label28 = new System.Windows.Forms.Label(); + this.label27 = new System.Windows.Forms.Label(); + this.siteList = new System.Windows.Forms.ListBox(); + this.chkEnabled = new System.Windows.Forms.CheckBox(); + this.txtFilters = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.txtThumbLoc = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.tabControl1.SuspendLayout(); + this.General_Tab.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.groupBox1.SuspendLayout(); + this.SuspendLayout(); + // + // tabControl1 + // + this.tabControl1.Controls.Add(this.General_Tab); + this.tabControl1.Location = new System.Drawing.Point(13, 13); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(479, 566); + this.tabControl1.TabIndex = 0; + // + // General_Tab + // + this.General_Tab.Controls.Add(this.groupBox2); + this.General_Tab.Controls.Add(this.groupBox1); + this.General_Tab.Controls.Add(this.txtFilters); + this.General_Tab.Controls.Add(this.label2); + this.General_Tab.Controls.Add(this.txtThumbLoc); + this.General_Tab.Controls.Add(this.label1); + this.General_Tab.Location = new System.Drawing.Point(4, 22); + this.General_Tab.Name = "General_Tab"; + this.General_Tab.Padding = new System.Windows.Forms.Padding(3); + this.General_Tab.Size = new System.Drawing.Size(471, 540); + this.General_Tab.TabIndex = 0; + this.General_Tab.Text = "General"; + this.General_Tab.UseVisualStyleBackColor = true; + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.btnAdd); + this.groupBox2.Controls.Add(this.CategoryList); + this.groupBox2.Controls.Add(this.btnDeleteRss); + this.groupBox2.Controls.Add(this.txtRssUrl); + this.groupBox2.Controls.Add(this.btnRssSave); + this.groupBox2.Controls.Add(this.label26); + this.groupBox2.Controls.Add(this.txtRssName); + this.groupBox2.Controls.Add(this.label25); + this.groupBox2.Location = new System.Drawing.Point(15, 295); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(411, 239); + this.groupBox2.TabIndex = 18; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "Site Categories"; + // + // btnAdd + // + this.btnAdd.Location = new System.Drawing.Point(87, 200); + this.btnAdd.Name = "btnAdd"; + this.btnAdd.Size = new System.Drawing.Size(75, 23); + this.btnAdd.TabIndex = 17; + this.btnAdd.Text = "Add"; + this.btnAdd.UseVisualStyleBackColor = true; + this.btnAdd.Click += new System.EventHandler(this.BtnAddClick); + // + // CategoryList + // + this.CategoryList.FormattingEnabled = true; + this.CategoryList.Location = new System.Drawing.Point(22, 19); + this.CategoryList.Name = "CategoryList"; + this.CategoryList.Size = new System.Drawing.Size(120, 173); + this.CategoryList.TabIndex = 6; + this.CategoryList.SelectedIndexChanged += new System.EventHandler(this.CategoryListSelectedIndexChanged); + // + // btnDeleteRss + // + this.btnDeleteRss.Location = new System.Drawing.Point(6, 200); + this.btnDeleteRss.Name = "btnDeleteRss"; + this.btnDeleteRss.Size = new System.Drawing.Size(75, 23); + this.btnDeleteRss.TabIndex = 14; + this.btnDeleteRss.Text = "Delete"; + this.btnDeleteRss.UseVisualStyleBackColor = true; + this.btnDeleteRss.Click += new System.EventHandler(this.BtnDeleteRssClick); + // + // txtRssUrl + // + this.txtRssUrl.Location = new System.Drawing.Point(225, 69); + this.txtRssUrl.Name = "txtRssUrl"; + this.txtRssUrl.Size = new System.Drawing.Size(180, 20); + this.txtRssUrl.TabIndex = 16; + // + // btnRssSave + // + this.btnRssSave.Location = new System.Drawing.Point(225, 95); + this.btnRssSave.Name = "btnRssSave"; + this.btnRssSave.Size = new System.Drawing.Size(75, 23); + this.btnRssSave.TabIndex = 13; + this.btnRssSave.Text = "Save"; + this.btnRssSave.UseVisualStyleBackColor = true; + this.btnRssSave.Click += new System.EventHandler(this.BtnRssSaveClick); + // + // label26 + // + this.label26.Location = new System.Drawing.Point(148, 43); + this.label26.Name = "label26"; + this.label26.Size = new System.Drawing.Size(71, 23); + this.label26.TabIndex = 9; + this.label26.Text = "RSS Name"; + // + // txtRssName + // + this.txtRssName.Location = new System.Drawing.Point(225, 43); + this.txtRssName.Name = "txtRssName"; + this.txtRssName.Size = new System.Drawing.Size(180, 20); + this.txtRssName.TabIndex = 15; + // + // label25 + // + this.label25.Location = new System.Drawing.Point(148, 69); + this.label25.Name = "label25"; + this.label25.Size = new System.Drawing.Size(71, 17); + this.label25.TabIndex = 10; + this.label25.Text = "RSS URL"; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.txtPassword); + this.groupBox1.Controls.Add(this.txtUserId); + this.groupBox1.Controls.Add(this.chkAgeConfirm); + this.groupBox1.Controls.Add(this.label30); + this.groupBox1.Controls.Add(this.label29); + this.groupBox1.Controls.Add(this.btnSiteSave); + this.groupBox1.Controls.Add(this.TxtSiteId); + this.groupBox1.Controls.Add(this.txtSiteName); + this.groupBox1.Controls.Add(this.label28); + this.groupBox1.Controls.Add(this.label27); + this.groupBox1.Controls.Add(this.siteList); + this.groupBox1.Controls.Add(this.chkEnabled); + this.groupBox1.Location = new System.Drawing.Point(15, 86); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(411, 203); + this.groupBox1.TabIndex = 17; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Sites"; + // + // txtPassword + // + this.txtPassword.Location = new System.Drawing.Point(225, 120); + this.txtPassword.Name = "txtPassword"; + this.txtPassword.Size = new System.Drawing.Size(180, 20); + this.txtPassword.TabIndex = 18; + // + // txtUserId + // + this.txtUserId.Location = new System.Drawing.Point(225, 95); + this.txtUserId.Name = "txtUserId"; + this.txtUserId.Size = new System.Drawing.Size(180, 20); + this.txtUserId.TabIndex = 17; + // + // chkAgeConfirm + // + this.chkAgeConfirm.Location = new System.Drawing.Point(132, 146); + this.chkAgeConfirm.Name = "chkAgeConfirm"; + this.chkAgeConfirm.Size = new System.Drawing.Size(104, 24); + this.chkAgeConfirm.TabIndex = 16; + this.chkAgeConfirm.Text = "Confirm Age"; + this.chkAgeConfirm.UseVisualStyleBackColor = true; + // + // label30 + // + this.label30.Location = new System.Drawing.Point(132, 123); + this.label30.Name = "label30"; + this.label30.Size = new System.Drawing.Size(100, 23); + this.label30.TabIndex = 15; + this.label30.Text = "Password"; + // + // label29 + // + this.label29.Location = new System.Drawing.Point(132, 97); + this.label29.Name = "label29"; + this.label29.Size = new System.Drawing.Size(100, 23); + this.label29.TabIndex = 14; + this.label29.Text = "UserId"; + // + // btnSiteSave + // + this.btnSiteSave.Location = new System.Drawing.Point(132, 176); + this.btnSiteSave.Name = "btnSiteSave"; + this.btnSiteSave.Size = new System.Drawing.Size(75, 23); + this.btnSiteSave.TabIndex = 13; + this.btnSiteSave.Text = "Save"; + this.btnSiteSave.UseVisualStyleBackColor = true; + this.btnSiteSave.Click += new System.EventHandler(this.BtnSiteSaveClick); + // + // TxtSiteId + // + this.TxtSiteId.Location = new System.Drawing.Point(225, 68); + this.TxtSiteId.Name = "TxtSiteId"; + this.TxtSiteId.ReadOnly = true; + this.TxtSiteId.Size = new System.Drawing.Size(180, 20); + this.TxtSiteId.TabIndex = 12; + // + // txtSiteName + // + this.txtSiteName.Location = new System.Drawing.Point(225, 43); + this.txtSiteName.Name = "txtSiteName"; + this.txtSiteName.Size = new System.Drawing.Size(180, 20); + this.txtSiteName.TabIndex = 11; + // + // label28 + // + this.label28.Location = new System.Drawing.Point(132, 69); + this.label28.Name = "label28"; + this.label28.Size = new System.Drawing.Size(100, 23); + this.label28.TabIndex = 10; + this.label28.Text = "Site ID:"; + // + // label27 + // + this.label27.Location = new System.Drawing.Point(132, 46); + this.label27.Name = "label27"; + this.label27.Size = new System.Drawing.Size(100, 23); + this.label27.TabIndex = 9; + this.label27.Text = "Site Name:"; + // + // siteList + // + this.siteList.FormattingEnabled = true; + this.siteList.Location = new System.Drawing.Point(6, 19); + this.siteList.Name = "siteList"; + this.siteList.Size = new System.Drawing.Size(120, 160); + this.siteList.TabIndex = 5; + this.siteList.SelectedIndexChanged += new System.EventHandler(this.SiteListSelectedIndexChanged); + // + // chkEnabled + // + this.chkEnabled.Location = new System.Drawing.Point(132, 19); + this.chkEnabled.Name = "chkEnabled"; + this.chkEnabled.Size = new System.Drawing.Size(104, 24); + this.chkEnabled.TabIndex = 8; + this.chkEnabled.Text = "Enabled"; + this.chkEnabled.UseVisualStyleBackColor = true; + // + // txtFilters + // + this.txtFilters.Location = new System.Drawing.Point(220, 35); + this.txtFilters.Name = "txtFilters"; + this.txtFilters.Size = new System.Drawing.Size(171, 20); + this.txtFilters.TabIndex = 4; + // + // label2 + // + this.label2.Location = new System.Drawing.Point(15, 38); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(199, 23); + this.label2.TabIndex = 3; + this.label2.Text = "Filter out videos with these tags"; + // + // txtThumbLoc + // + this.txtThumbLoc.Location = new System.Drawing.Point(220, 9); + this.txtThumbLoc.Name = "txtThumbLoc"; + this.txtThumbLoc.Size = new System.Drawing.Size(171, 20); + this.txtThumbLoc.TabIndex = 2; + // + // label1 + // + this.label1.Location = new System.Drawing.Point(15, 12); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(107, 23); + this.label1.TabIndex = 1; + this.label1.Text = "Thumbnail Location:"; + // + // Configuration + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(511, 582); + this.Controls.Add(this.tabControl1); + this.Name = "Configuration"; + this.Text = "Configuration"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ConfigurationFormClosing); + this.Load += new System.EventHandler(this.Configuration_Load); + this.tabControl1.ResumeLayout(false); + this.General_Tab.ResumeLayout(false); + this.General_Tab.PerformLayout(); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.ResumeLayout(false); + } + private System.Windows.Forms.Button btnAdd; + private System.Windows.Forms.TextBox txtRssUrl; + private System.Windows.Forms.TextBox txtRssName; + private System.Windows.Forms.ListBox CategoryList; + private System.Windows.Forms.ListBox siteList; + private System.Windows.Forms.CheckBox chkEnabled; + private System.Windows.Forms.Label label27; + private System.Windows.Forms.Label label28; + private System.Windows.Forms.TextBox txtSiteName; + private System.Windows.Forms.TextBox TxtSiteId; + private System.Windows.Forms.Button btnSiteSave; + private System.Windows.Forms.Label label29; + private System.Windows.Forms.Label label30; + private System.Windows.Forms.CheckBox chkAgeConfirm; + private System.Windows.Forms.TextBox txtUserId; + private System.Windows.Forms.TextBox txtPassword; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.Label label25; + private System.Windows.Forms.Label label26; + private System.Windows.Forms.Button btnRssSave; + private System.Windows.Forms.Button btnDeleteRss; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.TextBox txtFilters; + private System.Windows.Forms.TextBox txtThumbLoc; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TabPage General_Tab; + private System.Windows.Forms.TabControl tabControl1; + + void CheckBox1CheckedChanged(object sender, System.EventArgs e) + { + + } + } +} Added: trunk/plugins/OnlineVideos/Source/OnlineVideos/Configuration.cs =================================================================== --- trunk/plugins/OnlineVideos/Source/OnlineVideos/Configuration.cs (rev 0) +++ trunk/plugins/OnlineVideos/Source/OnlineVideos/Configuration.cs 2007-07-27 18:24:42 UTC (rev 779) @@ -0,0 +1,181 @@ +/* + * Created by SharpDevelop. + * User: GZamor1 + * Date: 7/24/2007 + * Time: 9:34 AM + * + * To change this template use Tools | Options | Coding | Edit Standard Headers. + */ + +using System; +using System.Collections.Generic; +using System.Collections; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; +using MediaPortal.GUI.Library; + +namespace OnlineVideos +{ + /// <summary> + /// Description of Configuration. + /// </summary> + public partial class Configuration : Form + { + //private String msSelectedSiteID; + private String msSelectedCategoryName; + private List<GUIOnlineVideos.Site> moSiteList = new List<GUIOnlineVideos.Site>(); + + public Configuration() + { + // + // The InitializeComponent() call is required for Windows Forms designer support. + // + InitializeComponent(); + + // + // TODO: Add constructor code after the InitializeComponent() call. + // + } + public void Configuration_Load(object sender, EventArgs e){ + OnlineVideoSettings settings = OnlineVideoSettings.getInstance(); + txtThumbLoc.Text = settings.msThumbLocation; + String lsFilterList = ""; + String [] lsFilterArray = settings.msFilterArray; + if(lsFilterArray!=null){ + foreach (String lsFilter in lsFilterArray){ + lsFilterList+=lsFilter+","; + } + txtFilters.Text = lsFilterList; + } + foreach(GUIOnlineVideos.Site site in settings.moSiteList.Values){ + siteList.Items.Add(site.name); + moSiteList.Add(site); + } + + } + + void SiteListSelectedIndexChanged(object sender, EventArgs e) + { + if(siteList.SelectedIndex>-1){ + OnlineVideoSettings settings = OnlineVideoSettings.getInstance(); + GUIOnlineVideos.Site site = moSiteList[siteList.SelectedIndex]; + txtSiteName.Text = site.name; + TxtSiteId.Text = site.id; + txtUserId.Text = site.username; + txtPassword.Text = site.password; + chkEnabled.Checked = site.enabled; + chkAgeConfirm.Checked = site.confirmAge; + CategoryList.Items.Clear(); + foreach(String name in site.RssList.Keys){ + CategoryList.Items.Add(name); + } + + } + CategoryList.SelectedIndex = -1; + txtRssUrl.Text = ""; + txtRssName.Text = ""; + } + + void CategoryListSelectedIndexChanged(object sender, EventArgs e) + { + if(CategoryList.SelectedIndex>-1){ + OnlineVideoSettings settings = OnlineVideoSettings.getInstance(); + GUIOnlineVideos.Site site = moSiteList[siteList.SelectedIndex]; + msSelectedCategoryName = CategoryList.SelectedItem.ToString(); + Log.Info("Category change site:{0} with selected category of {1}",site.name,msSelectedCategoryName); + + GUIOnlineVideos.RssLink link = site.RssList[msSelectedCategoryName]; + txtRssUrl.Text = link.url; + txtRssName.Text = link.name; + } + + + } + + void BtnSiteSaveClick(object sender, EventArgs e) + { + OnlineVideoSettings settings = OnlineVideoSettings.getInstance(); + GUIOnlineVideos.Site site = moSiteList[siteList.SelectedIndex]; + //site.id = TxtSiteId; + site.name = txtSiteName.Text; + site.username = txtUserId.Text; + site.password = txtPassword.Text; + site.confirmAge = chkAgeConfirm.Checked; + site.enabled = chkEnabled.Checked; + siteList.Items[siteList.SelectedIndex] = site.name; +// txtSiteName.Text = ""; +// txtUserId.Text = ""; +// chkAgeConfirm.Checked = false; +// TxtSiteId.Text = ""; +// txtUserId.Text = ""; +// txtPassword.Text = ""; +// siteList.SelectedIndex = -1; + //msSelectedSiteName = String.Empty; + //siteList.SelectedIndex = -1; + //settings.moSiteList.Remove(msSelectedSiteName); + //msSelectedSiteName = txtSiteName.Text; + //settings.moSiteList.Add(msSelectedSiteName,site); + } + + void BtnRssSaveClick(object sender, EventArgs e) + { + OnlineVideoSettings settings = OnlineVideoSettings.getInstance(); + GUIOnlineVideos.Site site = moSiteList[siteList.SelectedIndex]; + GUIOnlineVideos.RssLink link = site.RssList[msSelectedCategoryName]; + link.name = txtRssName.Text; + link.url = txtRssUrl.Text; + CategoryList.Items[CategoryList.SelectedIndex] = txtRssName.Text; + //site.RssList.Remove(msSelectedCategoryName); + //msSelectedCategoryName = txtRssName.Text; + //site.RssList.Add(msSelectedCategoryName,link); + CategoryList.SelectedIndex = -1; + } + + void BtnAddClick(object sender, EventArgs e) + { + GUIOnlineVideos.RssLink link = new GUIOnlineVideos.RssLink(); + link.name = "new"; + link.url = "http://"; + link.isDynamic = false; + GUIOnlineVideos.Site site = moSiteList[siteList.SelectedIndex]; + site.RssList.Add(link.name,link); + CategoryList.Items.Add(link.name); + CategoryList.SelectedIndex = CategoryList.Items.Count-1; + txtRssName.Focus(); + } + + + void BtnDeleteRssClick(object sender, EventArgs e) + { + if(CategoryList.SelectedIndex>-1){ + OnlineVideoSettings settings = OnlineVideoSettings.getInstance(); + GUIOnlineVideos.Site site = moSiteList[siteList.SelectedIndex]; + msSelectedCategoryName = CategoryList.SelectedItem.ToString(); + site.RssList.Remove(msSelectedCategoryName); + CategoryList.Items.RemoveAt(CategoryList.SelectedIndex); + txtRssName.Text = ""; + txtRssUrl.Text = ""; + } + + } + + void ConfigurationFormClosing(object sender, FormClosingEventArgs e) + { + OnlineVideoSettings settings = OnlineVideoSettings.getInstance(); + String lsFilter = txtFilters.Text; + String [] lsFilterArray = lsFilter.Split(new char[] { ',' }); + settings.msFilterArray = lsFilterArray; + settings.msThumbLocation = txtThumbLoc.Text; + settings.moSiteList.Clear(); + foreach(GUIOnlineVideos.Site site in moSiteList){ + settings.moSiteList.Add(site.id,site); + } + settings.saveSettings(); + + + } + } +} Modified: trunk/plugins/OnlineVideos/Source/OnlineVideos/DailyMotionUtil.cs =================================================================== --- trunk/plugins/OnlineVideos/Source/OnlineVideos/DailyMotionUtil.cs 2007-07-27 15:26:53 UTC (rev 778) +++ trunk/plugins/OnlineVideos/Source/OnlineVideos/DailyMotionUtil.cs 2007-07-27 18:24:42 UTC (rev 779) @@ -19,7 +19,10 @@ { public class DailyMotionUtil:SiteUtilBase { - + public override string getSiteId() + { + return "6"; + } public override String getUrl(String fsId) { Modified: trunk/plugins/OnlineVideos/Source/OnlineVideos/DownloadedVideoUtil.cs =================================================================== --- trunk/plugins/OnlineVideos/Source/OnlineVideos/DownloadedVideoUtil.cs 2007-07-27 15:26:53 UTC (rev 778) +++ trunk/plugins/OnlineVideos/Source/OnlineVideos/DownloadedVideoUtil.cs 2007-07-27 18:24:42 UTC (rev 779) @@ -20,7 +20,10 @@ { public class DownloadedVideoUtil:SiteUtilBase { - + public override string getSiteId() + { + return "99"; + } public override String getUrl(String fsId) { Modified: trunk/plugins/OnlineVideos/Source/OnlineVideos/GUIOnlineVideos.cs =================================================================== --- trunk/plugins/OnlineVideos/Source/OnlineVideos/GUIOnlineVideos.cs 2007-07-27 15:26:53 UTC (rev 778) +++ trunk/plugins/OnlineVideos/Source/OnlineVideos/GUIOnlineVideos.cs 2007-07-27 18:24:42 UTC (rev 779) @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Collections.Specialized; using System.Text; using System.Xml; using System.Xml.XPath; @@ -16,566 +17,491 @@ namespace OnlineVideos { - public class GUIOnlineVideos : GUIWindow, ISetupForm - { - [SkinControlAttribute(2)] - protected GUIButtonControl btnViewAs = null; - [SkinControlAttribute(50)] - protected GUIFacadeControl facadeView = null; - [SkinControlAttribute(1)] - protected GUIImage logoImage = null; - //private ILog moLog; - protected View currentView = View.Icons; - private Dictionary<String, Site> moSiteList = new Dictionary<String, Site>(); - private String msSelectedSiteId; - private String msSelectedCategoryValue; - private String msSelectedCategoryName; - private State _CurrentState = State.home; - private String msDownloadDir = Directory.GetCurrentDirectory()+"\\"; - private List<VideoInfo> moCurrentVideoList = new List<VideoInfo>(); - private String []msFilterArray; - private String msThumbLocation; - private int miSelectedIndex = 0; - private bool mbPlayFullscreen = true; - public enum State - { - home = 0, - categories = 1, - videos = 2 - } - public enum View - { - List = 0, - Icons = 1, - LargeIcons = 2, - FilmStrip = 3 - } - public class Site - { - public String name; - public String id; - public string username; - public string password; - public bool confirmAge; - public Dictionary<String, RssLink> RssList = new Dictionary<String, RssLink>(); - } - public class RssLink - { - public String name; - public Boolean isDynamic = false; - public String url; - } - public class VideoInfo - { - public String Title; - public String Description; - public String VideoUrl; - public String ImageUrl; - public int Length; - public String Tags; + public class GUIOnlineVideos : GUIWindow, ISetupForm + { + [SkinControlAttribute(2)] + protected GUIButtonControl btnViewAs = null; + [SkinControlAttribute(50)] + protected GUIFacadeControl facadeView = null; + [SkinControlAttribute(1)] + protected GUIImage logoImage = null; + //private ILog moLog; + protected View currentView = View.Icons; + private Dictionary <String, Site> moSiteList = new Dictionary<String, Site>(); + private String msSelectedSiteId; + private String msSelectedCategoryValue; + private String msSelectedCategoryName; + private State _CurrentState = State.home; + private String msDownloadDir = Directory.GetCurrentDirectory()+"\\"; + private List<VideoInfo> moCurrentVideoList = new List<VideoInfo>(); + private String []msFilterArray; + private String msThumbLocation; + private int miSelectedIndex = 0; + private bool mbPlayFullscreen = true; + public enum State + { + home = 0, + categories = 1, + videos = 2 + } + public enum View + { + List = 0, + Icons = 1, + LargeIcons = 2, + FilmStrip = 3 + } + public class Site + { + public String name; + public String id; + public string username; + public string password; + public bool confirmAge; + public bool enabled; + public Dictionary<String, RssLink> RssList = new Dictionary<String, RssLink>(); + } + public class RssLink + { + public String name; + public Boolean isDynamic = false; + public String url; + } + public class VideoInfo + { + public String Title; + public String Description; + public String VideoUrl; + public String ImageUrl; + public int Length; + public String Tags; public Object Other; - public VideoInfo() - { - Length = -1; - } - } - - public GUIOnlineVideos() - { - //ServiceProvider loServices = GlobalServiceProvider.Instance; - //moLog = loServices.Get<ILog>(); - } - public string PluginName() - { + public VideoInfo() + { + Length = -1; + } + } + + public GUIOnlineVideos() + { + //ServiceProvider loServices = GlobalServiceProvider.Instance; + //moLog = loServices.Get<ILog>(); + } + public string PluginName() + { - return "Online Videos"; + return "Online Videos"; - } + } - // Returns the description of the plugin is shown in the plugin menu + // Returns the description of the plugin is shown in the plugin menu - public string Description() - { + public string Description() + { - return "Youtube Plugin"; + return "Youtube Plugin"; - } + } - // Returns the author of the plugin which is shown in the plugin menu + // Returns the author of the plugin which is shown in the plugin menu - public string Author() - { + public string Author() + { - return "GregMac45"; + return "GregMac45"; - } + } - // show the setup dialog + // show the setup dialog - public void ShowPlugin() - { + public void ShowPlugin() + { + System.Windows.Forms.Form setup = new Configuration(); + setup.ShowDialog(); + } - //MessageBox.Show("Nothing to configure, this is just an example"); + // Indicates whether plugin can be enabled/disabled - } + public bool CanEnable() + { - // Indicates whether plugin can be enabled/disabled + return true; - public bool CanEnable() - { + } - return true; + // get ID of windowplugin belonging to this setup - } + public int GetWindowId() + { - // get ID of windowplugin belonging to this setup + return GetID; - public int GetWindowId() - { + } - return GetID; + // Indicates if plugin is enabled by default; - } + public bool DefaultEnabled() + { - // Indicates if plugin is enabled by default; + return true; - public bool DefaultEnabled() - { + } - return true; + // indicates if a plugin has its own setup screen - } + public bool HasSetup() + { - // indicates if a plugin has its own setup screen + return true; - public bool HasSetup() - { + } + public override int GetID + { + get + { + return 4755; + } + set + { + } + } - return false; + public override bool Init() + { + LoadSettings(); + return Load(GUIGraphicsContext.Skin + @"\myonlinevideos.xml"); - } - public override int GetID - { - get - { - return 4755; - } - set - { - } - } + } + public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) + { + strButtonText = PluginName(); - public override bool Init() - { - LoadSettings(); - return Load(GUIGraphicsContext.Skin + @"\myonlinevideos.xml"); + strButtonImage = String.Empty; - } - public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) - { - strButtonText = PluginName(); + strButtonImageFocus = String.Empty; - strButtonImage = String.Empty; + strPictureImage = "hover_onlinevideos.png"; - strButtonImageFocus = String.Empty; + return true; + } + public bool ShowDefaultHome() + { + return true; + } + protected override void OnPageLoad() + { + if (_CurrentState == State.home) + { + DisplaySites(); + currentView = View.List; + ChangeFacadeView(); + } + else if (_CurrentState == State.categories) + { + DisplayCategories(); + } + else + { + DisplayVideos(false); + facadeView.SelectedListItemIndex = miSelectedIndex; + } + UpdateViewSate(); + //base.OnPageLoad(); + } + protected override void OnShowContextMenu() + { + int liSelected = facadeView.SelectedListItemIndex-1; + if (liSelected < 0 || msSelectedSiteId=="99" || _CurrentState!=State.videos) + { + return; + } + + GUIListItem loListItem = facadeView.SelectedListItem; + GUIDialogMenu dlgSel = (GUIDialogMenu)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_MENU); + dlgSel.Reset(); + if (dlgSel != null) + { + dlgSel.Add("Save"); // Save + if(msSelectedSiteId=="1"){ + dlgSel.Add("Related Videos"); // Related Videos + } + if(isSiteFavoriteEnabled()){ + if(msSelectedCategoryValue.StartsWith("fav:") ==false){ + dlgSel.Add("Add to favorites"); + } + else{ + dlgSel.Add("Remove from favorites"); + } + } + } + dlgSel.DoModal(GetID); + int liSelectedIdx = dlgSel.SelectedId; + Log.Info("Selected id {0}",liSelectedIdx); + switch(liSelectedIdx){ + case 1: + SaveVideo(loListItem); + break; + case 2: + //Log.Info("Getting related videos on {0} using tags:{1}",SiteUtilFactory.getSiteUtil(msSelectedSiteId),moCurrentVideoList[liSelected].Tags); + SiteUtilBase site = SiteUtilFactory.getSiteUtil(msSelectedSiteId); + //Log.Info("VideoList before:"); + foreach(VideoInfo video in moCurrentVideoList){ + Log.Info(video.Title); + } + moCurrentVideoList = site.getRelatedVideos(moCurrentVideoList[liSelected].Tags); + //Log.Info("VideoList after:"); + foreach(VideoInfo video in moCurrentVideoList){ + Log.Info(video.Title); + } + DisplayVideos(false); + break; + case 3: + SiteUtilBase siteUtil = SiteUtilFactory.getSiteUtil(msSelectedSiteId); + Site loSite = moSiteList [msSelectedSiteId]; + if(msSelectedCategoryValue.StartsWith("fav:") == false){ + siteUtil.addFavorite(moCurrentVideoList[liSelected].VideoUrl,loSite.username,loSite.password); + }else{ + siteUtil.removeFavorite(moCurrentVideoList[liSelected].VideoUrl,loSite.username,loSite.password); + } + break; + } + base.OnShowContextMenu(); + } + public override void OnAction(Action action) + { + if (action.wID == Action.ActionType.ACTION_PREVIOUS_MENU) + { + if (_CurrentState == State.videos) + { + Log.Info("Set the stopDownload to true 1"); + ImageDownloader._stopDownload = true; + DisplayCategories(); + _CurrentState = State.categories; + return; + } + else if (_CurrentState == State.categories) + { + DisplaySites(); + _CurrentState = State.home; + return; + } + } + base.OnAction(action); + } + protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) + { + //Log.Info("Onclicked action type:{0}",actionType); + if (control == facadeView) + { - strPictureImage = "hover_onlinevideos.png"; + if (_CurrentState == State.home) + { + msSelectedSiteId = facadeView.SelectedListItem.Path; + //GUIPropertyManager.SetProperty("#header.label", "Online Videos"); + DisplayCategories(); + _CurrentState = State.categories; + } + else if (_CurrentState == State.categories) + { + if (facadeView.SelectedListItemIndex == 0) + { + DisplaySites(); + _CurrentState = State.home; + } + else + { + msSelectedCategoryValue = facadeView.SelectedListItem.Path; + msSelectedCategoryName = facadeView.SelectedListItem.Label; + DisplayVideos(true); + _CurrentState = State.videos; + } + } + else if (_CurrentState == State.videos) + { + Log.Info("Set the stopDownload to true 2"); + ImageDownloader._stopDownload = true; + if (facadeView.SelectedListItemIndex == 0) + { + DisplayCategories(); + _CurrentState = State.categories; + } + else + { + miSelectedIndex = facadeView.SelectedListItemIndex; + //play the video + Play(moCurrentVideoList[facadeView.SelectedListItemIndex -1]); + } + } + UpdateViewSate(); + } + else if (control == btnViewAs) + { + ChangeFacadeView(); + //bool shouldContinue = false; + //do + //{ + //shouldContinue = false; + } + base.OnClicked(controlId, control, actionType); + } + #region new methods + private void LoadSettings() + { + OnlineVideoSettings settings = OnlineVideoSettings.getInstance(); + msThumbLocation = settings.msThumbLocation; + msFilterArray = settings.msFilterArray; + moSiteList= settings.moSiteList; + msDownloadDir = settings.msDownloadDir; + } + private void DisplaySites() + { + //facadeView.Clear(); + GUIControl.ClearControl(GetID, facadeView.GetID); - return true; - } - public bool ShowDefaultHome() - { - return true; - } - protected override void OnPageLoad() - { - if (_CurrentState == State.home) - { - DisplaySites(); - currentView = View.List; - ChangeFacadeView(); - } - else if (_CurrentState == State.categories) - { - DisplayCategories(); - } - else - { - DisplayVideos(false); - facadeView.SelectedListItemIndex = miSelectedIndex; - } - UpdateViewSate(); - //base.OnPageLoad(); - } - protected override void OnShowContextMenu() - { - int liSelected = facadeView.SelectedListItemIndex-1; - if (liSelected < 0 || msSelectedSiteId=="99" || _CurrentState!=State.videos) - { - return; - } - - GUIListItem loListItem = facadeView.SelectedListItem; - GUIDialogMenu dlgSel = (GUIDialogMenu)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_MENU); - dlgSel.Reset(); - if (dlgSel != null) - { - dlgSel.Add("Save"); // Save - if(msSelectedSiteId=="1"){ - dlgSel.Add("Related Videos"); // Related Videos - } - if(isSiteFavoriteEnabled()){ - if(msSelectedCategoryValue.StartsWith("fav:") ==false){ - dlgSel.Add("Add to favorites"); - } - else{ - dlgSel.Add("Remove from favorites"); - } - } - } - dlgSel.DoModal(GetID); - int liSelectedIdx = dlgSel.SelectedId; - Log.Info("Selected id {0}",liSelectedIdx); - switch(liSelectedIdx){ - case 1: - SaveVideo(loListItem); - break; - case 2: - //Log.Info("Getting related videos on {0} using tags:{1}",SiteUtilFactory.getSiteUtil(msSelectedSiteId),moCurrentVideoList[liSelected].Tags); - SiteUtilBase site = SiteUtilFactory.getSiteUtil(msSelectedSiteId); - //Log.Info("VideoList before:"); - foreach(VideoInfo video in moCurrentVideoList){ - Log.Info(video.Title); - } - moCurrentVideoList = site.getRelatedVideos(moCurrentVideoList[liSelected].Tags); - //Log.Info("VideoList after:"); - foreach(VideoInfo video in moCurrentVideoList){ - Log.Info(video.Title); - } - DisplayVideos(false); - break; - case 3: - SiteUtilBase siteUtil = SiteUtilFactory.getSiteUtil(msSelectedSiteId); - Site loSite = moSiteList [msSelectedSiteId]; - if(msSelectedCategoryValue.StartsWith("fav:") == false){ - siteUtil.addFavorite(moCurrentVideoList[liSelected].VideoUrl,loSite.username,loSite.password); - }else{ - siteUtil.removeFavorite(moCurrentVideoList[liSelected].VideoUrl,loSite.username,loSite.password); - } - break; - } - base.OnShowContextMenu(); - } - public override void OnAction(Action action) - { - if (action.wID == Action.ActionType.ACTION_PREVIOUS_MENU) - { - if (_CurrentState == State.videos) - { - DisplayCategories(); - _CurrentState = State.categories; - return; - } - else if (_CurrentState == State.categories) - { - DisplaySites(); - _CurrentState = State.home; - return; - } - } - base.OnAction(action); - } - protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) - { - //Log.Info("Onclicked action type:{0}",actionType); - if (control == facadeView) - { + GUIListItem loListItem; + String image; + foreach (Site loSite in moSiteList.Values) + { + if(loSite.enabled){ + + loListItem = new GUIListItem(loSite.name); + loListItem.Path = loSite.id; + image = GUIGraphicsContext.Skin+@"/Media/OnlineVidSiteIcon"+loSite.id+".jpeg"; + if(System.IO.File.Exists(image)){ + loListItem.ThumbnailImage = GUIGraphicsContext.Skin+@"/Media/OnlineVidSiteIcon"+loSite.id+".jpeg"; + }else{ + loListItem.IsFolder = true; + MediaPortal.Util.Utils.SetDefaultIcons(loListItem); + } + facadeView.Add(loListItem); + } + } + GUIPropertyManager.SetProperty("#header.image",""); + } + private void DisplayCategories() + { + // facadeView.Clear(); + GUIControl.ClearControl(GetID, facadeView.GetID); + + GUIListItem loListItem; + loListItem = new GUIListItem(".."); + loListItem.IsFolder = true; + MediaPortal.Util.Utils.SetDefaultIcons(loListItem); + facadeView.Add(loListItem); + Site loSite = moSiteList[msSelectedSiteId]; + SiteUtilBase loSiteUtil = SiteUtilFactory.getSiteUtil(msSelectedSiteId); + foreach (RssLink loCat in loSite.RssList.Values) + { + if (loCat.isDynamic) + { + Log.Info("Looking for dynamic categories for {0}",loCat.name); + List<RssLink> loNewCatList= loSiteUtil.getDynamicCategories(loCat.url); + Log.Info("Found {0} dynamic categoties.", loNewCatList.Count); + foreach (RssLink loNewCat in loNewCatList) + { + loListItem = new GUIListItem(loNewCat.name); + loListItem.Path = loNewCat.url; + loListItem.IsFolder = true; + MediaPortal.Util.Utils.SetDefaultIcons(loListItem); + facadeView.Add(loListItem); + } + } + else + { + loListItem = new GUIListItem(loCat.name); + loListItem.Path = loCat.url; + loListItem.IsFolder = true; + MediaPortal.Util.Utils.SetDefaultIcons(loListItem); + facadeView.Add(loListItem); + } + } + //GUIPropertyManager.SetProperty("#itemcount", facadeView.Count-1 + ""); + //SiteUtilBase loSiteUtil = SiteUtilFactory.getSiteUtil(msSelectedSiteId); + if (isSiteFavoriteEnabled()) + { + loListItem = new GUIListItem("Favorites"); + loListItem.Path = "fav:"+loSite.username; + loListItem.IsFolder = true; + MediaPortal.Util.Utils.SetDefaultIcons(loListItem); + facadeView.Add(loListItem); + //loSiteUtil.getSiteFavorites(); + } + } + private bool isSiteFavoriteEnabled(){ + Site loSite = moSiteList[msSelectedSiteId]; + SiteUtilBase loSiteUtil = SiteUtilFactory.getSiteUtil(msSelectedSiteId); + return (loSiteUtil.isSiteFavoritesEnabled() && String.IsNullOrEmpty(loSite.username) == false); + } + + private void DisplayVideos(bool fbRefresh) + { + List<VideoInfo> loListItems; + GUIListItem loListItem; + + GUIControl.ClearControl(GetID, facadeView.GetID); + loListItem = new GUIListItem(".."); + loListItem.IsFolder = true; + MediaPortal.Util.Utils.SetDefaultIcons(loListItem); + facadeView.Add(loListItem); - if (_CurrentState == State.home) - { - msSelectedSiteId = facadeView.SelectedListItem.Path; - //GUIPropertyManager.SetProperty("#header.label", "Online Videos"); - DisplayCategories(); - _CurrentState = State.categories; - } - else if (_CurrentState == State.categories) - { - if (facadeView.SelectedListItemIndex == 0) - { - DisplaySites(); - _CurrentState = State.home; - } - else - { - msSelectedCategoryValue = facadeView.SelectedListItem.Path; - msSelectedCategoryName = facadeView.SelectedListItem.Label; - DisplayVideos(true); - _CurrentState = State.videos; - } - } - else if (_CurrentState == State.videos) - { - ImageDownloader._stopDownload = true; - if (facadeView.SelectedListItemIndex == 0) - { - DisplayCategories(); - _CurrentState = State.categories; - } - else - { - miSelectedIndex = facadeView.SelectedListItemIndex; - //play the video - Play(moCurrentVideoList[facadeView.SelectedListItemIndex -1]); - } - } - UpdateViewSate(); - } - else if (control == btnViewAs) - { - ChangeFacadeView(); - //bool shouldContinue = false; - //do - //{ - //shouldContinue = false; - } - base.OnClicked(controlId, control, actionType); - } - #region new methods - private void LoadSettings() - { - XmlDocument doc = new XmlDocument(); - try - { - doc.Load("OnlineVideoSettings.xml"); - XmlNode filter = doc.SelectSingleNode("//settings/filter"); - String lsFilter = filter.InnerText; - msFilterArray = lsFilter.Split(new char[] { ',' }); - if (msFilterArray.Length == 1 && msFilterArray[0] == "") - { - msFilterArray = null; - } - XmlNode thumbNode = doc.SelectSingleNode("//settings/thumbLocation"); - msThumbLocation = thumbNode.InnerText; - if(String.IsNullOrEmpty(msThumbLocation)){ - msThumbLocation = - System.IO.Directory.GetCurrentDirectory()+"/Thumbs/OnlineVideos/"; - } - if(System.IO.Directory.Exists(msThumbLocation)==false){ - System.IO.Directory.CreateDirectory(msThumbLocation); - } - - //lsFilterArray - //Log.Write("filter value {0}",filter.InnerText); - - XmlNode root = doc.SelectSingleNode("//settings/sites/site"); - XmlNodeList nodeList; - nodeList = root.SelectNodes("//settings/sites/site"); - List<Site> loSiteList = new List<Site>(); - Site loSite; - XmlNodeList RssNodeList; - RssLink loRssData; - bool lbDonwloadDirSet = false; - foreach (XmlNode chileNode in nodeList) - { - loSite = new Site(); - - XmlNode node = chileNode.SelectSingleNode("name"); - loSite.name = node.InnerText; - - node = chileNode.SelectSingleNode("id"); - loSite.id = node.InnerText; - - node = chileNode.SelectSingleNode("user"); - if(node!=null) - loSite.username = node.InnerText; - - node = chileNode.SelectSingleNode("password"); - if(node!=null) - loSite.password = node.InnerText; - - node = chileNode.SelectSingleNode("confirmAge"); - if(node!=null) - loSite.confirmAge = node.InnerText == "yes"; - - //Console.WriteLine("site Node:{0}", loSite.ToString()); - RssNodeList = chileNode.SelectNodes("rss"); - foreach (XmlNode RssNode in RssNodeList) - { - loRssData = new RssLink(); - //node = chileNode.SelectSingleNode("d"); - - loRssData.name = RssNode.Attributes["name"].InnerText; - try{ - loRssData.isDynamic = RssNode.Attributes["dynamic"].InnerText.Equals("yes"); - Log.Info("Found a dynamic category for site {0}",loSite.name); - }catch(Exception){} - loRssData.url = RssNode.InnerText; - if (lbDonwloadDirSet==false && loSite.id == "99") - { - msDownloadDir = loRssData.url; - lbDonwloadDirSet = true; - } - //Console.WriteLine("rss Node:{0}", loRssData.ToString()); - loSite.RssList.Add(loRssData.name, loRssData); - } - moSiteList.Add(loSite.id, loSite); - } - } - catch (Exception e) - { - //moLog.Error(e); - Log.Error(e); - } - } - private void DisplaySites() - { - //facadeView.Clear(); - GUIControl.ClearControl(GetID, facadeView.GetID); - - GUIListItem loListItem; - String image; - foreach (Site loSite in moSiteList.Values) - { - - loListItem = new GUIListItem(loSite.name); - loListItem.Path = loSite.id; - image = GUIGraphicsContext.Skin+@"/Media/OnlineVidSiteIcon"+loSite.id+".jpeg"; - if(System.IO.File.Exists(image)){ - loListItem.ThumbnailImage = GUIGraphicsContext.Skin+@"/Media/OnlineVidSiteIcon"+loSite.id+".jpeg"; - }else{ - loListItem.IsFolder = true; - MediaPortal.Util.Utils.SetDefaultIcons(loListItem); - } - - - facadeView.Add(loListItem); - } - GUIPropertyManager.SetProperty("#header.image",""); - } - private void DisplayCategories() - { - // facadeView.Clear(); - GUIControl.ClearControl(GetID, facadeView.GetID); - - GUIListItem loListItem; - loListItem = new GUIListItem(".."); - loListItem.IsFolder = true; - MediaPortal.Util.Utils.SetDefaultIcons(loListItem); - facadeView.Add(loListItem); - Site loSite = moSiteList[msSelectedSiteId]; - SiteUtilBase loSiteUtil = SiteUtilFactory.getSiteUtil(msSelectedSiteId); - foreach (RssLink loCat in loSite.RssList.Values) - { - if (loCat.isDynamic) - { - Log.Info("Looking for dynamic categories for {0}",loCat.name); - List<RssLink> loNewCatList= loSiteUtil.getDynamicCategories(loCat.url); - Log.Info("Found {0} dynamic categoties.", loNewCatList.Count); - foreach (RssLink loNewCat in loNewCatList) - { - loListItem = new GUIListItem(loNewCat.name); - loListItem.Path = loNewCat.url; - loListItem.IsFolder = true; - MediaPortal.Util.Utils.SetDefaultIcons(loListItem); - facadeView.Add(loListItem); - } - } - else - { - loListItem = new GUIListItem(loCat.name); - loListItem.Path = loCat.url; - loListItem.IsFolder = true; - MediaPortal.Util.Utils.SetDefaultIcons(loListItem); - facadeView.Add(loListItem); - } - } - //GUIPropertyManager.SetProperty("#itemcount", facadeView.Count-1 + ""); - //SiteUtilBase loSiteUtil = SiteUtilFactory.getSiteUtil(msSelectedSiteId); - if (isSiteFavoriteEnabled()) - { - loListItem = new GUIListItem("Favorites"); - loListItem.Path = "fav:"+loSite.username; - loListItem.IsFolder = true; - MediaPortal.Util.Utils.SetDefaultIcons(loListItem); - facadeView.Add(loListItem); - //loSiteUtil.getSiteFavorites(); - } - } - private bool isSiteFavoriteEnabled(){ - Site loSite = moSiteList[msSelectedSiteId]; - SiteUtilBase loSiteUtil = SiteUtilFactory.getSiteUtil(msSelectedSiteId); - return (loSiteUtil.isSiteFavoritesEnabled() && String.IsNullOrEmpty(loSite.username) == false); - } - - private void DisplayVideos(bool fbRefresh) - { - List<VideoInfo> loListItems; - GUIListItem loListItem; - - GUIControl.ClearControl(GetID, facadeView.GetID); - loListItem = new GUIListItem(".."); - loListItem.IsFolder = true; - MediaPortal.Util.Utils.SetDefaultIcons(loListItem); - facadeView.Add(loListItem); - - if (fbRefresh) - { - SiteUtilBase loSiteUtil = SiteUtilFactory.getSiteUtil(msSelectedSiteId); - - if (msSelectedCategoryValue.Contains("{0}")) - { - String lsSearchStr = String.Empty; - GetUserInputString(ref lsSearchStr); - if (FilterOut(lsSearchStr)) - { - return; - } - lsSearchStr = lsSearchStr.Replace(" ", "+"); - msSelectedCategoryValue = String.Format(msSelectedCategoryValue, lsSearchStr); - } - loListItems = loSiteUtil.getVideoList(msSelectedCategoryValue); - moCurrentVideoList.Clear(); - } - else - { - loListItems = moCurrentVideoList; - } - //facadeView.Clear(); - - //GUIListItem loListItem; - List<String> loImageUrlList = new List<string>(); - int liIdx = 0; - foreach (VideoInfo loVideoInfo in loListItems) - { - liIdx++; - loVideoInfo.Description = cleanString(loVideoInfo.Description); - if (FilterOut(loVideoInfo.Title) || FilterOut(loVideoInfo.Description)) - { - continue; - } - loListItem = new GUIListItem(loVideoInfo.Title); - loListItem.Path = loVideoInfo.VideoUrl; - loListItem.ItemId = liIdx; - loListItem.RetrieveArt = false; - loListItem.OnRetrieveArt += new MediaPortal.GUI.Library.GUIListItem.RetrieveCoverArtHandler(OnRetrieveCoverArt); - - facadeView.Add(loListItem); - //loListItem.RetrieveArt = true; - loImageUrlList.Add(loVideoInfo.ImageUrl); - if (fbRefresh) - { - moCurrentVideoList.Add(loVideoInfo); - } - } - //GUIPropertyManager.SetProperty("#itemcount", facadeView.Count-1 +""); - - ImageDownloader.getImages(loImageUrlList,msThumbLocation,facadeView); -// Log.Info("Getting images"); -// BackgroundWorker worker = new BackgroundWorker(); + if (fbRefresh) + { + SiteUtilBase loSiteUtil = SiteUtilFacto... [truncated message content] |
From: <rs...@us...> - 2007-07-27 15:26:57
|
Revision: 778 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=778&view=rev Author: rsparey Date: 2007-07-27 08:26:53 -0700 (Fri, 27 Jul 2007) Log Message: ----------- Modified Paths: -------------- trunk/skins/Foofaraw/Development Skin/Foofaraw/BasicHome.xml trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/background.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/common.waiting.1.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/common.waiting.10.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/common.waiting.11.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/common.waiting.2.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/common.waiting.3.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/common.waiting.4.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/common.waiting.5.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/common.waiting.6.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/common.waiting.7.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/common.waiting.8.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/common.waiting.9.png trunk/skins/Foofaraw/Development Skin/Foofaraw/musicOverlay.xml trunk/skins/Foofaraw/Development Skin/Foofaraw/mytvrecordedtv.xml trunk/skins/Foofaraw/Development Skin/Foofaraw/videoOverlay.xml Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/BasicHome.xml =================================================================== --- trunk/skins/Foofaraw/Development Skin/Foofaraw/BasicHome.xml 2007-07-27 13:37:45 UTC (rev 777) +++ trunk/skins/Foofaraw/Development Skin/Foofaraw/BasicHome.xml 2007-07-27 15:26:53 UTC (rev 778) @@ -43,7 +43,7 @@ <height>365</height> <texture>mid_strip.png</texture> <animation effect="fade" time="1000">WindowOpen</animation> - <animation effect="fade" time="500">WindowClose</animation> + <animation effect="fade" time="500" delay="1300">WindowClose</animation> </control> <control> <type>image</type> @@ -55,7 +55,7 @@ <height>18</height> <texture>bottom_strip.png</texture> <animation effect="fade" time="1000">WindowOpen</animation> - <animation effect="fade" time="500">WindowClose</animation> + <animation effect="fade" time="500" delay="1300">WindowClose</animation> </control> <control> <type>image</type> @@ -67,7 +67,7 @@ <height>36</height> <texture>top-strip.png</texture> <animation effect="fade" time="1000">WindowOpen</animation> - <animation effect="fade" time="500">WindowClose</animation> + <animation effect="fade" time="500" delay="1300">WindowClose</animation> </control> <control> @@ -110,20 +110,55 @@ <align>left</align> <textureFocus>tab_left_corner_down.png</textureFocus> <textureNoFocus>tab_left_corner_up.png</textureNoFocus> - <label>last fm</label> + <label>34000</label> <hyperlink>7890</hyperlink> <font>font10</font> <textcolor>white</textcolor> - <textYOff>1</textYOff> + <onup>11</onup> <ondown>2</ondown> + <onleft>22</onleft> + <onright>22</onright> + <visible>Control.HasFocus(2)|Control.HasFocus(21)|Control.HasFocus(22)</visible> + <animation effect="fade" time="500" >Visible</animation> + <animation effect="fade" time="500" >Hidden</animation> + <animation effect="slide" time="500" start="1000,0" end="0,0" delay="100" acceleration="-1">Visible</animation> + <animation effect="slide" time="500" start="0,0" end="-1000,0" delay="100" acceleration="-1">Hidden</animation> + <animation effect="fade" time="400" delay="500">WindowOpen</animation> + <animation effect="fade" time="400">WindowClose</animation> + </control> + <control> + <description>MY RADIO GUIDE</description> + <type>button</type> + <id>22</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400" delay="500">WindowOpen</animation> + <posY>155</posY> + <posX>221</posX> + <label>533</label> + <hyperlink>762</hyperlink> + <font>font10</font> + <width>209</width> + <height>36</height> + <onleft>2</onleft> + <onright>6</onright> + <onup>3</onup> + <ondown>50</ondown> + <textureFocus>tab_down.png</textureFocus> + <textureNoFocus>tab_up.png</textureNoFocus> + <textureAscending>arrow_round_up_nofocus.png</textureAscending> + <onup>11</onup> + <ondown>2</ondown> <onleft>21</onleft> <onright>21</onright> - <visible>Control.HasFocus(2)|Control.HasFocus(21)</visible> - <animation effect="fade" time="300" >Visible</animation> - <animation effect="fade" time="400">WindowOpen</animation> + <visible>Control.HasFocus(2)|Control.HasFocus(21)|Control.HasFocus(22)</visible> + <animation effect="fade" time="500" >Visible</animation> + <animation effect="fade" time="500" >Hidden</animation> + <animation effect="slide" time="500" start="1000,0" end="0,0" delay="100" acceleration="-1">Visible</animation> <animation effect="slide" time="500" start="0,0" end="-1000,0" delay="100" acceleration="-1">Hidden</animation> + <animation effect="fade" time="400" delay="500">WindowOpen</animation> <animation effect="fade" time="400">WindowClose</animation> - </control> + </control> + <control> @@ -147,8 +182,8 @@ <textcolorNoFocus>00ffffff</textcolorNoFocus> <onleft>2</onleft> <onright>4</onright> - <onup>11</onup> - <ondown>31</ondown> + <onup>31</onup> + <ondown>11</ondown> <animation effect="fade" time="1000" delay="750" >WindowOpen</animation> <animation effect="slide" time="1000" start="-422,0" end="0,0" delay="750" acceleration="-1" >WindowOpen</animation> <animation effect="fade" time="1000" delay="250" >WindowClose</animation> @@ -157,9 +192,69 @@ <animation effect="zoom" start="120,120" end="100,100" center="422,450" time="1000" acceleration ="-1" >Unfocus</animation> </control> + <control> + <description>MY TV SERIES</description> + <type>button</type> + <id>31</id> + <posY>155</posY> + <posX>12</posX> + <height>36</height> + <width>209</width> + <align>left</align> + <textureFocus>tab_left_corner_down.png</textureFocus> + <textureNoFocus>tab_left_corner_up.png</textureNoFocus> + <label>My TV Series</label> + <hyperlink>9811</hyperlink> + <font>font10</font> + <textcolor>white</textcolor> + + <onup>11</onup> + <ondown>3</ondown> + <onleft>32</onleft> + <onright>32</onright> + <visible>Control.HasFocus(3)|Control.HasFocus(31)|Control.HasFocus(32)</visible> + <animation effect="fade" time="500" >Visible</animation> + <animation effect="fade" time="500" >Hidden</animation> + <animation effect="slide" time="500" start="1000,0" end="0,0" delay="100" acceleration="-1">Visible</animation> <animation effect="slide" time="500" start="0,0" end="-1000,0" delay="100" acceleration="-1">Hidden</animation> + <animation effect="fade" time="400" delay="500">WindowOpen</animation> + <animation effect="fade" time="400">WindowClose</animation> + </control> + + + <control> + <description>MY TRAILERS</description> + <type>button</type> + <id>32</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400" delay="500">WindowOpen</animation> + <posY>155</posY> + <posX>221</posX> + <label>5906</label> + <hyperlink>5900</hyperlink> + <font>font10</font> + <width>209</width> + <height>36</height> + <onleft>2</onleft> + <onright>6</onright> + <onup>11</onup> + <ondown>3</ondown> + <textureFocus>tab_down.png</textureFocus> + <textureNoFocus>tab_up.png</textureNoFocus> + <textureAscending>arrow_round_up_nofocus.png</textureAscending> + <onup>11</onup> + <ondown>3</ondown> + <onleft>31</onleft> + <onright>31</onright> + <visible>Control.HasFocus(3)|Control.HasFocus(31)|Control.HasFocus(32)</visible> + <animation effect="fade" time="500" >Visible</animation> + <animation effect="fade" time="500" >Hidden</animation> + <animation effect="slide" time="500" start="1000,0" end="0,0" delay="100" acceleration="-1">Visible</animation> <animation effect="slide" time="500" start="0,0" end="-1000,0" delay="100" acceleration="-1">Hidden</animation> + <animation effect="fade" time="400" delay="500">WindowOpen</animation> + <animation effect="fade" time="400">WindowClose</animation> + </control> + - <control> <description>home BM TV</description> <type>button</type> @@ -181,8 +276,8 @@ <textcolorNoFocus>00ffffff</textcolorNoFocus> <onleft>3</onleft> <onright>5</onright> - <onup>11</onup> - <ondown>42</ondown> + <onup>41</onup> + <ondown>11</ondown> <animation effect="fade" time="1000" delay="500" >WindowOpen</animation> <animation effect="slide" time="1000" start="-683,0" end="0,0" delay="500" acceleration="-1" >WindowOpen</animation> <animation effect="fade" time="1000" delay="500">WindowClose</animation> @@ -190,6 +285,127 @@ <animation effect="zoom" start="100,100" end="120,120" center="683,450" time="1000" acceleration ="-1" >Focus</animation> <animation effect="zoom" start="120,120" end="100,100" center="683,450" time="1000" acceleration ="-1" >Unfocus</animation> </control> + + + <control> + <description>Recorded TV</description> + <type>button</type> + <id>41</id> + <posY>155</posY> + <posX>12</posX> + <height>36</height> + <width>209</width> + <align>left</align> + <textureFocus>tab_left_corner_down.png</textureFocus> + <textureNoFocus>tab_left_corner_up.png</textureNoFocus> + <label>604</label> + <hyperlink>603</hyperlink> + <font>font10</font> + <textcolor>white</textcolor> + + <onup>11</onup> + <ondown>4</ondown> + <onleft>43</onleft> + <onright>42</onright> + <visible>Control.HasFocus(4)|Control.HasFocus(41)|Control.HasFocus(42)|Control.HasFocus(43)</visible> + <animation effect="fade" time="500" >Visible</animation> + <animation effect="fade" time="500" >Hidden</animation> + <animation effect="slide" time="500" start="1000,0" end="0,0" delay="100" acceleration="-1">Visible</animation> <animation effect="slide" time="500" start="0,0" end="-1000,0" delay="100" acceleration="-1">Hidden</animation> + <animation effect="fade" time="400" delay="500">WindowOpen</animation> + <animation effect="fade" time="400">WindowClose</animation> + </control> + + + + <control> + <description>TV Guide</description> + <type>button</type> + <id>42</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400" delay="500">WindowOpen</animation> + <posY>155</posY> + <posX>221</posX> + <label>600</label> + <hyperlink>600</hyperlink> + <font>font10</font> + <width>209</width> + <height>36</height> + <onleft>2</onleft> + <onright>6</onright> + <onup>3</onup> + <ondown>50</ondown> + <textureFocus>tab_down.png</textureFocus> + <textureNoFocus>tab_up.png</textureNoFocus> + <textureAscending>arrow_round_up_nofocus.png</textureAscending> + <onup>11</onup> + <ondown>4</ondown> + <onleft>41</onleft> + <onright>43</onright> + <visible>Control.HasFocus(4)|Control.HasFocus(41)|Control.HasFocus(42)|Control.HasFocus(43)</visible> + <animation effect="fade" time="500" >Visible</animation> + <animation effect="fade" time="500" >Hidden</animation> + <animation effect="slide" time="500" start="1000,0" end="0,0" delay="100" acceleration="-1">Visible</animation> <animation effect="slide" time="500" start="0,0" end="-1000,0" delay="100" acceleration="-1">Hidden</animation> + <animation effect="fade" time="400" delay="500">WindowOpen</animation> + <animation effect="fade" time="400">WindowClose</animation> + </control> + + <control> + <description>scheduler</description> + <type>button</type> + <id>43</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400" delay="500">WindowOpen</animation> + <posY>155</posY> + <posX>430</posX> + <label>137</label> + <hyperlink>604</hyperlink> + <font>font10</font> + <width>209</width> + <height>36</height> + <onleft>2</onleft> + <onright>6</onright> + <onup>3</onup> + <ondown>50</ondown> + <textureFocus>tab_down.png</textureFocus> + <textureNoFocus>tab_up.png</textureNoFocus> + <textureAscending>arrow_round_up_nofocus.png</textureAscending> + <onup>11</onup> + <ondown>4</ondown> + <onleft>42</onleft> + <onright>41</onright> + <visible>Control.HasFocus(4)|Control.HasFocus(41)|Control.HasFocus(42)|Control.HasFocus(43)</visible> + <animation effect="fade" time="500" >Visible</animation> + <animation effect="fade" time="500" >Hidden</animation> + <animation effect="slide" time="500" start="1000,0" end="0,0" delay="100" acceleration="-1">Visible</animation> <animation effect="slide" time="500" start="0,0" end="-1000,0" delay="100" acceleration="-1">Hidden</animation> + <animation effect="fade" time="400" delay="500">WindowOpen</animation> + <animation effect="fade" time="400">WindowClose</animation> + </control> + + + + + + + + + + + + + + + + + + + + + + + + + + <control> <description>home BM Music</description> <type>button</type> @@ -211,16 +427,76 @@ <textcolorNoFocus>00ffffff</textcolorNoFocus> <onleft>4</onleft> <onright>6</onright> - <onup>21</onup> - <ondown>5</ondown> - <animation effect="fade" time="1000" delay="250" >WindowOpen</animation> + <onup>51</onup> + <ondown>11</ondown> + <animation effect="fade" time="1000" delay="250" >WindowOpen</animation> <animation effect="slide" time="1000" start="-944,0" end="0,0" delay="250" acceleration="-1" >WindowOpen</animation> <animation effect="fade" time="1000" delay="750">WindowClose</animation> <animation effect="slide" time="1000" start="0,0" end="-944,0" delay="750" acceleration="-1" >Windowclose</animation> <animation effect="zoom" start="100,100" end="120,120" center="944,450" time="1000" acceleration ="-1" >Focus</animation> <animation effect="zoom" start="120,120" end="100,100" center="944,450" time="1000" acceleration ="-1" >Unfocus</animation> - - + </control> + <control> + <description>Playing Now</description> + <type>button</type> + <id>51</id> + <posY>155</posY> + <posX>12</posX> + <height>36</height> + <width>209</width> + <align>left</align> + <textureFocus>tab_left_corner_down.png</textureFocus> + <textureNoFocus>tab_left_corner_up.png</textureNoFocus> + <label>100510</label> + <hyperlink>510</hyperlink> + <font>font10</font> + + <onup>11</onup> + <ondown>5</ondown> + <onleft>52</onleft> + <onright>52</onright> + <visible>Control.HasFocus(5)|Control.HasFocus(51)|Control.HasFocus(52)</visible> + <animation effect="fade" time="500" >Visible</animation> + <animation effect="fade" time="500" >Hidden</animation> + <animation effect="slide" time="500" start="1000,0" end="0,0" delay="100" acceleration="-1" reversible="false">Visible</animation> + <animation effect="slide" time="500" start="0,0" end="-1000,0" delay="100" acceleration="-1">Hidden</animation> + <animation effect="fade" time="400" delay="500">WindowOpen</animation> + <animation effect="fade" time="400">WindowClose</animation> + </control> + + + + <control> + <description>Current Playlist</description> + <type>button</type> + <id>52</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400" delay="500">WindowOpen</animation> + <posY>155</posY> + <posX>221</posX> + <label>136</label> + <hyperlink>500</hyperlink> + <font>font10</font> + <width>209</width> + <height>36</height> + <onleft>2</onleft> + <onright>6</onright> + <onup>11</onup> + <ondown>5</ondown> + <textureFocus>tab_down.png</textureFocus> + <textureNoFocus>tab_up.png</textureNoFocus> + <onup>11</onup> + <ondown>5</ondown> + <onleft>51</onleft> + <onright>51</onright> + <visible>Control.HasFocus(5)|Control.HasFocus(51)|Control.HasFocus(52)</visible> + <animation effect="fade" time="500" >Visible</animation> + <animation effect="fade" time="500" >Hidden</animation> + <animation effect="slide" time="500" start="1000,0" end="0,0" delay="100" acceleration="-1">Visible</animation> + <animation effect="slide" time="500" start="0,0" end="-1000,0" delay="100" acceleration="-1">Hidden</animation> + <animation effect="fade" time="400" delay="500">WindowOpen</animation> + <animation effect="fade" time="400">WindowClose</animation> + </control> @@ -295,190 +571,12 @@ - <control> - <description>TV SERIES BUTTON</description> - <type>button</type> - <id>31</id> - <posX>100</posX> - <posY>687</posY> - <height>25</height> - <width>200</width> - <align>left</align> - <textureFocus>menu_list_focus.png</textureFocus> - <textureNoFocus>menu_list_nofocus.png</textureNoFocus> - <visible>Control.HasFocus(3)|Control.HasFocus(31)|Control.HasFocus(32)</visible> - <label>tv series</label> - <hyperlink>9811</hyperlink> - <font>font10</font> - <textcolor>white</textcolor> - <textYOff>1</textYOff> - <onup>3</onup> - <ondown>11</ondown> - <onleft>31</onleft> - <onright>32</onright> - <animation effect="fade" time="300">Visible</animation> - <animation effect="fade" time="400">WindowOpen</animation> - <animation effect="fade" time="400">WindowClose</animation> - </control> - <control> - <description>TRAILERES</description> - <type>button</type> - <id>32</id> - <posX>299</posX> - <posY>687</posY> - <height>25</height> - <width>200</width> - <align>left</align> - <textureFocus>menu_list_focus.png</textureFocus> - <textureNoFocus>menu_list_nofocus.png</textureNoFocus> - <visible>Control.HasFocus(3)|Control.HasFocus(31)|Control.HasFocus(32)</visible> - <label>trailers</label> - <hyperlink>5900</hyperlink> - <font>font10</font> - <textcolor>white</textcolor> - <textYOff>1</textYOff> - <onup>3</onup> - <ondown>11</ondown> - <onleft>31</onleft> - <onright>32</onright> - <animation effect="fade" time="300">Visible</animation> - <animation effect="fade" time="400">WindowOpen</animation> - <animation effect="fade" time="400">WindowClose</animation> - </control> - <control> - <description>RECORDED TV BUTTON</description> - <type>button</type> - <id>42</id> - - <posX>100</posX> - <posY>687</posY> - <height>25</height> - <width>200</width> - <align>left</align> - <textureFocus>menu_list_focus.png</textureFocus> - <textureNoFocus>menu_list_nofocus.png</textureNoFocus> - <visible>Control.HasFocus(4)|Control.HasFocus(41)|Control.HasFocus(42)|Control.HasFocus(43)</visible> - <label>recorded tv</label> - <hyperlink>603</hyperlink> - <font>font10</font> - <textcolor>white</textcolor> - <textYOff>1</textYOff> - <onup>4</onup> - <ondown>11</ondown> - <onleft>43</onleft> - <onright>41</onright> - <animation effect="fade" time="300">Visible</animation> - <animation effect="fade" time="400">WindowOpen</animation> - <animation effect="fade" time="400">WindowClose</animation> - </control> - <control> - <description>SCHEDULED TVBUTTONc</description> - <type>button</type> - <id>41</id> - <posX>299</posX> - <posY>687</posY> - <height>25</height> - <width>200</width> - <align>left</align> - <textureFocus>menu_list_focus.png</textureFocus> - <textureNoFocus>menu_list_nofocus.png</textureNoFocus> - <visible>Control.HasFocus(4)|Control.HasFocus(41)|Control.HasFocus(42)|Control.HasFocus(43)</visible> - <label>scheduled rec</label> - <hyperlink>601</hyperlink> - <font>font10</font> - <textcolor>white</textcolor> - <textYOff>1</textYOff> - <onup>4</onup> - <ondown>11</ondown> - <onleft>42</onleft> - <onright>43</onright> - <animation effect="fade" time="300">Visible</animation> - <animation effect="fade" time="400">WindowOpen</animation> - <animation effect="fade" time="400">WindowClose</animation> - </control> - <control> - <description>TV GUIDE BUTTON</description> - <type>button</type> - <id>43</id> - <posX>498</posX> - <posY>687</posY> - <height>25</height> - <width>200</width> - <align>left</align> - <textureFocus>menu_list_focus.png</textureFocus> - <textureNoFocus>menu_list_nofocus.png</textureNoFocus> - <visible>Control.HasFocus(4)|Control.HasFocus(41)|Control.HasFocus(42)|Control.HasFocus(43)</visible> - <label>tv guide</label> - <hyperlink>600</hyperlink> - <font>font10</font> - <textcolor>white</textcolor> - <textYOff>1</textYOff> - <onup>4</onup> - <ondown>11</ondown> - <onleft>41</onleft> - <onright>42</onright> - <animation effect="fade" time="300">Visible</animation> - <animation effect="fade" time="400">WindowOpen</animation> - <animation effect="fade" time="400">WindowClose</animation> - </control> <control> - <description>Music submenu 1</description> - <type>button</type> - <id>51</id> - <posX>100</posX> - <posY>687</posY> - <height>25</height> - <width>200</width> - <align>left</align> - <textureFocus>menu_list_focus.png</textureFocus> - <textureNoFocus>menu_list_nofocus.png</textureNoFocus> - <visible>Control.HasFocus(5)|Control.HasFocus(51)|Control.HasFocus(52)</visible> - <label>playing now</label> - <hyperlink>510</hyperlink> - <font>font10</font> - <textcolor>white</textcolor> - <textYOff>1</textYOff> - <onup>5</onup> - <ondown>11</ondown> - <onleft>51</onleft> - <onright>52</onright> - <animation effect="fade" time="300">Visible</animation> - <animation effect="fade" time="400">WindowOpen</animation> - <animation effect="fade" time="400">WindowClose</animation> - </control> - - <control> - <description>Music submenu 2</description> - <type>button</type> - <id>52</id> - <posX>299</posX> - <posY>687</posY> - <height>25</height> - <width>200</width> - <align>left</align> - <textureFocus>menu_list_focus.png</textureFocus> - <textureNoFocus>menu_list_nofocus.png</textureNoFocus> - <visible>Control.HasFocus(5)|Control.HasFocus(51)|Control.HasFocus(52)</visible> - <label>current playlist</label> - <hyperlink>500</hyperlink> - <font>font10</font> - <textcolor>white</textcolor> - <textYOff>1</textYOff> - <onup>5</onup> - <ondown>52</ondown> - <onleft>51</onleft> - <onright>52</onright> - <animation effect="fade" time="300">Visible</animation> - <animation effect="fade" time="400">WindowOpen</animation> - <animation effect="fade" time="400">WindowClose</animation> - </control> - - <control> <description>Other submenu 1</description> <type>button</type> <id>71</id> @@ -494,14 +592,16 @@ <hyperlink>2600</hyperlink> <font>font10</font> <textcolor>white</textcolor> - <textYOff>1</textYOff> + <onup>7</onup> <ondown>71</ondown> <onleft>71</onleft> <onright>72</onright> - <animation effect="fade" time="300">Visible</animation> - <animation effect="fade" time="400">WindowOpen</animation> - <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="500" >Visible</animation> + <animation effect="fade" time="500" >Hidden</animation> + <animation effect="slide" time="500" start="1000,0" end="0,0" delay="100" acceleration="-1">Visible</animation> <animation effect="slide" time="500" start="0,0" end="-1000,0" delay="100" acceleration="-1">Hidden</animation> + <animation effect="fade" time="400" delay="500">WindowOpen</animation> + <animation effect="fade" time="400">WindowClose</animation> </control> <control> @@ -520,14 +620,16 @@ <hyperlink>34</hyperlink> <font>font10</font> <textcolor>white</textcolor> - <textYOff>1</textYOff> + <onup>7</onup> <ondown>72</ondown> <onleft>71</onleft> <onright>73</onright> - <animation effect="fade" time="300">Visible</animation> - <animation effect="fade" time="400">WindowOpen</animation> - <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="500" >Visible</animation> + <animation effect="fade" time="500" >Hidden</animation> + <animation effect="slide" time="500" start="1000,0" end="0,0" delay="100" acceleration="-1">Visible</animation> <animation effect="slide" time="500" start="0,0" end="-1000,0" delay="100" acceleration="-1">Hidden</animation> + <animation effect="fade" time="400" delay="500">WindowOpen</animation> + <animation effect="fade" time="400">WindowClose</animation> </control> <control> @@ -546,30 +648,16 @@ <hyperlink>2700</hyperlink> <font>font10</font> <textcolor>white</textcolor> - <textYOff>1</textYOff> + <onup>7</onup> <ondown>73</ondown> <onleft>72</onleft> <onright>73</onright> - <animation effect="fade" time="300">Visible</animation> - <animation effect="fade" time="400">WindowOpen</animation> - <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="500" >Visible</animation> + <animation effect="fade" time="500" >Hidden</animation> + <animation effect="slide" time="500" start="1000,0" end="0,0" delay="100" acceleration="-1">Visible</animation> <animation effect="slide" time="500" start="0,0" end="-1000,0" delay="100" acceleration="-1">Hidden</animation> + <animation effect="fade" time="400" delay="500">WindowOpen</animation> + <animation effect="fade" time="400">WindowClose</animation> </control> - - <control> - <description>MINI RADIO</description> - <type>image</type> - <id>1</id> - <posX>676</posX> - <posY>600</posY> - <height>80</height> - <width>40</width> - <align>left</align> - <texture>Radio.png</texture> - <visible>Control.HasFocus(21)</visible> - <animation effect="fade" time="300">Visible</animation> - <animation effect="fade" time="400">WindowOpen</animation> - <animation effect="fade" time="400">WindowClose</animation> - </control> </controls> </window> \ No newline at end of file Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/background.png =================================================================== (Binary files differ) Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/common.waiting.1.png =================================================================== (Binary files differ) Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/common.waiting.10.png =================================================================== (Binary files differ) Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/common.waiting.11.png =================================================================== (Binary files differ) Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/common.waiting.2.png =================================================================== (Binary files differ) Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/common.waiting.3.png =================================================================== (Binary files differ) Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/common.waiting.4.png =================================================================== (Binary files differ) Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/common.waiting.5.png =================================================================== (Binary files differ) Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/common.waiting.6.png =================================================================== (Binary files differ) Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/common.waiting.7.png =================================================================== (Binary files differ) Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/common.waiting.8.png =================================================================== (Binary files differ) Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/common.waiting.9.png =================================================================== (Binary files differ) Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/musicOverlay.xml =================================================================== --- trunk/skins/Foofaraw/Development Skin/Foofaraw/musicOverlay.xml 2007-07-27 13:37:45 UTC (rev 777) +++ trunk/skins/Foofaraw/Development Skin/Foofaraw/musicOverlay.xml 2007-07-27 15:26:53 UTC (rev 778) @@ -8,32 +8,21 @@ <type>label</type> <id>2</id> <posX>322</posX> - <posY>626</posY> + <posY>700</posY> <label>#currentplaytime</label> <align>left</align> - <font>font72</font> + <font>wipeout</font> <textcolor>20ffffff</textcolor> <animation effect="fade" time="500">WindowClose</animation> <animation effect="fade" time="250">WindowOpen</animation> </control> + <control> - <description>music rectangle</description> - <type>image</type> - <id>0</id> - <posX>142</posX> - <posY>532</posY> - <width>220</width> - <height>182</height> - <texture>playback_background.png</texture> - <animation effect="fade" time="500">WindowClose</animation> - <animation effect="fade" time="250">WindowOpen</animation> - </control> - <control> <description>music logo</description> <type>image</type> <id>1</id> <posX>160</posX> - <posY>548</posY> + <posY>580</posY> <width>180</width> <height>144</height> <keepaspectratio>yes</keepaspectratio> @@ -42,12 +31,13 @@ <animation effect="fade" time="500">WindowClose</animation> <animation effect="fade" time="250">WindowOpen</animation> </control> + <control> <description>play logo</description> <type>image</type> <id>3</id> <posX>37</posX> - <posY>528</posY> + <posY>580</posY> <texture>logo_play.png</texture> <animation effect="fade" time="500">WindowClose</animation> <animation effect="fade" time="250">WindowOpen</animation> @@ -57,7 +47,7 @@ <type>image</type> <id>4</id> <posX>36</posX> - <posY>525</posY> + <posY>580</posY> <texture>logo_pause.png</texture> <animation effect="fade" time="500">WindowClose</animation> <animation effect="fade" time="250">WindowOpen</animation> @@ -67,7 +57,7 @@ <type>image</type> <id>7</id> <posX>18</posX> - <posY>528</posY> + <posY>580</posY> <texture>logo_fastforward.png</texture> <animation effect="fade" time="500">WindowClose</animation> <animation effect="fade" time="250">WindowOpen</animation> @@ -77,7 +67,7 @@ <type>image</type> <id>8</id> <posX>18</posX> - <posY>528</posY> + <posY>580</posY> <texture>logo_rewind.png</texture> <animation effect="fade" time="500">WindowClose</animation> <animation effect="fade" time="250">WindowOpen</animation> @@ -88,7 +78,7 @@ <width>180</width> <height>40</height> <posX>170</posX> - <posY>705</posY> + <posY>715</posY> <font>font13</font> <label>#Play.Current.Title\r#Play.Current.Artist\r#Play.Current.Album\r#Play.Current.Duration</label> <textcolor>FFFFFFFF</textcolor> Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/mytvrecordedtv.xml =================================================================== --- trunk/skins/Foofaraw/Development Skin/Foofaraw/mytvrecordedtv.xml 2007-07-27 13:37:45 UTC (rev 777) +++ trunk/skins/Foofaraw/Development Skin/Foofaraw/mytvrecordedtv.xml 2007-07-27 15:26:53 UTC (rev 778) @@ -6,12 +6,44 @@ <controls> <import>common.time.xml</import> - <control> + <import>common.window.xml</import> + <control> <type>image</type> - <description>BG</description> + <decription>mid_strip</decription> <id>1</id> + <posX>12</posX> + <posY>186</posY> + <width>1342</width> + <height>365</height> + <texture>mid_strip.png</texture> + <animation effect="fade" time="1000">WindowOpen</animation> + <animation effect="fade" time="500" delay="1300">WindowClose</animation> </control> <control> + <type>image</type> + <decription>bottom_strip</decription> + <id>1</id> + <posX>12</posX> + <posY>547</posY> + <width>1342</width> + <height>18</height> + <texture>bottom_strip.png</texture> + <animation effect="fade" time="1000">WindowOpen</animation> + <animation effect="fade" time="500" delay="1300">WindowClose</animation> + </control> + <control> + <type>image</type> + <decription>top-strip</decription> + <id>1</id> + <posX>12</posX> + <posY>155</posY> + <width>1342</width> + <height>36</height> + <texture>top-strip.png</texture> + <animation effect="fade" time="1000">WindowOpen</animation> + <animation effect="fade" time="500" delay="1300">WindowClose</animation> + </control> + <control> <description>icon background</description> <type>image</type> <id>1</id> @@ -96,101 +128,129 @@ <animation effect="fade" time="500" delay="500">WindowOpen</animation> <animation effect="fade" time="500">WindowClose</animation> </control> - <control> + + <control> + <description>View-As button</description> + <type>button</type> + <id>2</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <posY>155</posY> + <posX>12</posX> + <label>100</label> + <font>font10</font> + <onleft>2</onleft> + <onright>3</onright> + <onup>2</onup> + <ondown>50</ondown> + <width>209</width> + <height>36</height> + <textureFocus>tab_left_corner_down.png</textureFocus> + <textureNoFocus>tab_left_corner_up.png</textureNoFocus> + + + + + </control> + <control> + <type>sortbutton</type> + <id>3</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <posY>155</posY> + <posX>221</posX> + <label>103</label> + <font>font10</font> + <width>209</width> + <height>36</height> + <onleft>2</onleft> + <onright>6</onright> + <onup>3</onup> + <ondown>50</ondown> + <textureFocus>tab_down.png</textureFocus> + <textureNoFocus>tab_up.png</textureNoFocus> + <textureAscending>arrow_round_up_nofocus.png</textureAscending> + <textureAscendingFocused>arrow_round_up_focus.png</textureAscendingFocused> + <textureDescending>arrow_round_down_nofocus.png</textureDescending> + <textureDescendingFocused>arrow_round_down_focus.png</textureDescendingFocused> + <offsetSortButtonX>180</offsetSortButtonX> + <offsetSortButtonY>8</offsetSortButtonY> + <textcolor>black</textcolor> + </control> + + <control> + <description>Switch View button</description> + <type>button</type> + <id>5</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <posY>155</posY> + <posX>430</posX> + <label>457</label> + <font>font10</font> + <width>209</width> + <height>36</height> + <onleft>3</onleft> + <onright>7</onright> + <onup>6</onup> + <ondown>50</ondown> + <textureFocus>tab_down.png</textureFocus> + <textureNoFocus>tab_up.png</textureNoFocus> + + </control> + <control> + <description>TV Series</description> + <type>button</type> + <id>6</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <posY>155</posY> + <posX>639</posX> + <label>624</label> + <font>font10</font> + <width>209</width> + <height>36</height> + <onleft>6</onleft> + <onright>8</onright> + <onup>7</onup> + <ondown>50</ondown> + <textureFocus>tab_down.png</textureFocus> + <textureNoFocus>tab_up.png</textureNoFocus> + + </control> + <control> + <description>Play DVD</description> + <type>button</type> + <id>7</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + + <posY>155</posY> + <posX>848</posX> + <label>896</label> + <font>font10</font> + <hyperlink>609</hyperlink> + <width>209</width> + <height>36</height> + <onleft>7</onleft> + <onright>9</onright> + <onup>8</onup> + <ondown>50</ondown> + <textureFocus>tab_down.png</textureFocus> + <textureNoFocus>tab_up.png</textureNoFocus> + + + </control> + + + + <control> <type>group</type> <description>group element</description> - <id>24</id> - <posX>106</posX> - <posY>124</posY> - <width>264</width> - <height>234</height> - <animation effect="fade" time="500" delay="50">WindowOpen</animation> - <animation effect="slide" time="500" delay="50" start="-600,0" end="0,0" acceleration="-1">WindowOpen</animation> - <animation effect="fade" time="500">WindowClose</animation> - <mpe> - <layout>Grid</layout> - <spring>no</spring> - <spacing>0</spacing> - <padding> - <top>0</top> - <right>0</right> - <bottom>0</bottom> - <left>0</left> - </padding> - </mpe> - <control> - <type>button</type> - <description>View-As button</description> - <id>2</id> - <posX>113</posX> - <posY>129</posY> - <onleft>2</onleft> - <onright>10</onright> - <onup>17</onup> - <ondown>3</ondown> - <label>100</label> - </control> - <control> - <type>sortbutton</type> - <id>3</id> - <posX>113</posX> - <posY>174</posY> - <onleft>2</onleft> - <onright>10</onright> - <onup>2</onup> - <ondown>5</ondown> - <font>font13</font> - <label>620</label> - </control> - <control> - <type>button</type> - <description>All,Genre,Channel button</description> - <id>5</id> - <posX>113</posX> - <posY>220</posY> - <onleft>6</onleft> - <onright>10</onright> - <onup>2</onup> - <ondown>6</ondown> - <label>457</label> - </control> - <control> - <type>button</type> - <description>cleanup button</description> - <id>6</id> - <posX>113</posX> - <posY>265</posY> - <onleft>2</onleft> - <onright>10</onright> - <onup>5</onup> - <ondown>7</ondown> - <label>624</label> - </control> - <control> - <type>button</type> - <description>compress button</description> - <id>7</id> - <posX>113</posX> - <posY>310</posY> - <onleft>2</onleft> - <onright>10</onright> - <onup>6</onup> - <ondown>99</ondown> - <hyperlink>609</hyperlink> - <label>896</label> - </control> - </control> - <control> - <type>group</type> - <description>group element</description> <id>0</id> - <posX>485</posX> - <posY>124</posY> - <width>584</width> - <height>622</height> - <animation effect="fade" time="250">WindowOpen</animation> - <animation effect="slide" time="500" start="0,-500" end="0,0" acceleration="-1">WindowOpen</animation> - <animation effect="fade" time="500">WindowClose</animation> + + <animation effect="fade" time="250" delay="500">WindowOpen</animation> + <mpe> <layout>Grid</layout> <spring>no</spring> @@ -207,9 +267,9 @@ <type>listcontrol</type> <description>scheduler recordings listcontrol</description> <id>10</id> - <posX>453</posX> - <height>600</height> - <width>550</width> + <posX>20</posX> + <height>300</height> + <width>1320</width> <onleft>2</onleft> <onright>11</onright> <onup>2</onup> @@ -231,17 +291,16 @@ <itemWidth>50</itemWidth> <textureHeight>132</textureHeight> <keepaspectratio>yes</keepaspectratio> - <spinPosX>885</spinPosX> <textureFocus>list_sub_focus_big.png</textureFocus> <textureNoFocus>list_sub_nofocus_big.png</textureNoFocus> <textureHeight>85</textureHeight> </control> + <control> <type>listcontrol</type> <description>listcontrol</description> <id>11</id> - <posX>493</posX> <onleft>10</onleft> <onright>2</onright> <onup>2</onup> @@ -253,8 +312,8 @@ <type>fadelabel</type> <description>Current program title</description> <id>13</id> - <posX>493</posX> - <posY>555</posY> + <posX>100</posX> + <posY>700</posY> <width>573</width> <label>#TV.RecordedTV.Title</label> <disabledcolor>ff000000</disabledcolor> @@ -275,9 +334,9 @@ <type>textboxscrollup</type> <description>Description1</description> <id>15</id> - <posX>1033</posX> - <posY>133</posY> - <width>250</width> + <posX>450</posX> + <posY>580</posY> + <width>600</width> <height>515</height> <colordiffuse>ffffffff</colordiffuse> <font>font12</font> Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/videoOverlay.xml =================================================================== --- trunk/skins/Foofaraw/Development Skin/Foofaraw/videoOverlay.xml 2007-07-27 13:37:45 UTC (rev 777) +++ trunk/skins/Foofaraw/Development Skin/Foofaraw/videoOverlay.xml 2007-07-27 15:26:53 UTC (rev 778) @@ -69,19 +69,8 @@ <animation effect="fade" time="250">WindowOpen</animation> <id>5</id> </control> + <control> - <description>video rectangle</description> - <type>image</type> - <id>0</id> - <posX>142</posX> - <posY>560</posY> - <width>214</width> - <height>130</height> - <texture>playback_background.png</texture> - <animation effect="fade" time="500">WindowClose</animation> - <animation effect="fade" time="250">WindowOpen</animation> - </control> - <control> <description>video preview window</description> <type>videowindow</type> <id>1</id> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kro...@us...> - 2007-07-27 13:37:47
|
Revision: 777 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=777&view=rev Author: kroko_koenig Date: 2007-07-27 06:37:45 -0700 (Fri, 27 Jul 2007) Log Message: ----------- Added Paths: ----------- trunk/plugins/My Streamradio/Release/Thumbs/Radio/Thumbs.db trunk/plugins/My Streamradio/readme.txt Removed Paths: ------------- trunk/plugins/My Streamradio/Source/MyStreamRadio/Properties/ trunk/plugins/My Streamradio/Source/MyStreamRadio/obj/ Added: trunk/plugins/My Streamradio/Release/Thumbs/Radio/Thumbs.db =================================================================== (Binary files differ) Property changes on: trunk/plugins/My Streamradio/Release/Thumbs/Radio/Thumbs.db ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/My Streamradio/readme.txt =================================================================== --- trunk/plugins/My Streamradio/readme.txt (rev 0) +++ trunk/plugins/My Streamradio/readme.txt 2007-07-27 13:37:45 UTC (rev 777) @@ -0,0 +1,79 @@ +My streamradio +------------------- + +Version 0.2 +----------- + +-add support for xml files +-actul title / artist will be displayed +-actual station , country will be displayed + +5 Parser method included: + +Method 1 +-------- +Single line with devider + +On the web page the title and artist is displayed as followed: + +Searchstring +. Offset rows +. +Start "Title - Artist" Stop + +Devider = "-" + +Method 2 +-------- +Single line + +Artist and title is send as a single line (mostly php) + +interpret=interpret&artist=artist&... + +Method 3 +-------- +Scan all rows + +Scan all rows for + +interpret +title +image + +Method 4 +-------- +XML Scan + +XML reader for page with return xml files +Data for each section written contiounsly + +Method 5 +-------- +Double line scan + +On the web page the title and artist is displayed as followed: + +Searchstring +. Offset rows +. +Start "Title" Stop +Start2 "Artist" Stop + + +Version 0.1 +----------- +-Initial release + +Copy the plugin and skin files into your favorite skin folder. + + +Description: +----------------- +This is the improved version of the radio plugin. I added support to +play asx files with thumbs. Also this plugin remember the last view setting. + + +Good luck +kroko + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kro...@us...> - 2007-07-27 13:33:52
|
Revision: 776 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=776&view=rev Author: kroko_koenig Date: 2007-07-27 06:33:51 -0700 (Fri, 27 Jul 2007) Log Message: ----------- Removed file/folder Removed Paths: ------------- trunk/plugins/My Streamradio/Release/Radio/Antenne Th?\195?\188ringen.asx Deleted: trunk/plugins/My Streamradio/Release/Radio/Antenne Th?\195?\188ringen.asx =================================================================== This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kro...@us...> - 2007-07-27 13:32:59
|
Revision: 775 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=775&view=rev Author: kroko_koenig Date: 2007-07-27 06:32:52 -0700 (Fri, 27 Jul 2007) Log Message: ----------- Removed file/folder Removed Paths: ------------- trunk/plugins/My Streamradio/Release/Thumbs/Radio/Antenne Th?\195?\188ringen.png Deleted: trunk/plugins/My Streamradio/Release/Thumbs/Radio/Antenne Th?\195?\188ringen.png =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kro...@us...> - 2007-07-27 13:29:01
|
Revision: 774 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=774&view=rev Author: kroko_koenig Date: 2007-07-27 06:28:59 -0700 (Fri, 27 Jul 2007) Log Message: ----------- Updated to version 0.2 new html parser for display artist/song Modified Paths: -------------- trunk/plugins/My Streamradio/Release/Skin/mystreamradio.xml trunk/plugins/My Streamradio/Source/MyStreamRadio/GUIRadio.cs trunk/plugins/My Streamradio/Source/MyStreamRadio/MyStreamRadio.csproj Added Paths: ----------- trunk/plugins/My Streamradio/Release/Radio/1046 RTL Hit-Radio.asx trunk/plugins/My Streamradio/Release/Radio/1046 RTL Hit-Radio.xml trunk/plugins/My Streamradio/Release/Radio/106!8.xml trunk/plugins/My Streamradio/Release/Radio/1067 Rockklassiker.asx trunk/plugins/My Streamradio/Release/Radio/1067 Rockklassiker.xml trunk/plugins/My Streamradio/Release/Radio/1Live.xml trunk/plugins/My Streamradio/Release/Radio/95Crave.asx trunk/plugins/My Streamradio/Release/Radio/95Crave.xml trunk/plugins/My Streamradio/Release/Radio/Antenne Thueringen.asx trunk/plugins/My Streamradio/Release/Radio/Antenne Thueringen.xml trunk/plugins/My Streamradio/Release/Radio/Bremen4.xml trunk/plugins/My Streamradio/Release/Radio/Energy HH.xml trunk/plugins/My Streamradio/Release/Radio/FFN.xml trunk/plugins/My Streamradio/Release/Radio/HR3.xml trunk/plugins/My Streamradio/Release/Radio/Hitradio RTL.xml trunk/plugins/My Streamradio/Release/Radio/KissFM.xml trunk/plugins/My Streamradio/Release/Radio/MDR Jump.xml trunk/plugins/My Streamradio/Release/Radio/N-Joy.xml trunk/plugins/My Streamradio/Release/Radio/NDR2.xml trunk/plugins/My Streamradio/Release/Radio/PSR.xml trunk/plugins/My Streamradio/Release/Radio/RMNrelax.xml trunk/plugins/My Streamradio/Release/Radio/RSH.xml trunk/plugins/My Streamradio/Release/Radio/Radio Hamburg.xml trunk/plugins/My Streamradio/Release/Radio/Radio Regenbogen.xml trunk/plugins/My Streamradio/Release/Radio/Radio SAW.asx trunk/plugins/My Streamradio/Release/Radio/Radio SAW.xml trunk/plugins/My Streamradio/Release/Radio/SWR3.asx trunk/plugins/My Streamradio/Release/Radio/SWR3.xml trunk/plugins/My Streamradio/Release/Radio/bigFM.xml trunk/plugins/My Streamradio/Release/Radio/delta radio.xml trunk/plugins/My Streamradio/Release/Thumbs/Radio/1046 RTL Hit-Radio.png trunk/plugins/My Streamradio/Release/Thumbs/Radio/1067 Rockklassiker.png trunk/plugins/My Streamradio/Release/Thumbs/Radio/95Crave.png trunk/plugins/My Streamradio/Release/Thumbs/Radio/Antenne Thueringen.png trunk/plugins/My Streamradio/Release/Thumbs/Radio/Radio SAW.png trunk/plugins/My Streamradio/Release/Thumbs/Radio/swr3.png Added: trunk/plugins/My Streamradio/Release/Radio/1046 RTL Hit-Radio.asx =================================================================== --- trunk/plugins/My Streamradio/Release/Radio/1046 RTL Hit-Radio.asx (rev 0) +++ trunk/plugins/My Streamradio/Release/Radio/1046 RTL Hit-Radio.asx 2007-07-27 13:28:59 UTC (rev 774) @@ -0,0 +1,5 @@ +<ASX VERSION="3"><TITLE>StreamRadio</title> +<ENTRY> + <Ref href = "http://lsd.newmedia.tiscali-business.com/bb/redirect.lsc?adid=0&stream=rtl1046$rtllive.wma&content=live&media=ms" /> +</ENTRY> +</ASX> \ No newline at end of file Added: trunk/plugins/My Streamradio/Release/Radio/1046 RTL Hit-Radio.xml =================================================================== --- trunk/plugins/My Streamradio/Release/Radio/1046 RTL Hit-Radio.xml (rev 0) +++ trunk/plugins/My Streamradio/Release/Radio/1046 RTL Hit-Radio.xml 2007-07-27 13:28:59 UTC (rev 774) @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="utf-8"?> +<profile> + <section name="station"> + <entry name="name">1046 RTL Hit-Radio</entry> + <entry name="title">1046 RTL Hit-Radio</entry> + <entry name="description">Berlins Hit-Radio</entry> + <entry name="homepage">http://104.6rtl.com/home</entry> + <entry name="position">3</entry> + <entry name="logo"></entry> + <entry name="bouquet">German</entry> + <entry name="category">Mixed</entry> + <entry name="language">German</entry> + <entry name="country">de</entry> + <entry name="quality">Good</entry> + </section> + + <section name="stream"> + <entry name="url">http://lsd.newmedia.tiscali-business.com/bb/redirect.lsc?adid=0&stream=rtl1046$rtllive.wma&content=live&media=ms"</entry> + </section> + + <section name="html"> + <entry name="method">4</entry> + <entry name="url">http://104.6rtl.com/iplaylist/getsong.xml</entry> + <entry name="search"></entry> + <entry name="offset"></entry> + <entry name="start"></entry> + <entry name="start2"></entry> + <entry name="stop"></entry> + <entry name="devider"></entry> + <entry name="image">songonairimgname</entry> + <entry name="title">songonairtitel</entry> + <entry name="interpret">songonairinterpret</entry> + <entry name="swap">no</entry> + + </section> + +</profile> + Added: trunk/plugins/My Streamradio/Release/Radio/106!8.xml =================================================================== --- trunk/plugins/My Streamradio/Release/Radio/106!8.xml (rev 0) +++ trunk/plugins/My Streamradio/Release/Radio/106!8.xml 2007-07-27 13:28:59 UTC (rev 774) @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="utf-8"?> +<profile> + <section name="station"> + <entry name="name">106!8</entry> + <entry name="title">106!8</entry> + <entry name="description">rock 'n pop</entry> + <entry name="homepage">http://www.106acht.de</entry> + <entry name="position">3</entry> + <entry name="logo"></entry> + <entry name="bouquet">German</entry> + <entry name="category">Mixed</entry> + <entry name="language">German</entry> + <entry name="country">de</entry> + <entry name="quality">Good</entry> + </section> + + <section name="stream"> + <entry name="url">http://lsd.newmedia.tiscali-business.com/bb/redirect.lsc?adid=0&stream=rtl1046$rtllive.wma&content=live&media=ms"</entry> + </section> + + <section name="html"> + <entry name="method">3</entry> + <entry name="url">http://alsterradio.de/alsterradioApplet/OG2WEBurlencoded.php</entry> + <entry name="search"></entry> + <entry name="offset"></entry> + <entry name="start"></entry> + <entry name="start2"></entry> + <entry name="stop">&</entry> + <entry name="devider"></entry> + <entry name="image"></entry> + <entry name="title">titel1=</entry> + <entry name="interpret">interpret1=</entry> + <entry name="swap">no</entry> + + </section> + +</profile> + Added: trunk/plugins/My Streamradio/Release/Radio/1067 Rockklassiker.asx =================================================================== --- trunk/plugins/My Streamradio/Release/Radio/1067 Rockklassiker.asx (rev 0) +++ trunk/plugins/My Streamradio/Release/Radio/1067 Rockklassiker.asx 2007-07-27 13:28:59 UTC (rev 774) @@ -0,0 +1,5 @@ +<ASX VERSION="3"><TITLE>StreamRadio</title> +<ENTRY> + <Ref href = "http://www.nwrweb.com/player/asx/10.asx?playerKey=rockklassiker&nospot" /> +</ENTRY> +</ASX> \ No newline at end of file Added: trunk/plugins/My Streamradio/Release/Radio/1067 Rockklassiker.xml =================================================================== --- trunk/plugins/My Streamradio/Release/Radio/1067 Rockklassiker.xml (rev 0) +++ trunk/plugins/My Streamradio/Release/Radio/1067 Rockklassiker.xml 2007-07-27 13:28:59 UTC (rev 774) @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="utf-8"?> +<profile> + <section name="station"> + <entry name="name">1067 Rockklassiker</entry> + <entry name="title">1067 Rockklassiker</entry> + <entry name="description">Alla tiders bästa rock!</entry> + <entry name="homepage">http://www.rockklassiker.se</entry> + <entry name="position">3</entry> + <entry name="logo"></entry> + <entry name="bouquet">Swedish</entry> + <entry name="category">Mixed</entry> + <entry name="language">Swedish</entry> + <entry name="country">se</entry> + <entry name="quality">Good</entry> + </section> + + <section name="stream"> + <entry name="url">http://www.nwrweb.com/player/asx/10.asx?playerKey=rockklassiker&nospot</entry> + </section> + + <section name="html"> + <entry name="method">5</entry> + <entry name="url">http://www.rockklassiker.se/wpc/TuneTracker/Track.aspx?station=rockklassiker</entry> + <entry name="search">hidden</entry> + <entry name="offset">12</entry> + <entry name="start"><B></entry> + <entry name="start2"></entry> + <entry name="stop"><</entry> + <entry name="devider"></entry> + <entry name="image"></entry> + <entry name="title"></entry> + <entry name="interpret"></entry> + <entry name="swap">yes</entry> + + </section> + +</profile> + Added: trunk/plugins/My Streamradio/Release/Radio/1Live.xml =================================================================== --- trunk/plugins/My Streamradio/Release/Radio/1Live.xml (rev 0) +++ trunk/plugins/My Streamradio/Release/Radio/1Live.xml 2007-07-27 13:28:59 UTC (rev 774) @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="utf-8"?> +<profile> + <section name="station"> + <entry name="name">1Live</entry> + <entry name="title">1Live</entry> + <entry name="description">Das Jugendprogramm des Westdeutschen Rundfunks</entry> + <entry name="homepage">http://www.einslive.de</entry> + <entry name="position">3</entry> + <entry name="logo"></entry> + <entry name="bouquet">German</entry> + <entry name="category">Mixed</entry> + <entry name="language">German</entry> + <entry name="country">de</entry> + <entry name="quality">Good</entry> + </section> + + <section name="stream"> + <entry name="url">http://lsd.newmedia.tiscali-business.com/bb/redirect.lsc?adid=0&stream=rtl1046$rtllive.wma&content=live&media=ms"</entry> + </section> + + <section name="html"> + <entry name="method">2</entry> + <entry name="url">http://www.einslive.de</entry> + <entry name="search"></entry> + <entry name="offset"></entry> + <entry name="start">Interpret</th><td class="wsELPink"></entry> + <entry name="start2">Titel</th><td><strong></entry> + <entry name="stop"><</entry> + <entry name="devider"></entry> + <entry name="image"></entry> + <entry name="title"></entry> + <entry name="interpret"></entry> + <entry name="swap">no</entry> + + </section> + +</profile> + Added: trunk/plugins/My Streamradio/Release/Radio/95Crave.asx =================================================================== --- trunk/plugins/My Streamradio/Release/Radio/95Crave.asx (rev 0) +++ trunk/plugins/My Streamradio/Release/Radio/95Crave.asx 2007-07-27 13:28:59 UTC (rev 774) @@ -0,0 +1,5 @@ +<ASX VERSION="3"><TITLE>StreamRadio</title> +<ENTRY> + <Ref href = "http://stream.sri.ca/asx/asxgen.php?mount=ckzz&al=oI_V00PIzfDxXnFAUhCkkN6uRlX-jJwBqIGdsOSruYJAgTw2TdDR68P2FNCrPwSz&r=14011542761185218337" /> +</ENTRY> +</ASX> \ No newline at end of file Added: trunk/plugins/My Streamradio/Release/Radio/95Crave.xml =================================================================== --- trunk/plugins/My Streamradio/Release/Radio/95Crave.xml (rev 0) +++ trunk/plugins/My Streamradio/Release/Radio/95Crave.xml 2007-07-27 13:28:59 UTC (rev 774) @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="utf-8"?> +<profile> + <section name="station"> + <entry name="name">95 Crave</entry> + <entry name="title">95 Crave</entry> + <entry name="description">Music that moves you</entry> + <entry name="homepage">http://www.95crave.com/</entry> + <entry name="position">2</entry> + <entry name="logo"></entry> + <entry name="bouquet">Canada</entry> + <entry name="category">Mixed</entry> + <entry name="language">English</entry> + <entry name="country">ca</entry> + <entry name="quality">Good</entry> + </section> + + <section name="stream"> + <entry name="url">http://stream.sri.ca/asx/asxgen.php?mount=ckzz&al=oI_V00PIzfDxXnFAUhCkkN6uRlX-jJwBqIGdsOSruYJAgTw2TdDR68P2FNCrPwSz&r=14011542761185218337"</entry> + </section> + + <section name="html"> + <entry name="method">4</entry> + <entry name="url">http://www.95crave.com/nowplaying/xml</entry> + <entry name="search"></entry> + <entry name="offset"></entry> + <entry name="start"></entry> + <entry name="stop"></entry> + <entry name="devider"></entry> + <entry name="image">nowplayingalbumimage</entry> + <entry name="title">nowplayingtrackname</entry> + <entry name="interpret">nowplayingartistname</entry> + <entry name="swap">no</entry> + + </section> + +</profile> + Added: trunk/plugins/My Streamradio/Release/Radio/Antenne Thueringen.asx =================================================================== --- trunk/plugins/My Streamradio/Release/Radio/Antenne Thueringen.asx (rev 0) +++ trunk/plugins/My Streamradio/Release/Radio/Antenne Thueringen.asx 2007-07-27 13:28:59 UTC (rev 774) @@ -0,0 +1,5 @@ +<ASX VERSION="3"><TITLE>StreamRadio</title> +<ENTRY> + <Ref href = "http://lsd.newmedia.tiscali-business.com/bb/redirect.lsc?adid=0&stream=antennethuer$antennestream.wma&content=live&media=ms" /> +</ENTRY> +</ASX> \ No newline at end of file Added: trunk/plugins/My Streamradio/Release/Radio/Antenne Thueringen.xml =================================================================== --- trunk/plugins/My Streamradio/Release/Radio/Antenne Thueringen.xml (rev 0) +++ trunk/plugins/My Streamradio/Release/Radio/Antenne Thueringen.xml 2007-07-27 13:28:59 UTC (rev 774) @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="utf-8"?> +<profile> + <section name="station"> + <entry name="name">Antenne Thueringen</entry> + <entry name="title">Antenne Thueringen</entry> + <entry name="description">Wir... spielen die Hits</entry> + <entry name="homepage">http://www.antennethueringen.de</entry> + <entry name="position">3</entry> + <entry name="logo"></entry> + <entry name="bouquet">German</entry> + <entry name="category">Mixed</entry> + <entry name="language">German</entry> + <entry name="country">de</entry> + <entry name="quality">Good</entry> + </section> + + <section name="stream"> + <entry name="url">http://lsd.newmedia.tiscali-business.com/bb/redirect.lsc?adid=0&stream=rtl1046$rtllive.wma&content=live&media=ms"</entry> + </section> + + <section name="html"> + <entry name="method">3</entry> + <entry name="url">http://www.antennethueringen.de/titel/at_titel.txt2</entry> + <entry name="search"></entry> + <entry name="offset"></entry> + <entry name="start"></entry> + <entry name="start2"></entry> + <entry name="stop">&</entry> + <entry name="devider"></entry> + <entry name="image"></entry> + <entry name="title">a2=</entry> + <entry name="interpret">a1=</entry> + <entry name="swap">no</entry> + + </section> + + +</profile> + Added: trunk/plugins/My Streamradio/Release/Radio/Bremen4.xml =================================================================== --- trunk/plugins/My Streamradio/Release/Radio/Bremen4.xml (rev 0) +++ trunk/plugins/My Streamradio/Release/Radio/Bremen4.xml 2007-07-27 13:28:59 UTC (rev 774) @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="utf-8"?> +<profile> + <section name="station"> + <entry name="name">Bremen vier</entry> + <entry name="title">Bremen vier</entry> + <entry name="description">rocken, poppen, dancen</entry> + <entry name="homepage">http://www.radiobremen.de/bremenvier</entry> + <entry name="position">3</entry> + <entry name="logo"></entry> + <entry name="bouquet">German</entry> + <entry name="category">Mixed</entry> + <entry name="language">German</entry> + <entry name="country">de</entry> + <entry name="quality">Good</entry> + </section> + + <section name="stream"> + <entry name="url">http://lsd.newmedia.tiscali-business.com/bb/redirect.lsc?adid=0&stream=rtl1046$rtllive.wma&content=live&media=ms"</entry> + </section> + + <section name="html"> + <entry name="method">1</entry> + <entry name="url">http://www.radiobremen.de/bremenvier</entry> + <entry name="search">"Sendung"</entry> + <entry name="offset">18</entry> + <entry name="start"></entry> + <entry name="start2"></entry> + <entry name="stop"></a</entry> + <entry name="devider">:<br /></entry> + <entry name="image"></entry> + <entry name="title"></entry> + <entry name="interpret"></entry> + <entry name="swap">no</entry> + + </section> + + +</profile> + Added: trunk/plugins/My Streamradio/Release/Radio/Energy HH.xml =================================================================== --- trunk/plugins/My Streamradio/Release/Radio/Energy HH.xml (rev 0) +++ trunk/plugins/My Streamradio/Release/Radio/Energy HH.xml 2007-07-27 13:28:59 UTC (rev 774) @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="utf-8"?> +<profile> + <section name="station"> + <entry name="name">Energy HH</entry> + <entry name="title">Energy HH</entry> + <entry name="description">Hit music only</entry> + <entry name="homepage">http://www.energy.de</entry> + <entry name="position">2</entry> + <entry name="logo"></entry> + <entry name="bouquet">German</entry> + <entry name="category">Mixed</entry> + <entry name="language">German</entry> + <entry name="country">de</entry> + <entry name="quality">Good</entry> + </section> + + <section name="stream"> + <entry name="url">http://lsd.newmedia.tiscali-business.com/bb/redirect.lsc?adid=0&stream=deltaradio/livestream.wma&content=live&media=ms"</entry> + </section> + + <section name="html"> + <entry name="method">0</entry> + <entry name="url"></entry> + <entry name="search"></entry> + <entry name="offset"></entry> + <entry name="start"></entry> + <entry name="start2"></entry> + <entry name="stop"></entry> + <entry name="devider"></entry> + <entry name="image"></entry> + <entry name="title"></entry> + <entry name="interpret"></entry> + <entry name="swap">no</entry> + + </section> + +</profile> + Added: trunk/plugins/My Streamradio/Release/Radio/FFN.xml =================================================================== --- trunk/plugins/My Streamradio/Release/Radio/FFN.xml (rev 0) +++ trunk/plugins/My Streamradio/Release/Radio/FFN.xml 2007-07-27 13:28:59 UTC (rev 774) @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="utf-8"?> +<profile> + <section name="station"> + <entry name="name">FFN</entry> + <entry name="title">FFN</entry> + <entry name="description">du bist Niedersachsen</entry> + <entry name="homepage">http://www.ffn.de</entry> + <entry name="position">3</entry> + <entry name="logo"></entry> + <entry name="bouquet">German</entry> + <entry name="category">Mixed</entry> + <entry name="language">German</entry> + <entry name="country">de</entry> + <entry name="quality">Good</entry> + </section> + + <section name="stream"> + <entry name="url">http://lsd.newmedia.tiscali-business.com/bb/redirect.lsc?content=live&media=ms&stream=radiohamburg/livestream.wma"</entry> + </section> + + <section name="html"> + <entry name="method">1</entry> + <entry name="url">http://www.ffn.de/ffnlive/homepage</entry> + <entry name="search">webradio</entry> + <entry name="offset">2</entry> + <entry name="start">html "></entry> + <entry name="stop"><</entry> + <entry name="devider"> - </entry> + <entry name="image"></entry> + <entry name="title"></entry> + <entry name="interpret"></entry> + <entry name="swap">no</entry> + + </section> + +</profile> + Added: trunk/plugins/My Streamradio/Release/Radio/HR3.xml =================================================================== --- trunk/plugins/My Streamradio/Release/Radio/HR3.xml (rev 0) +++ trunk/plugins/My Streamradio/Release/Radio/HR3.xml 2007-07-27 13:28:59 UTC (rev 774) @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="utf-8"?> +<profile> + <section name="station"> + <entry name="name">HR3</entry> + <entry name="title">HR3</entry> + <entry name="description">voll im Leben</entry> + <entry name="homepage">http://www.antennethueringen.de</entry> + <entry name="position">3</entry> + <entry name="logo"></entry> + <entry name="bouquet">German</entry> + <entry name="category">Mixed</entry> + <entry name="language">German</entry> + <entry name="country">de</entry> + <entry name="quality">Good</entry> + </section> + + <section name="stream"> + <entry name="url">http://lsd.newmedia.tiscali-business.com/bb/redirect.lsc?adid=0&stream=rtl1046$rtllive.wma&content=live&media=ms"</entry> + </section> + + <section name="html"> + <entry name="method">3</entry> + <entry name="url">http://www.hr-online.de/website/tools/playlist/flashdata/hr3neu.txt</entry> + <entry name="search"></entry> + <entry name="offset"></entry> + <entry name="start"></entry> + <entry name="start2"></entry> + <entry name="stop">-</entry> + <entry name="devider"></entry> + <entry name="image"></entry> + <entry name="title">-%20</entry> + <entry name="interpret">:%20</entry> + <entry name="swap">no</entry> + + </section> + + +</profile> + Added: trunk/plugins/My Streamradio/Release/Radio/Hitradio RTL.xml =================================================================== --- trunk/plugins/My Streamradio/Release/Radio/Hitradio RTL.xml (rev 0) +++ trunk/plugins/My Streamradio/Release/Radio/Hitradio RTL.xml 2007-07-27 13:28:59 UTC (rev 774) @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="utf-8"?> +<profile> + <section name="station"> + <entry name="name">Hitradio RTL</entry> + <entry name="title">Hitradio RTL</entry> + <entry name="description">Die groessten Hits aller Zeiten</entry> + <entry name="homepage">http://www.hitradio-rtl-sachsen.de</entry> + <entry name="position">2</entry> + <entry name="logo"></entry> + <entry name="bouquet">German</entry> + <entry name="category">Mixed</entry> + <entry name="language">German</entry> + <entry name="country">de</entry> + <entry name="quality">Good</entry> + </section> + + <section name="stream"> + <entry name="url">http://lsd.newmedia.tiscali-business.com/bb/redirect.lsc?adid=0&stream=deltaradio/livestream.wma&content=live&media=ms"</entry> + </section> + + <section name="html"> + <entry name="method">0</entry> + <entry name="url"></entry> + <entry name="search"></entry> + <entry name="offset"></entry> + <entry name="start"></entry> + <entry name="start2"></entry> + <entry name="stop"></entry> + <entry name="devider"></entry> + <entry name="image"></entry> + <entry name="title"></entry> + <entry name="interpret"></entry> + <entry name="swap">no</entry> + + </section> + +</profile> + Added: trunk/plugins/My Streamradio/Release/Radio/KissFM.xml =================================================================== --- trunk/plugins/My Streamradio/Release/Radio/KissFM.xml (rev 0) +++ trunk/plugins/My Streamradio/Release/Radio/KissFM.xml 2007-07-27 13:28:59 UTC (rev 774) @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="utf-8"?> +<profile> + <section name="station"> + <entry name="name">KissFM</entry> + <entry name="title">KissFM</entry> + <entry name="description">KISS FM Liveradio</entry> + <entry name="homepage">http://www.kissfm.de</entry> + <entry name="position">3</entry> + <entry name="logo"></entry> + <entry name="bouquet">German</entry> + <entry name="category">Mixed</entry> + <entry name="language">German</entry> + <entry name="country">de</entry> + <entry name="quality">Good</entry> + </section> + + <section name="stream"> + <entry name="url">http://lsd.newmedia.tiscali-business.com/bb/redirect.lsc?adid=0&stream=rtl1046$rtllive.wma&content=live&media=ms"</entry> + </section> + + <section name="html"> + <entry name="method">4</entry> + <entry name="url">http://www.kissfm.de/cgi-bin/WebObjects/XMLPlaylistServer.woa/wa/exportPlaylistAsXML?client=KissFM</entry> + <entry name="search"></entry> + <entry name="offset"></entry> + <entry name="start"></entry> + <entry name="start2"></entry> + <entry name="stop"></entry> + <entry name="devider"></entry> + <entry name="image"></entry> + <entry name="title">playlistentrysong</entry> + <entry name="interpret">playlistentryartist</entry> + <entry name="swap">no</entry> + + </section> + +</profile> + Added: trunk/plugins/My Streamradio/Release/Radio/MDR Jump.xml =================================================================== --- trunk/plugins/My Streamradio/Release/Radio/MDR Jump.xml (rev 0) +++ trunk/plugins/My Streamradio/Release/Radio/MDR Jump.xml 2007-07-27 13:28:59 UTC (rev 774) @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="utf-8"?> +<profile> + <section name="station"> + <entry name="name">MDR Jump</entry> + <entry name="title">MDR Jump</entry> + <entry name="description">MDR Jump Liveradio</entry> + <entry name="homepage">http://www.jumpradio.de/musik/pics-interpret</entry> + <entry name="position">3</entry> + <entry name="logo"></entry> + <entry name="bouquet">German</entry> + <entry name="category">Mixed</entry> + <entry name="language">German</entry> + <entry name="country">de</entry> + <entry name="quality">Good</entry> + </section> + + <section name="stream"> + <entry name="url">http://lsd.newmedia.tiscali-business.com/bb/redirect.lsc?adid=0&stream=rtl1046$rtllive.wma&content=live&media=ms"</entry> + </section> + + <section name="html"> + <entry name="method">4</entry> + <entry name="url">http://www.jumpradio.de/navi/onair.xml</entry> + <entry name="search"></entry> + <entry name="offset"></entry> + <entry name="start"></entry> + <entry name="start2"></entry> + <entry name="stop"></entry> + <entry name="devider"></entry> + <entry name="image">onairimage</entry> + <entry name="title">onairtitel</entry> + <entry name="interpret">onairinterpret</entry> + <entry name="swap">no</entry> + + </section> + +</profile> + Added: trunk/plugins/My Streamradio/Release/Radio/N-Joy.xml =================================================================== --- trunk/plugins/My Streamradio/Release/Radio/N-Joy.xml (rev 0) +++ trunk/plugins/My Streamradio/Release/Radio/N-Joy.xml 2007-07-27 13:28:59 UTC (rev 774) @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="utf-8"?> +<profile> + <section name="station"> + <entry name="name">N-Joy</entry> + <entry name="title">N-Joy</entry> + <entry name="description">enjoy the music</entry> + <entry name="homepage">http://www.n-joy.de</entry> + <entry name="position">3</entry> + <entry name="logo"></entry> + <entry name="bouquet">German</entry> + <entry name="category">Mixed</entry> + <entry name="language">German</entry> + <entry name="country">de</entry> + <entry name="quality">Good</entry> + </section> + + <section name="stream"> + <entry name="url">http://lsd.newmedia.tiscali-business.com/bb/redirect.lsc?content=live&media=ms&stream=radiohamburg/livestream.wma"</entry> + </section> + + <section name="html"> + <entry name="method">1</entry> + <entry name="url">http://www.n-joy.de</entry> + <entry name="search">alt="N-JOY Playlist"</entry> + <entry name="offset">1</entry> + <entry name="start">Playlist"></entry> + <entry name="stop"><</entry> + <entry name="devider"> - </entry> + <entry name="image"></entry> + <entry name="title"></entry> + <entry name="interpret"></entry> + <entry name="swap">no</entry> + + </section> + +</profile> + Added: trunk/plugins/My Streamradio/Release/Radio/NDR2.xml =================================================================== --- trunk/plugins/My Streamradio/Release/Radio/NDR2.xml (rev 0) +++ trunk/plugins/My Streamradio/Release/Radio/NDR2.xml 2007-07-27 13:28:59 UTC (rev 774) @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="utf-8"?> +<profile> + <section name="station"> + <entry name="name">NDR2</entry> + <entry name="title">NDR2</entry> + <entry name="description">NDR2 Livemusic</entry> + <entry name="homepage">http://www.ndr2.de</entry> + <entry name="position">3</entry> + <entry name="logo"></entry> + <entry name="bouquet">German</entry> + <entry name="category">Mixed</entry> + <entry name="language">German</entry> + <entry name="country">de</entry> + <entry name="quality">Good</entry> + </section> + + <section name="stream"> + <entry name="url">http://lsd.newmedia.tiscali-business.com/bb/redirect.lsc?content=live&media=ms&stream=radiohamburg/livestream.wma"</entry> + </section> + + <section name="html"> + <entry name="method">1</entry> + <entry name="url">http://www.ndr2.de</entry> + <entry name="search">boxtext">Jetzt h</entry> + <entry name="offset">1</entry> + <entry name="start"><strong></entry> + <entry name="stop"><</entry> + <entry name="devider">: </entry> + <entry name="image"></entry> + <entry name="title"></entry> + <entry name="interpret"></entry> + <entry name="swap">no</entry> + + </section> + +</profile> + Added: trunk/plugins/My Streamradio/Release/Radio/PSR.xml =================================================================== --- trunk/plugins/My Streamradio/Release/Radio/PSR.xml (rev 0) +++ trunk/plugins/My Streamradio/Release/Radio/PSR.xml 2007-07-27 13:28:59 UTC (rev 774) @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="utf-8"?> +<profile> + <section name="station"> + <entry name="name">PSR</entry> + <entry name="title">PSR</entry> + <entry name="description">Der Supermix für Sachsen</entry> + <entry name="homepage">http://www.radiopsr.de</entry> + <entry name="position">3</entry> + <entry name="logo"></entry> + <entry name="bouquet">German</entry> + <entry name="category">Mixed</entry> + <entry name="language">German</entry> + <entry name="country">de</entry> + <entry name="quality">Good</entry> + </section> + + <section name="stream"> + <entry name="url">http://lsd.newmedia.tiscali-business.com/bb/redirect.lsc?content=live&media=ms&stream=radiohamburg/livestream.wma"</entry> + </section> + + <section name="html"> + <entry name="method">1</entry> + <entry name="url">http://www.radiopsr.de/www/navi/navi.php</entry> + <entry name="search">Jetzt am Mikrofon</entry> + <entry name="offset">2</entry> + <entry name="start"></entry> + <entry name="stop"><</entry> + <entry name="devider"> - </entry> + <entry name="image"></entry> + <entry name="title"></entry> + <entry name="interpret"></entry> + <entry name="swap">yes</entry> + + </section> + +</profile> + Added: trunk/plugins/My Streamradio/Release/Radio/RMNrelax.xml =================================================================== --- trunk/plugins/My Streamradio/Release/Radio/RMNrelax.xml (rev 0) +++ trunk/plugins/My Streamradio/Release/Radio/RMNrelax.xml 2007-07-27 13:28:59 UTC (rev 774) @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="utf-8"?> +<profile> + <section name="station"> + <entry name="name">RMNrelax</entry> + <entry name="title">RMNrelax</entry> + <entry name="description">Your relaxed chillout radiostation</entry> + <entry name="homepage">http://www.jumpradio.de/musik/pics-interpret</entry> + <entry name="position">3</entry> + <entry name="logo"></entry> + <entry name="bouquet">German</entry> + <entry name="category">Mixed</entry> + <entry name="language">German</entry> + <entry name="country">de</entry> + <entry name="quality">Good</entry> + </section> + + <section name="stream"> + <entry name="url">http://lsd.newmedia.tiscali-business.com/bb/redirect.lsc?adid=0&stream=rtl1046$rtllive.wma&content=live&media=ms"</entry> + </section> + + <section name="html"> + <entry name="method">2</entry> + <entry name="url">http://213.203.215.17/playlist/playlistrelax/shoutrm.php?template=playertitel.htm</entry> + <entry name="search"></entry> + <entry name="offset"></entry> + <entry name="start">font color="#000000"></entry> + <entry name="start2"> - </entry> + <entry name="stop"><</entry> + <entry name="devider"></entry> + <entry name="image"></entry> + <entry name="title"></entry> + <entry name="interpret"></entry> + <entry name="swap">no</entry> + + </section> + +</profile> + Added: trunk/plugins/My Streamradio/Release/Radio/RSH.xml =================================================================== --- trunk/plugins/My Streamradio/Release/Radio/RSH.xml (rev 0) +++ trunk/plugins/My Streamradio/Release/Radio/RSH.xml 2007-07-27 13:28:59 UTC (rev 774) @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="utf-8"?> +<profile> + <section name="station"> + <entry name="name">RSH</entry> + <entry name="title">Radio Schleswig-Holstein</entry> + <entry name="description">Mehr Hits, mehr Abwechslung, mehr Schleswig-Holstein</entry> + <entry name="homepage">http://www.rsh.de</entry> + <entry name="position">1</entry> + <entry name="logo"></entry> + <entry name="bouquet">German</entry> + <entry name="category">Mixed</entry> + <entry name="language">German</entry> + <entry name="country">de</entry> + <entry name="quality">Good</entry> + </section> + + <section name="stream"> + <entry name="url">http://lsd.newmedia.tiscali-business.com/bb/redirect.lsc?adid=0&stream=rsh/live.wma&content=live&media=ms"</entry> + </section> + + <section name="html"> + <entry name="method">3</entry> + <entry name="url">http://www.rsh.de/rshweb/components/flash/Hafenrundfahrt.php</entry> + <entry name="search"></entry> + <entry name="offset"></entry> + <entry name="start"></entry> + <entry name="stop">#</entry> + <entry name="devider"></entry> + <entry name="image">#image_var=</entry> + <entry name="title">#titel=</entry> + <entry name="interpret">#interpret=</entry> + <entry name="swap">no</entry> + +</section> + +</profile> + Added: trunk/plugins/My Streamradio/Release/Radio/Radio Hamburg.xml =================================================================== --- trunk/plugins/My Streamradio/Release/Radio/Radio Hamburg.xml (rev 0) +++ trunk/plugins/My Streamradio/Release/Radio/Radio Hamburg.xml 2007-07-27 13:28:59 UTC (rev 774) @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="utf-8"?> +<profile> + <section name="station"> + <entry name="name">Radio Hamburg</entry> + <entry name="title">Radio Hamburg</entry> + <entry name="description">auf 103.6 - der Mix macht's</entry> + <entry name="homepage">http://www.radiohamburg.de</entry> + <entry name="position">3</entry> + <entry name="logo"></entry> + <entry name="bouquet">German</entry> + <entry name="category">Mixed</entry> + <entry name="language">German</entry> + <entry name="country">de</entry> + <entry name="quality">Good</entry> + </section> + + <section name="stream"> + <entry name="url">http://lsd.newmedia.tiscali-business.com/bb/redirect.lsc?content=live&media=ms&stream=radiohamburg/livestream.wma"</entry> + </section> + + <section name="html"> + <entry name="method">1</entry> + <entry name="url">http://www.radiohamburg.de</entry> + <entry name="search">>Webradio<</entry> + <entry name="offset">2</entry> + <entry name="start">alt="</entry> + <entry name="stop">"</entry> + <entry name="devider">mit</entry> + <entry name="image">src="</entry> + <entry name="title"></entry> + <entry name="interpret"></entry> + <entry name="swap">no</entry> + + </section> + +</profile> + Added: trunk/plugins/My Streamradio/Release/Radio/Radio Regenbogen.xml =================================================================== --- trunk/plugins/My Streamradio/Release/Radio/Radio Regenbogen.xml (rev 0) +++ trunk/plugins/My Streamradio/Release/Radio/Radio Regenbogen.xml 2007-07-27 13:28:59 UTC (rev 774) @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="utf-8"?> +<profile> + <section name="station"> + <entry name="name">Radio Regenbogen</entry> + <entry name="title">Radio Regenbogen</entry> + <entry name="description">Wir sind von Hier</entry> + <entry name="homepage">http://www.regenbogenweb.de</entry> + <entry name="position">3</entry> + <entry name="logo"></entry> + <entry name="bouquet">German</entry> + <entry name="category">Mixed</entry> + <entry name="language">German</entry> + <entry name="country">de</entry> + <entry name="quality">Good</entry> + </section> + + <section name="stream"> + <entry name="url">http://lsd.newmedia.tiscali-business.com/bb/redirect.lsc?content=live&media=ms&stream=radiohamburg/livestream.wma"</entry> + </section> + + <section name="html"> + <entry name="method">1</entry> + <entry name="url">http://www.regenbogenweb.de</entry> + <entry name="search">interpret</entry> + <entry name="offset">0</entry> + <entry name="start">interpret"></entry> + <entry name="stop"></p></entry> + <entry name="devider"></span><br /></entry> + <entry name="image">img src="</entry> + <entry name="title"></entry> + <entry name="interpret"></entry> + <entry name="swap">no</entry> + + </section> + +</profile> + Added: trunk/plugins/My Streamradio/Release/Radio/Radio SAW.asx =================================================================== --- trunk/plugins/My Streamradio/Release/Radio/Radio SAW.asx (rev 0) +++ trunk/plugins/My Streamradio/Release/Radio/Radio SAW.asx 2007-07-27 13:28:59 UTC (rev 774) @@ -0,0 +1,5 @@ +<ASX VERSION="3"><TITLE>StreamRadio</title> +<ENTRY> + <Ref href = "http://lsd.newmedia.tiscali-business.com/bb/redirect.lsc?adid=0&stream=radiosaw/livestream.wma&content=live&media=ms" /> +</ENTRY> +</ASX> \ No newline at end of file Added: trunk/plugins/My Streamradio/Release/Radio/Radio SAW.xml =================================================================== --- trunk/plugins/My Streamradio/Release/Radio/Radio SAW.xml (rev 0) +++ trunk/plugins/My Streamradio/Release/Radio/Radio SAW.xml 2007-07-27 13:28:59 UTC (rev 774) @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="utf-8"?> +<profile> + <section name="station"> + <entry name="name">Radio SAW</entry> + <entry name="title">Radio SAW</entry> + <entry name="description">Superhits für Sachsen-Anhalt</entry> + <entry name="homepage">http://www.radiosaw.de</entry> + <entry name="position">3</entry> + <entry name="logo"></entry> + <entry name="bouquet">German</entry> + <entry name="category">Mixed</entry> + <entry name="language">German</entry> + <entry name="country">de</entry> + <entry name="quality">Good</entry> + </section> + + <section name="stream"> + <entry name="url">http://lsd.newmedia.tiscali-business.com/bb/redirect.lsc?adid=0&stream=radiosaw/livestream.wma&content=live&media=ms"</entry> + </section> + + <section name="html"> + <entry name="method">3</entry> + <entry name="url">http://www.radiosaw.de/aktuellertitel/akttitelsaw_fuerflash.txt</entry> + <entry name="search"></entry> + <entry name="offset"></entry> + <entry name="start"></entry> + <entry name="start2"></entry> + <entry name="stop">&</entry> + <entry name="devider"></entry> + <entry name="image">bildurl=</entry> + <entry name="title">titel=</entry> + <entry name="interpret">interpret=</entry> + <entry name="swap">no</entry> + + </section> + +</profile> + Added: trunk/plugins/My Streamradio/Release/Radio/SWR3.asx =================================================================== --- trunk/plugins/My Streamradio/Release/Radio/SWR3.asx (rev 0) +++ trunk/plugins/My Streamradio/Release/Radio/SWR3.asx 2007-07-27 13:28:59 UTC (rev 774) @@ -0,0 +1,5 @@ +<ASX VERSION="3"><TITLE>StreamRadio</title> +<ENTRY> + <Ref href = "http://lsd.newmedia.tiscali-business.com/bb/redirect.lsc?stream=swr3/livestream.wma&content=live&media=ms" /> +</ENTRY> +</ASX> \ No newline at end of file Added: trunk/plugins/My Streamradio/Release/Radio/SWR3.xml =================================================================== --- trunk/plugins/My Streamradio/Release/Radio/SWR3.xml (rev 0) +++ trunk/plugins/My Streamradio/Release/Radio/SWR3.xml 2007-07-27 13:28:59 UTC (rev 774) @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="utf-8"?> +<profile> + <section name="station"> + <entry name="name">SWR3</entry> + <entry name="title">SWR3</entry> + <entry name="description">Der Elch im Netz</entry> + <entry name="homepage">http://www.swr3.de</entry> + <entry name="position">3</entry> + <entry name="logo"></entry> + <entry name="bouquet">German</entry> + <entry name="category">Mixed</entry> + <entry name="language">German</entry> + <entry name="country">de</entry> + <entry name="quality">Good</entry> + </section> + + <section name="stream"> + <entry name="url">http://lsd.newmedia.tiscali-business.com/bb/redirect.lsc?content=live&media=ms&stream=radiohamburg/livestream.wma"</entry> + </section> + + <section name="html"> + <entry name="method">1</entry> + <entry name="url">http://www.swr3.de/startpage/index.html</entry> + <entry name="search">coverrahmen_l.gif</entry> + <entry name="offset">1</entry> + <entry name="start">title="</entry> + <entry name="stop">"</entry> + <entry name="devider"> - </entry> + <entry name="image">img src="</entry> + <entry name="title"></entry> + <entry name="interpret"></entry> + <entry name="swap">no</entry> + + </section> + +</profile> + Added: trunk/plugins/My Streamradio/Release/Radio/bigFM.xml =================================================================== --- trunk/plugins/My Streamradio/Release/Radio/bigFM.xml (rev 0) +++ trunk/plugins/My Streamradio/Release/Radio/bigFM.xml 2007-07-27 13:28:59 UTC (rev 774) @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="utf-8"?> +<profile> + <section name="station"> + <entry name="name">bigFM</entry> + <entry name="title">bigFM</entry> + <entry name="description">die haerteste Musik-Jury der Welt</entry> + <entry name="homepage">http://bigmusic.big-fm.info/content/html/home/index.html</entry> + <entry name="position">3</entry> + <entry name="logo"></entry> + <entry name="bouquet">German</entry> + <entry name="category">Mixed</entry> + <entry name="language">German</entry> + <entry name="country">de</entry> + <entry name="quality">Good</entry> + </section> + + <section name="stream"> + <entry name="url">http://lsd.newmedia.tiscali-business.com/bb/redirect.lsc?adid=0&stream=rtl1046$rtllive.wma&content=live&media=ms"</entry> + </section> + + <section name="html"> + <entry name="method">1</entry> + <entry name="url">http://bigmusic.big-fm.info/content/html/home/index.html</entry> + <entry name="search">marquee scrollamount</entry> + <entry name="offset">1</entry> + <entry name="start"> </entry> + <entry name="start2"></entry> + <entry name="stop">-</entry> + <entry name="devider">: </entry> + <entry name="image"></entry> + <entry name="title"></entry> + <entry name="interpret"></entry> + <entry name="swap">no</entry> + + </section> + + +</profile> + Added: trunk/plugins/My Streamradio/Release/Radio/delta radio.xml =================================================================== --- trunk/plugins/My Streamradio/Release/Radio/delta radio.xml (rev 0) +++ trunk/plugins/My Streamradio/Release/Radio/delta radio.xml 2007-07-27 13:28:59 UTC (rev 774) @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="utf-8"?> +<profile> + <section name="station"> + <entry name="name">delta Radio</entry> + <entry name="title">delta Radio</entry> + <entry name="description">klingt anders!</entry> + <entry name="homepage">http://www.deltaradio.de</entry> + <entry name="position">2</entry> + <entry name="logo"></entry> + <entry name="bouquet">German</entry> + <entry name="category">Mixed</entry> + <entry name="language">German</entry> + <entry name="country">de</entry> + <entry name="quality">Good</entry> + </section> + + <section name="stream"> + <entry name="url">http://lsd.newmedia.tiscali-business.com/bb/redirect.lsc?adid=0&stream=deltaradio/livestream.wma&content=live&media=ms"</entry> + </section> + + <section name="html"> + <entry name="method">3</entry> + <entry name="url">http://www.deltaradio.de/delta/components/flash/songfeed.php</entry> + <entry name="search"></entry> + <entry name="offset"></entry> + <entry name="start"></entry> + <entry name="stop">#</entry> + <entry name="devider"></entry> + <entry name="image">#image_var=</entry> + <entry name="title">#titel=</entry> + <entry name="interpret">#interpret=</entry> + <entry name="swap">no</entry> + + </section> + +</profile> + Modified: trunk/plugins/My Streamradio/Release/Skin/mystreamradio.xml =================================================================== --- trunk/plugins/My Streamradio/Release/Skin/mystreamradio.xml 2007-07-27 09:53:16 UTC (rev 773) +++ trunk/plugins/My Streamradio/Release/Skin/mystreamradio.xml 2007-07-27 13:28:59 UTC (rev 774) @@ -39,6 +39,102 @@ <ondown>3</ondown> </control> </control> + + <control> + <type>label</type> + <description>Station</description> + <id>21</id> + <posX>70</posX> + <posY>160</posY> + <animation>WindowClose</animation> + <label>Station:</label> + <font>font16</font> + <textcolor>ffffffff</textcolor> + </control> + <control> + <type>label</type> + <description>Stationlabel</description> + <id>22</id> + <posX>70</posX> + <posY>185</posY> + <animation>WindowClose</animation> + <label>#Station</label> + <font>font12</font> + <textcolor>ffffffff</textcolor> + </control> + <control> + <type>label</type> + <description>Descriptionlabel</description> + <id>23</id> + <posX>70</posX> + <posY>205</posY> + <animation>WindowClose</animation> + <label>#Description</label> + <font>font12</font> + <textcolor>ffffffff</textcolor> + </control> + <control> + <type>label</type> + <description>Playlabel</description> + <id>24</id> + <posX>70</posX> + <posY>220</posY> + <animation>WindowClose</animation> + <label>Now playing:</label> + <font>font16</font> + <textcolor>ffffffff</textcolor> + </control> + <control> + <type>label</type> + <description>Artistlabel</description> + <id>25</id> + <posX>70</posX> + <posY>245</posY> + <animation>WindowClose</animation> + <label>#Artist</label> + <font>font12</font> + <textcolor>ffffffff</textcolor> + </control> + <control> + <type>label</type> + <description>Titlelabel</description> + <id>26</id> + <posX>70</posX> + <posY>265</posY> + <animation>WindowClose</animation> + <label>#Title</label> + <font>font12</font> + <textcolor>ffffffff</textcolor> + </control> + <control> + <type>image</type> + <id>27</id> + <posX>70</posX> + <posY>290</posY> + <height>100</height> + <width>100</width> + <texture>#picture</texture> + <keepaspectratio>yes</keepaspectratio> + </control> + <control> + <type>image</type> + <id>28</id> + <posX>10</posX> + <posY>160</posY> + <height>50</height> + <width>50</width> + <texture>#picture</texture> + <keepaspectratio>yes</keepaspectratio> + <texture>#logo</texture> + </control> + <control> + <type>image</type> + <id>29</id> + <posX>10</posX> + <posY>250</posY> + <texture>#country</texture> + </control> + <control> <type>group</type> <description>group element</description> Added: trunk/plugins/My Streamradio/Release/Thumbs/Radio/1046 RTL Hit-Radio.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/My Streamradio/Release/Thumbs/Radio/1046 RTL Hit-Radio.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/My Streamradio/Release/Thumbs/Radio/1067 Rockklassiker.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/My Streamradio/Release/Thumbs/Radio/1067 Rockklassiker.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/My Streamradio/Release/Thumbs/Radio/95Crave.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/My Streamradio/Release/Thumbs/Radio/95Crave.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/My Streamradio/Release/Thumbs/Radio/Antenne Thueringen.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/My Streamradio/Release/Thumbs/Radio/Antenne Thueringen.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/My Streamradio/Release/Thumbs/Radio/Radio SAW.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/My Streamradio/Release/Thumbs/Radio/Radio SAW.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/My Streamradio/Release/Thumbs/Radio/swr3.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/My Streamradio/Release/Thumbs/Radio/swr3.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/plugins/My Streamradio/Source/MyStreamRadio/GUIRadio.cs =================================================================== --- trunk/plugins/My Streamradio/Source/MyStreamRadio/GUIRadio.cs 2007-07-27 09:53:16 UTC (rev 773) +++ trunk/plugins/My Streamradio/Source/MyStreamRadio/GUIRadio.cs 2007-07-27 13:28:59 UTC (rev 774) @@ -30,6 +30,9 @@ using System.Net; using System.IO; using System.Globalization; +using System.Xml; +using System.Threading; +using System.Diagnostics; using MediaPortal.Player; using MediaPortal.GUI.Library; @@ -40,992 +43,1568 @@ //using MediaPortal.Music.Database; using MediaPortal.Playlists; + namespace MediaPortal.GUI.MyStreamRadio { [PluginIcons("MyStreamRadio.StreamRadio.png", "MyStreamRadio.StreamRadioDisabled.png")] - public class MyStreamRadioGUI : GUIWindow, IComparer<GUIListItem>, ISetupForm - { - [SkinControlAttribute(2)] protected GUIButtonControl btnViewAs = null; - [SkinControlAttribute(3)] protected GUISortButtonControl btnSortBy = null; - [SkinControlAttribute(6)] protected GUIButtonControl btnPrevious = null; - [SkinControlAttribute(7)] protected GUIButtonControl btnNext = null; - [SkinControlAttribute(50)] protected GUIListControl listView = null; - [SkinControlAttribute(51)] protected GUIThumbnailPanel thumbnailView = null; + public class MyStreamRadioGUI : GUIWindow, IComparer<GUIListItem>, ISetupForm + { + #region SkinAttributes + [SkinControlAttribute(2)] + protected GUIButtonControl btnViewAs = null; + [SkinControlAttribute(3)] + protected GUISortButtonControl btnSortBy = null; + [SkinControlAttribute(6)] + protected GUIButtonControl btnPrevious = null; + [SkinControlAttribute(7)] + protected GUIButtonControl btnNext = null; + [SkinControlAttribute(50)] + protected GUIListControl listView = null; + [SkinControlAttribute(51)] + protected GUIThumbnailPanel thumbnailView = null; + #endregion - enum SortMethod - { - Name = 0, - Type = 1, - Genre = 2, - Bitrate = 3, - Number - } + enum SortMethod + { + Name = 0, + Type = 1, + Genre = 2, + Bitrate = 3, + Number + } - enum View : int - { - List = 0, - Icons = 1, - BigIcons = 2, - } + enum View : int + { + List = 0, + Icons = 1, + BigIcons = 2, + } - #region Base variabeles - View currentView = View.List; - SortMethod currentSortMethod = SortMethod.Number; - bool sortAscending = true; - VirtualDirectory virtualDirectory = new VirtualDirectory(); - DirectoryHistory directoryHistory = new DirectoryHistory(); - string currentFolder = String.Empty; - string startFolder = String.Empty; - string currentRadioFolder = String.Empty; - int selectedItemIndex = -1; - PlayList currentPlayList = null; - PlayListPlayer playlistPlayer; - - #endregion + #region Base variabeles + View currentView = View.List; + SortMethod currentSortMethod = SortMethod.Number; + bool sortAscending = true; + VirtualDirectory virtualDirectory = new VirtualDirectory(); + DirectoryHistory directoryHistory = new DirectoryHistory(); + string currentFolder = String.Empty; + string startFolder = String.Empty; + string currentRadioFolder = String.Empty; + int selectedItemIndex = -1; + PlayList currentPlayList = null; + PlayListPlayer playlistPlayer; - public override int GetID - { - get - { - return 15634330; - } - set - { - base.GetID = value; - } - } + // vars for the title display - public override bool Init() - { - currentFolder = String.Empty; - bool bResult = Load(GUIGraphicsContext.Skin + @"\MyStreamRadio.xml"); + string dsp_station = ""; + string dsp_comment = ""; + string dsp_homepage = ""; + string dsp_country = ""; - return bResult; - } + string dsp_url = ""; + string dsp_method = ""; - #region Serialisation - void LoadSettings() - { - using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) - { - currentRadioFolder = xmlreader.GetValueAsString("radio", "folder", String.Empty); + string dsp_title = ""; + string dsp_interpret = ""; + string dsp_img = ""; - string tmpLine = String.Empty; - tmpLine = (string)xmlreader.GetValue("mystreamradio", "viewby"); - if (tmpLine != null) - { - if (tmpLine == "list") currentView = View.List; - else if (tmpLine == "icons") currentView = View.Icons; - else if (tmpLine == "largeicons") currentView = View.BigIcons; - } + string dsp_search = ""; + string dsp_offset = ""; + string dsp_start = ""; + string dsp_start2 = ""; + string dsp_stop = ""; + string dsp_devider = ""; + string dsp_swap = ""; - //tmpLine = (string)xmlreader.GetValue("myradio", "sort"); - //always sort by name - tmpLine = "name"; - if (tmpLine != null) - { - if (tmpLine == "name") currentSortMethod = SortMethod.Name; - else if (tmpLine == "type") currentSortMethod = SortMethod.Type; - else if (tmpLine == "genre") currentSortMethod = SortMethod.Genre; - else if (tmpLine == "bitrate") currentSortMethod = SortMethod.Bitrate; - else if (tmpLine == "number") currentSortMethod = SortMethod.Number; - } + // update ticker for the display + //private System.Windows.Forms.Timer _Update = new System.Windows.Forms.Timer(); - sortAscending = xmlreader.GetValueAsBool("mystreamradio", "sortascending", true); + private System.Threading.Thread myThread; - } - } - void SaveSettings() - { - using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) - { - switch (currentView) + #endregion + + public override int GetID { - case View.List: - xmlwriter.SetValue("mystreamradio", "viewby", "list"); - break; - case View.Icons: - xmlwriter.SetValue("mystreamradio", "viewby", "icons"); - break; - case View.BigIcons: - xmlwriter.SetValue("mystreamradio", "viewby", "largeicons"); - break; + get + { + return 15634330; + } + set + { + base.GetID = value; + } } - switch (currentSortMethod) + public override bool Init() { - case SortMethod.Name: - xmlwriter.SetValue("mystreamradio", "sort", "name"); - break; - case SortMethod.Type: - xmlwriter.SetValue("mystreamradio", "sort", "type"); - break; - case SortMethod.Genre: - xmlwriter.SetValue("mystreamradio", "sort", "genre"); - break; - case SortMethod.Bitrate: - xmlwriter.SetValue("mystreamradio", "sort", "bitrate"); - break; - case SortMethod.Number: - xmlwriter.SetValue("mystreamradio", "sort", "number"); - break; + currentFolder = String.Empty; + bool bResult = Load(GUIGraphicsContext.Skin + @"\MyStreamRadio.xml"); + + return bResult; } - xmlwriter.SetValueAsBool("mystreamradio", "sortascending", sortAscending); - } - } - #endregion + #region Serialisation + void LoadSettings() + { + using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) + { + currentRadioFolder = xmlreader.GetValueAsString("radio", "folder", String.Empty); - #region BaseWindow Members - public override void OnAction(Action action) - { - if (action.wID == Action.ActionType.ACTION_PREVIOUS_MENU) - { - if (listView.Focus || thumbnailView.Focus) + string tmpLine = String.Empty; + tmpLine = (string)xmlreader.GetValue("mystreamradio", "viewby"); + if (tmpLine != null) + { + if (tmpLine == "list") currentView = View.List; + else if (tmpLine == "icons") currentView = View.Icons; + else if (tmpLine == "largeicons") currentView = View.BigIcons; + } + + //tmpLine = (string)xmlreader.GetValue("myradio", "sort"); + //always sort by name + tmpLine = "name"; + if (tmpLine != null) + { + if (tmpLine == "name") currentSortMethod = SortMethod.Name; + else if (tmpLine == "type") currentSortMethod = SortMethod.Type; + else if (tmpLine == "genre") currentSortMethod = SortMethod.Genre; + else if (tmpLine == "bitrate") currentSortMethod = SortMethod.Bitrate; + else if (tmpLine == "number") currentSortMethod = SortMethod.Number; + } + + sortAscending = xmlreader.GetValueAsBool("mystreamradio", "sortascending", true); + + } + } + void SaveSettings() { - GUIListItem item = GetItem(0); - if (item != null) - { - if (item.IsFolder && item.Label == "..") + using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) { - LoadDirectory(item.Path); - return; + switch (currentView) + { + case View.List: + xmlwriter.SetValue("mystreamradio", "viewby", "list"); + break; + case View.Icons: + xmlwrite... [truncated message content] |