From: <che...@us...> - 2007-08-06 17:52:41
|
Revision: 799 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=799&view=rev Author: chef_koch Date: 2007-08-06 10:52:37 -0700 (Mon, 06 Aug 2007) Log Message: ----------- i forgot to upload a few files, sorry Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsRoot.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsRoot.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsRoot.resx trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.cs Added Paths: ----------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsBase.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsBase.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsBase.resx Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs 2007-08-06 17:51:45 UTC (rev 798) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs 2007-08-06 17:52:37 UTC (rev 799) @@ -103,6 +103,12 @@ } + public virtual void LoadFromAppItem(ApplicationItem tempApp) + { + //Log.Debug("{0}: LoadFromAppItem()", this.ToString()); + } + + private void InitDefault() { //{ Added: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsBase.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsBase.Designer.cs (rev 0) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsBase.Designer.cs 2007-08-06 17:52:37 UTC (rev 799) @@ -0,0 +1,46 @@ +namespace GUIPrograms.Design +{ + partial class SettingsBase + { + /// <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.SuspendLayout(); + // + // SettingsBase + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Name = "SettingsBase"; + this.Size = new System.Drawing.Size(497, 550); + this.ResumeLayout(false); + + } + + #endregion + + } +} \ No newline at end of file Added: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsBase.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsBase.cs (rev 0) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsBase.cs 2007-08-06 17:52:37 UTC (rev 799) @@ -0,0 +1,71 @@ +#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.Diagnostics; +using System.Drawing; +using System.IO; +using System.Text; +using System.Windows.Forms; +using Core.Util; + +using GUIPrograms; +using GUIPrograms.Items; +using GUIPrograms.Database; +using MediaPortal.GUI.Library; + +namespace GUIPrograms.Design +{ + public partial class SettingsBase : UserControl + { + protected ConditionChecker conditionChecker = new ConditionChecker(); + + + public SettingsBase() + { + InitializeComponent(); + } + + + public virtual void LoadSettings(ApplicationItem curApp) + { + //Log.Debug("{0}: LoadSettings()", this.ToString()); + } + + public virtual void SaveSettings(ApplicationItem curApp) + { + //Log.Debug("{0}: SaveSettings()", this.ToString()); + } + + public virtual bool EntriesOK(ApplicationItem curApp) + { + //Log.Debug("{0}: EntriesOK()", this.ToString()); + return true; + } + } +} \ No newline at end of file Added: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsBase.resx =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsBase.resx (rev 0) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsBase.resx 2007-08-06 17:52:37 UTC (rev 799) @@ -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/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsRoot.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsRoot.Designer.cs 2007-08-06 17:51:45 UTC (rev 798) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsRoot.Designer.cs 2007-08-06 17:52:37 UTC (rev 799) @@ -1,6 +1,6 @@ namespace GUIPrograms.Design { - partial class AppSettingsRoot + partial class SettingsRoot { /// <summary> /// Required designer variable. @@ -28,112 +28,176 @@ /// </summary> private void InitializeComponent() { - this.button1 = new System.Windows.Forms.Button(); + this.titleTextBox = new System.Windows.Forms.TextBox(); + this.titleLabel = new System.Windows.Forms.Label(); + this.checkBoxUseThumbsDir = new System.Windows.Forms.CheckBox(); + this.titleGroupBox = new System.Windows.Forms.GroupBox(); + this.titleResetButton = new System.Windows.Forms.Button(); + this.groupBoxThumbs = new System.Windows.Forms.GroupBox(); + this.sleepTimeGroupBox = new System.Windows.Forms.GroupBox(); + this.sleepTimeLabel = new System.Windows.Forms.Label(); + this.sleepTimeResetButton = new System.Windows.Forms.Button(); + this.sleepTimeNumericUpDown = new System.Windows.Forms.NumericUpDown(); + this.titleGroupBox.SuspendLayout(); + this.groupBoxThumbs.SuspendLayout(); + this.sleepTimeGroupBox.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.sleepTimeNumericUpDown)).BeginInit(); this.SuspendLayout(); // - // enabledCheckbox + // titleTextBox // - this.toolTip.SetToolTip(this.enabledCheckbox, "Only enabled items will appear in MediaPortal"); + this.titleTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.titleTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.titleTextBox.Location = new System.Drawing.Point(88, 23); + this.titleTextBox.Name = "titleTextBox"; + this.titleTextBox.Size = new System.Drawing.Size(316, 21); + this.titleTextBox.TabIndex = 46; // // titleLabel // - this.titleLabel.Size = new System.Drawing.Size(92, 20); + this.titleLabel.AutoSize = true; + this.titleLabel.Location = new System.Drawing.Point(6, 28); + this.titleLabel.Name = "titleLabel"; + this.titleLabel.Size = new System.Drawing.Size(31, 13); + this.titleLabel.TabIndex = 45; + this.titleLabel.Text = "Title:"; + this.titleLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // - // titleTextBox + // checkBoxUseThumbsDir // - this.toolTip.SetToolTip(this.titleTextBox, "This text will appear in the listitem of MediaPortal\r\n(mandatory)"); + this.checkBoxUseThumbsDir.AutoSize = true; + this.checkBoxUseThumbsDir.Location = new System.Drawing.Point(9, 20); + this.checkBoxUseThumbsDir.Name = "checkBoxUseThumbsDir"; + this.checkBoxUseThumbsDir.Size = new System.Drawing.Size(129, 17); + this.checkBoxUseThumbsDir.TabIndex = 44; + this.checkBoxUseThumbsDir.Text = "usw thumbs directory"; + this.checkBoxUseThumbsDir.UseVisualStyleBackColor = true; // - // applicationExeButton + // titleGroupBox // - this.applicationExeButton.Location = new System.Drawing.Point(359, 70); + this.titleGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.titleGroupBox.Controls.Add(this.titleResetButton); + this.titleGroupBox.Controls.Add(this.titleTextBox); + this.titleGroupBox.Controls.Add(this.titleLabel); + this.titleGroupBox.Location = new System.Drawing.Point(3, 3); + this.titleGroupBox.Name = "titleGroupBox"; + this.titleGroupBox.Size = new System.Drawing.Size(491, 62); + this.titleGroupBox.TabIndex = 47; + this.titleGroupBox.TabStop = false; + this.titleGroupBox.Text = "Plugin Title"; // - // shellexecuteCheckBox + // titleResetButton // - 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."); + this.titleResetButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.titleResetButton.Location = new System.Drawing.Point(410, 23); + this.titleResetButton.Name = "titleResetButton"; + this.titleResetButton.Size = new System.Drawing.Size(75, 23); + this.titleResetButton.TabIndex = 47; + this.titleResetButton.Text = "Reset"; + this.titleResetButton.UseVisualStyleBackColor = true; + this.titleResetButton.Click += new System.EventHandler(this.titleResetButton_Click); // - // applicationArgumentsLabel + // groupBoxThumbs // - 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)"); + this.groupBoxThumbs.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBoxThumbs.Controls.Add(this.checkBoxUseThumbsDir); + this.groupBoxThumbs.Location = new System.Drawing.Point(3, 131); + this.groupBoxThumbs.Name = "groupBoxThumbs"; + this.groupBoxThumbs.Size = new System.Drawing.Size(491, 61); + this.groupBoxThumbs.TabIndex = 48; + this.groupBoxThumbs.TabStop = false; + this.groupBoxThumbs.Text = "Thumb Settings"; // - // applicationImageTextBox + // sleepTimeGroupBox // - this.toolTip.SetToolTip(this.applicationImageTextBox, "Optional filename for an image to display in MediaPortal"); + this.sleepTimeGroupBox.Controls.Add(this.sleepTimeLabel); + this.sleepTimeGroupBox.Controls.Add(this.sleepTimeResetButton); + this.sleepTimeGroupBox.Controls.Add(this.sleepTimeNumericUpDown); + this.sleepTimeGroupBox.Location = new System.Drawing.Point(3, 71); + this.sleepTimeGroupBox.Name = "sleepTimeGroupBox"; + this.sleepTimeGroupBox.Size = new System.Drawing.Size(491, 54); + this.sleepTimeGroupBox.TabIndex = 49; + this.sleepTimeGroupBox.TabStop = false; + this.sleepTimeGroupBox.Text = "Sleep time until switch to next Thumb"; // - // winStyleComboBox + // sleepTimeLabel // - this.toolTip.SetToolTip(this.winStyleComboBox, "Appearance of the launched program. \r\nTry HIDDEN or MINIMIZED for a seamless inte" + - "gration in MediaPortal"); + this.sleepTimeLabel.AutoSize = true; + this.sleepTimeLabel.Location = new System.Drawing.Point(6, 25); + this.sleepTimeLabel.Name = "sleepTimeLabel"; + this.sleepTimeLabel.Size = new System.Drawing.Size(68, 13); + this.sleepTimeLabel.TabIndex = 2; + this.sleepTimeLabel.Text = "Time (in ms):"; // - // startupDirTextBox + // sleepTimeResetButton // - 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)"); + this.sleepTimeResetButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.sleepTimeResetButton.Location = new System.Drawing.Point(410, 20); + this.sleepTimeResetButton.Name = "sleepTimeResetButton"; + this.sleepTimeResetButton.Size = new System.Drawing.Size(75, 23); + this.sleepTimeResetButton.TabIndex = 1; + this.sleepTimeResetButton.Text = "Reset"; + this.sleepTimeResetButton.UseVisualStyleBackColor = true; + this.sleepTimeResetButton.Click += new System.EventHandler(this.sleepTimeResetButton_Click); // - // quoteCheckBox + // sleepTimeNumericUpDown // - this.toolTip.SetToolTip(this.quoteCheckBox, "Quotes are usually needed to handle filenames with spaces correctly. \r\nAvoid doub" + - "le quotes though!"); + this.sleepTimeNumericUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.sleepTimeNumericUpDown.Location = new System.Drawing.Point(88, 20); + this.sleepTimeNumericUpDown.Maximum = new decimal(new int[] { + 30000, + 0, + 0, + 0}); + this.sleepTimeNumericUpDown.Minimum = new decimal(new int[] { + 300, + 0, + 0, + 0}); + this.sleepTimeNumericUpDown.Name = "sleepTimeNumericUpDown"; + this.sleepTimeNumericUpDown.Size = new System.Drawing.Size(316, 21); + this.sleepTimeNumericUpDown.TabIndex = 0; + this.sleepTimeNumericUpDown.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.sleepTimeNumericUpDown.Value = new decimal(new int[] { + 3000, + 0, + 0, + 0}); // - // applicationImageButton + // SettingsRoot // - 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.Controls.Add(this.sleepTimeGroupBox); + this.Controls.Add(this.groupBoxThumbs); + this.Controls.Add(this.titleGroupBox); + this.Name = "SettingsRoot"; + this.titleGroupBox.ResumeLayout(false); + this.titleGroupBox.PerformLayout(); + this.groupBoxThumbs.ResumeLayout(false); + this.groupBoxThumbs.PerformLayout(); + this.sleepTimeGroupBox.ResumeLayout(false); + this.sleepTimeGroupBox.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.sleepTimeNumericUpDown)).EndInit(); this.ResumeLayout(false); - this.PerformLayout(); } #endregion - private System.Windows.Forms.Button button1; + private System.Windows.Forms.CheckBox checkBoxUseThumbsDir; + private System.Windows.Forms.GroupBox titleGroupBox; + private System.Windows.Forms.GroupBox groupBoxThumbs; + private System.Windows.Forms.TextBox titleTextBox; + private System.Windows.Forms.Label titleLabel; + private System.Windows.Forms.GroupBox sleepTimeGroupBox; + private System.Windows.Forms.Label sleepTimeLabel; + private System.Windows.Forms.Button sleepTimeResetButton; + private System.Windows.Forms.NumericUpDown sleepTimeNumericUpDown; + private System.Windows.Forms.Button titleResetButton; } } \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsRoot.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsRoot.cs 2007-08-06 17:51:45 UTC (rev 798) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsRoot.cs 2007-08-06 17:52:37 UTC (rev 799) @@ -37,85 +37,66 @@ namespace GUIPrograms.Design { - public partial class AppSettingsRoot : AppSettingsBase + public partial class SettingsRoot : SettingsBase { - bool Loaded = false; + bool loaded = false; - public AppSettingsRoot() + + public SettingsRoot() { InitializeComponent(); } - private void AppSettingsRoot_Load(object sender, EventArgs e) + + public override void LoadSettings(ApplicationItem curApp) { - AppItemToForm(null); - Loaded = true; + base.LoadSettings(curApp); - enabledCheckbox.Visible = false; - winTypeLabel.Text = "my Programs Alt."; - titleLabel.Text = "Plugin title"; - titleTextBox.Text = " My Programs Alt."; + // plugin title + titleTextBox.Text = DatabaseHandler.ReadSetting(ProgramUtils.cPLUGINTITLE); + if (titleTextBox.Text == "") + { + // PluginTitle.Text = GUILocalizeStrings.Get(0); + titleTextBox.Text = ProgramUtils.cDefaultPluginTitle; + } - applicationExeLabel.Visible = false; - applicationExeTextBox.Visible = false; - applicationExeButton.Visible = false; + // sleep time + sleepTimeNumericUpDown.Value = ProgramUtils.GetSleepTime(); - applicationImageLabel.Visible = false; - applicationImageTextBox.Visible = false; - applicationImageButton.Visible = false; + // use mp thumbs dir + checkBoxUseThumbsDir.Checked = ProgramUtils.UseThumbsDir(); - applicationArgumentsTextBox.Visible = false; - applicationArgumentsLabel.Visible = false; + loaded = true; + } - winStyleLabel.Visible = false; - winStyleComboBox.Visible = false; + public override void SaveSettings(ApplicationItem curApp) + { + if (!loaded) return; - startupDirButton.Visible = false; - startupDirLabel.Visible = false; - startupDirComboBox.Visible = false; + base.SaveSettings(curApp); + // plugin title + if (titleTextBox.Text == ProgramUtils.cDefaultPluginTitle || titleTextBox.Text == "") + DatabaseHandler.DeleteSetting(ProgramUtils.cPLUGINTITLE); + else + DatabaseHandler.WriteSetting(ProgramUtils.cPLUGINTITLE, titleTextBox.Text); - quoteCheckBox.Visible = false; - allowRefreshCheckBox.Visible = false; - waitExitCheckBox.Visible = false; - shellexecuteCheckBox.Visible = false; - informationLabel.Visible = false; + // sleep time + DatabaseHandler.WriteSetting(ProgramUtils.cSLIDESPEED, sleepTimeNumericUpDown.Value.ToString()); - this.prePostButton.Visible = false; - + // use mp thumbs dir + DatabaseHandler.WriteSetting(ProgramUtils.cUSE_MP_THUMBS_DIR, checkBoxUseThumbsDir.Checked.ToString()); } - 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) + private void titleResetButton_Click(object sender, EventArgs e) { - // currentApplication is null! - if (Loaded) - { - if ((titleTextBox.Text != "")) - { - DatabaseHandler.WriteSetting(ProgramUtils.cPLUGINTITLE, titleTextBox.Text); - } - else - { - DatabaseHandler.DeleteSetting(ProgramUtils.cPLUGINTITLE); - } - } + titleTextBox.Text = ProgramUtils.cDefaultPluginTitle; } - private void button1_Click(object sender, EventArgs e) + private void sleepTimeResetButton_Click(object sender, EventArgs e) { - titleTextBox.Text = "My Programs Alt."; + sleepTimeNumericUpDown.Value = ProgramUtils.cDefaultSleepTime; } } } \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsRoot.resx =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsRoot.resx 2007-08-06 17:51:45 UTC (rev 798) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsRoot.resx 2007-08-06 17:52:37 UTC (rev 799) @@ -117,13 +117,4 @@ <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.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.cs 2007-08-06 17:51:45 UTC (rev 798) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.cs 2007-08-06 17:52:37 UTC (rev 799) @@ -625,12 +625,13 @@ pageCurrentSettings = GetCurrentSettingsPage(); - if (pageCurrentSettings != null) + if (pageCurrentSettings is AppSettingsBase) { + AppSettingsBase appSettingsPage = pageCurrentSettings as AppSettingsBase; // create a pseudo-appitem and read the values from the xml node ApplicationItem tempApp = new ApplicationItem(); tempApp.LoadFromXmlProfile(node); - pageCurrentSettings.LoadFromAppItem(tempApp); + appSettingsPage.LoadFromAppItem(tempApp); appSettingsFileEditView.FileExtensionsText = tempApp.ValidExtensions; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |