From: <ant...@us...> - 2012-03-16 12:28:37
|
Revision: 4467 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4467&view=rev Author: anthrax-leprosy Date: 2012-03-16 12:28:28 +0000 (Fri, 16 Mar 2012) Log Message: ----------- Added Paths: ----------- trunk/plugins/MySleepTimer/MySleepTimer/ trunk/plugins/MySleepTimer/MySleepTimer/Extension/ trunk/plugins/MySleepTimer/MySleepTimer/Extension/Forum/ trunk/plugins/MySleepTimer/MySleepTimer/Extension/Forum/MySleepTimer_01.png trunk/plugins/MySleepTimer/MySleepTimer/Extension/Forum/MySleepTimer_02.png trunk/plugins/MySleepTimer/MySleepTimer/Extension/Forum/MySleepTimer_03.png trunk/plugins/MySleepTimer/MySleepTimer/Extension/Forum/MySleepTimer_04.png trunk/plugins/MySleepTimer/MySleepTimer/Extension/Forum/MySleepTimer_logo.png trunk/plugins/MySleepTimer/MySleepTimer/Extension/Installer/ trunk/plugins/MySleepTimer/MySleepTimer/Extension/Installer/MySleepTimer.mpe1 trunk/plugins/MySleepTimer/MySleepTimer/Extension/Installer/MySleepTimer.xmp2 trunk/plugins/MySleepTimer/MySleepTimer/Extension/Installer/update.xml trunk/plugins/MySleepTimer/MySleepTimer/Plugin/ trunk/plugins/MySleepTimer/MySleepTimer/Plugin/Configuration/ trunk/plugins/MySleepTimer/MySleepTimer/Plugin/Configuration/MySleepTimerConfig.Designer.cs trunk/plugins/MySleepTimer/MySleepTimer/Plugin/Configuration/MySleepTimerConfig.cs trunk/plugins/MySleepTimer/MySleepTimer/Plugin/Configuration/MySleepTimerConfig.resx trunk/plugins/MySleepTimer/MySleepTimer/Plugin/Configuration/Settings.cs trunk/plugins/MySleepTimer/MySleepTimer/Plugin/Window/ trunk/plugins/MySleepTimer/MySleepTimer/Plugin/Window/MySleepTimer.cs trunk/plugins/MySleepTimer/MySleepTimer/Plugin/Window/MySleepTimerOld.cs trunk/plugins/MySleepTimer/MySleepTimer/Plugin/Window/Translation.cs trunk/plugins/MySleepTimer/MySleepTimer/Resources/ trunk/plugins/MySleepTimer/MySleepTimer/Resources/dll/ trunk/plugins/MySleepTimer/MySleepTimer/Resources/dll/Common.Utils.dll trunk/plugins/MySleepTimer/MySleepTimer/Resources/dll/Common.Utils.pdb trunk/plugins/MySleepTimer/MySleepTimer/Resources/dll/Core.dll trunk/plugins/MySleepTimer/MySleepTimer/Resources/dll/Core.pdb trunk/plugins/MySleepTimer/MySleepTimer/Resources/dll/Dialogs.dll trunk/plugins/MySleepTimer/MySleepTimer/Resources/dll/Dialogs.pdb trunk/plugins/MySleepTimer/MySleepTimer/Resources/dll/Stateless.XML trunk/plugins/MySleepTimer/MySleepTimer/Resources/dll/Stateless.dll trunk/plugins/MySleepTimer/MySleepTimer/Resources/dll/Stateless.pdb trunk/plugins/MySleepTimer/MySleepTimer/Resources/dll/Utils.dll trunk/plugins/MySleepTimer/MySleepTimer/Resources/dll/Utils.pdb trunk/plugins/MySleepTimer/MySleepTimer/Resources/dll/WindowPlugins.dll trunk/plugins/MySleepTimer/MySleepTimer/Resources/dll/WindowPlugins.pdb trunk/plugins/MySleepTimer/MySleepTimer/Resources/img/ trunk/plugins/MySleepTimer/MySleepTimer/Resources/img/MySleepTimer_disabled.png trunk/plugins/MySleepTimer/MySleepTimer/Resources/img/MySleepTimer_enabled.png trunk/plugins/MySleepTimer/MySleepTimer/Skin/ trunk/plugins/MySleepTimer/MySleepTimer/Skin/Media/ trunk/plugins/MySleepTimer/MySleepTimer/Skin/Media/MySleepTimer_enabled.png Removed Paths: ------------- trunk/plugins/MySleepTimer/Build/ trunk/plugins/MySleepTimer/MpeRelease/ trunk/plugins/MySleepTimer/MySleepTimer/ trunk/plugins/MySleepTimer/MySleepTimer.5.1.resharper trunk/plugins/MySleepTimer/MySleepTimer.sln trunk/plugins/MySleepTimer/releases/ trunk/plugins/MySleepTimer/screenshots/ Added: trunk/plugins/MySleepTimer/MySleepTimer/Extension/Forum/MySleepTimer_01.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySleepTimer/MySleepTimer/Extension/Forum/MySleepTimer_01.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/MySleepTimer/MySleepTimer/Extension/Forum/MySleepTimer_02.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySleepTimer/MySleepTimer/Extension/Forum/MySleepTimer_02.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/MySleepTimer/MySleepTimer/Extension/Forum/MySleepTimer_03.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySleepTimer/MySleepTimer/Extension/Forum/MySleepTimer_03.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/MySleepTimer/MySleepTimer/Extension/Forum/MySleepTimer_04.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySleepTimer/MySleepTimer/Extension/Forum/MySleepTimer_04.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/MySleepTimer/MySleepTimer/Extension/Forum/MySleepTimer_logo.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySleepTimer/MySleepTimer/Extension/Forum/MySleepTimer_logo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/MySleepTimer/MySleepTimer/Extension/Installer/MySleepTimer.mpe1 =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySleepTimer/MySleepTimer/Extension/Installer/MySleepTimer.mpe1 ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/MySleepTimer/MySleepTimer/Extension/Installer/MySleepTimer.xmp2 =================================================================== --- trunk/plugins/MySleepTimer/MySleepTimer/Extension/Installer/MySleepTimer.xmp2 (rev 0) +++ trunk/plugins/MySleepTimer/MySleepTimer/Extension/Installer/MySleepTimer.xmp2 2012-03-16 12:28:28 UTC (rev 4467) @@ -0,0 +1,283 @@ +<?xml version="1.0" encoding="utf-8"?> +<PackageClass xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + <Version>2.0</Version> + <Groups> + <Items> + <GroupItem Name="Default"> + <ParentGroup /> + <DisplayName>Default</DisplayName> + <DefaulChecked>true</DefaulChecked> + <Description>Default</Description> + <Files> + <Items> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="true"> + <Param1 /> + <UpdateOption>AlwaysOverwrite</UpdateOption> + <LocalFileName>..\..\bin\Release\MySleepTimer.dll</LocalFileName> + <ZipFileName>Installer{CopyFile}\{24ae0d76-6bf8-4999-b326-841d08571444}-MySleepTimer.dll</ZipFileName> + <DestinationFilename>%Plugins%\Windows\MySleepTimer.dll</DestinationFilename> + </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="true"> + <Param1 /> + <UpdateOption>AlwaysOverwrite</UpdateOption> + <LocalFileName>..\..\bin\Release\Stateless.dll</LocalFileName> + <ZipFileName>Installer{CopyFile}\{a35707b7-2f81-433d-ba56-0fceea5d18d1}-Stateless.dll</ZipFileName> + <DestinationFilename>%Plugins%\Windows\Stateless.dll</DestinationFilename> + </FileItem> + <FileItem InstallType="GenericSkinFile" SystemFile="false" Modified="true"> + <Param1 /> + <UpdateOption>AlwaysOverwrite</UpdateOption> + <LocalFileName>..\..\Skin\Media\MySleepTimer_enabled.png</LocalFileName> + <ZipFileName>Installer{CopyFile}\{3e7ffc52-c3ec-4232-9eb1-ad6ac0aa6cb4}-MySleepTimer_enabled.png</ZipFileName> + <DestinationFilename>%Skin%\[DEFAULT]\Media\MySleepTimer_enabled.png</DestinationFilename> + </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="true"> + <Param1 /> + <UpdateOption>AlwaysOverwrite</UpdateOption> + <LocalFileName>..\..\Language\de.xml</LocalFileName> + <ZipFileName>Installer{CopyFile}\{6edce84f-fd94-438d-9b25-249b74a9a592}-de.xml</ZipFileName> + <DestinationFilename>%Language%\MySleepTimer\de.xml</DestinationFilename> + </FileItem> + </Items> + </Files> + </GroupItem> + </Items> + </Groups> + <Sections> + <Items> + <SectionItem Guid="7d214f70-ef9e-45e2-b567-a9bcc3921f1f" Name="Welcome Screen" ConditionGroup=""> + <Params> + <Items> + <SectionParam Name="Header text"> + <Value>Welcome to the Extension Installer for [Name]</Value> + <ValueType>String</ValueType> + <Description /> + </SectionParam> + <SectionParam Name="Description"> + <Value>This will install [Name] version [Version] on your computer. +It is recommended that you close all other applications before continuing. +Click Next to continue or Cancel to exit Setup.</Value> + <ValueType>String</ValueType> + <Description /> + </SectionParam> + <SectionParam Name="Left part image"> + <Value>..\..\Skin\Media\MySleepTimer_enabled.png</Value> + <ValueType>File</ValueType> + <Description /> + </SectionParam> + <SectionParam Name="Header image"> + <Value /> + <ValueType>File</ValueType> + <Description>Image in upper right part</Description> + </SectionParam> + </Items> + </Params> + <Actions> + <Items /> + </Actions> + <IncludedGroups /> + <PanelName>Welcome Screen</PanelName> + <WizardButtonsEnum>NextCancel</WizardButtonsEnum> + </SectionItem> + <SectionItem Guid="9bcdd6ec-a0e1-4660-a4f1-da7eac9f64db" Name="Install Section" ConditionGroup=""> + <Params> + <Items> + <SectionParam Name="Header Title"> + <Value>This will install [Name] version [Version] on your computer. +It is recommended that you close all other applications before continuing. +Click Next to continue or Cancel to exit Setup.</Value> + <ValueType>String</ValueType> + <Description>Header title</Description> + </SectionParam> + <SectionParam Name="Header description"> + <Value /> + <ValueType>String</ValueType> + <Description>Description of section, shown in under section title</Description> + </SectionParam> + <SectionParam Name="Header image"> + <Value>..\..\Skin\Media\MySleepTimer_enabled.png</Value> + <ValueType>File</ValueType> + <Description>Image in upper right part</Description> + </SectionParam> + </Items> + </Params> + <Actions> + <Items> + <ActionItem Name="InstallFiles" ActionType="InstallFiles" ConditionGroup=""> + <Params> + <Items /> + </Params> + <ExecuteLocation>AfterPanelShow</ExecuteLocation> + </ActionItem> + </Items> + </Actions> + <IncludedGroups /> + <PanelName>Install Section</PanelName> + <WizardButtonsEnum>Next</WizardButtonsEnum> + </SectionItem> + <SectionItem Guid="6d1f688f-c543-4341-b133-9b81df81f8b5" Name="Setup Complete" ConditionGroup=""> + <Params> + <Items> + <SectionParam Name="Header text"> + <Value>The Extension Installer Wizard has successfully installed [Name].</Value> + <ValueType>String</ValueType> + <Description /> + </SectionParam> + <SectionParam Name="Left part image"> + <Value>..\..\Skin\Media\MySleepTimer_enabled.png</Value> + <ValueType>File</ValueType> + <Description /> + </SectionParam> + <SectionParam Name="Header image"> + <Value /> + <ValueType>File</ValueType> + <Description>Image in upper right part</Description> + </SectionParam> + </Items> + </Params> + <Actions> + <Items /> + </Actions> + <IncludedGroups /> + <PanelName>Setup Complete</PanelName> + <WizardButtonsEnum>Finish</WizardButtonsEnum> + </SectionItem> + </Items> + </Sections> + <Dependencies> + <Items> + <DependencyItem> + <Type>MediaPortal</Type> + <Id /> + <MinVersion> + <Major>1</Major> + <Minor>1</Minor> + <Build>6</Build> + <Revision>27644</Revision> + </MinVersion> + <MaxVersion> + <Major>1</Major> + <Minor>1</Minor> + <Build>6</Build> + <Revision>27644</Revision> + </MaxVersion> + <WarnOnly>false</WarnOnly> + <Message>requires MediaPortal version 1.1.6.27644 to 1.1.6.27644.</Message> + <Name>MediaPortal</Name> + </DependencyItem> + </Items> + </Dependencies> + <PluginDependencies> + <Items> + <PluginDependencyItem AssemblyName="MySleepTimer.dll"> + <CompatibleVersion> + <Items> + <CompatibleVersionItem> + <MinRequiredVersion>1.1.7.0</MinRequiredVersion> + <DesignedForVersion>1.1.7.0</DesignedForVersion> + </CompatibleVersionItem> + </Items> + </CompatibleVersion> + <SubSystemsUsed> + <Items /> + </SubSystemsUsed> + </PluginDependencyItem> + </Items> + </PluginDependencies> + <GeneralInfo> + <Name>MySleepTimer</Name> + <Id>05afd608-7fb0-4738-85b3-250bb8e521a6</Id> + <Author>Team MediaPortal, Anthrax (thx Chefkoch)</Author> + <HomePage>http://www.team-mediaportal.com/extensions/system/mysleeptimer</HomePage> + <ForumPage>http://forum.team-mediaportal.com/threads/mysleeptimer.47353/</ForumPage> + <UpdateUrl>http://mp-plugins.svn.sourceforge.net/viewvc/mp-plugins/trunk/plugins/MySleepTimer/MySleepTimer/Extension/Installer/update.xml</UpdateUrl> + <Version> + <Major>2</Major> + <Minor>0</Minor> + <Build>0</Build> + <Revision>0</Revision> + </Version> + <ExtensionDescription>If you want to set a sleeptime by simply pressing a remote button, this plugin is what you are searching for. + +It is possible to define the steps which are used to set the sleeptime and detects the remaining playback time if a media is played while you pressed the sleeptimer button. + +If you are using IRSS, there will be NO need to configure the remote button mapping within MP, since IRSS detects the sleeptimer plugin and always sends the yellow button if the plugin is found,</ExtensionDescription> + <VersionDescription>added support for MediaPortal 1.2.2.0 final</VersionDescription> + <DevelopmentStatus>Stable</DevelopmentStatus> + <OnlineLocation>http://mp-plugins.svn.sourceforge.net/viewvc/mp-plugins/trunk/plugins/MySleepTimer/MySleepTimer/Extension/Installer/MySleepTimer.mpe1</OnlineLocation> + <ReleaseDate>2012-03-16T00:54:51</ReleaseDate> + <Tags>standby, suspend, sleeptimer, sleep</Tags> + <Location>D:\Anthrax-Leprosy-Pi\Documents\Development\Projekte\MediaPortal\MySleepTimer\MySleepTimer\Extension\Installer\MySleepTimer.mpe1</Location> + <Params> + <Items> + <SectionParam Name="Icon"> + <Value>..\..\Skin\Media\MySleepTimer_enabled.png</Value> + <ValueType>File</ValueType> + <Description>The icon file of the package (jpg,png,bmp)</Description> + </SectionParam> + <SectionParam Name="Online Icon"> + <Value>http://mp-plugins.svn.sourceforge.net/viewvc/mp-plugins/trunk/plugins/MySleepTimer/MySleepTimer/img/MySleepTimer_enabled.png</Value> + <ValueType>String</ValueType> + <Description>The icon file of the package stored online (jpg,png,bmp)</Description> + </SectionParam> + <SectionParam Name="Configuration file"> + <Value>%Plugins%\process\MySleepTimer.dll</Value> + <ValueType>Template</ValueType> + <Description>The file used to configure the extension. + If have .exe extension the will be executed + If have .dll extension used like MP plugin configuration</Description> + </SectionParam> + <SectionParam Name="Online Screenshots"> + <Value /> + <ValueType>String</ValueType> + <Description>Online stored screenshot urls separated by ; </Description> + </SectionParam> + <SectionParam Name="Force to uninstall on update"> + <Value>yes</Value> + <ValueType>Bool</ValueType> + <Description>Show dialog and force to uninstall previous version when updating an extension. Should only be disabled if you are using an NSIS/MSI installer.</Description> + </SectionParam> + </Items> + </Params> + </GeneralInfo> + <UniqueFileList> + <Items> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="true"> + <Param1 /> + <UpdateOption>AlwaysOverwrite</UpdateOption> + <LocalFileName>..\..\bin\Release\MySleepTimer.dll</LocalFileName> + <ZipFileName>Installer{CopyFile}\{24ae0d76-6bf8-4999-b326-841d08571444}-MySleepTimer.dll</ZipFileName> + <DestinationFilename>%Plugins%\Windows\MySleepTimer.dll</DestinationFilename> + </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="true"> + <Param1 /> + <UpdateOption>AlwaysOverwrite</UpdateOption> + <LocalFileName>..\..\bin\Release\Stateless.dll</LocalFileName> + <ZipFileName>Installer{CopyFile}\{a35707b7-2f81-433d-ba56-0fceea5d18d1}-Stateless.dll</ZipFileName> + <DestinationFilename>%Plugins%\Windows\Stateless.dll</DestinationFilename> + </FileItem> + <FileItem InstallType="GenericSkinFile" SystemFile="true" Modified="true"> + <Param1 /> + <UpdateOption>AlwaysOverwrite</UpdateOption> + <LocalFileName>..\..\Skin\Media\MySleepTimer_enabled.png</LocalFileName> + <ZipFileName>Installer{CopyFile}\{3e7ffc52-c3ec-4232-9eb1-ad6ac0aa6cb4}-MySleepTimer_enabled.png</ZipFileName> + <DestinationFilename>%Skin%\[DEFAULT]\Media\MySleepTimer_enabled.png</DestinationFilename> + </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="true"> + <Param1 /> + <UpdateOption>AlwaysOverwrite</UpdateOption> + <LocalFileName>..\..\Language\de.xml</LocalFileName> + <ZipFileName>Installer{CopyFile}\{6edce84f-fd94-438d-9b25-249b74a9a592}-de.xml</ZipFileName> + <DestinationFilename>%Language%\MySleepTimer\de.xml</DestinationFilename> + </FileItem> + </Items> + </UniqueFileList> + <ProjectSettings> + <FolderGroups /> + <ProjectFilename>MySleepTimer.xmp2</ProjectFilename> + <UpdatePath1>D:\Anthrax-Leprosy-Pi\Documents\Development\Projekte\MediaPortal\MySleepTimer\MySleepTimer\Extension\Installer\update.xml</UpdatePath1> + <UpdatePath2 /> + <UpdatePath3 /> + </ProjectSettings> + <IsSkin>false</IsSkin> +</PackageClass> \ No newline at end of file Added: trunk/plugins/MySleepTimer/MySleepTimer/Extension/Installer/update.xml =================================================================== --- trunk/plugins/MySleepTimer/MySleepTimer/Extension/Installer/update.xml (rev 0) +++ trunk/plugins/MySleepTimer/MySleepTimer/Extension/Installer/update.xml 2012-03-16 12:28:28 UTC (rev 4467) @@ -0,0 +1,237 @@ +<?xml version="1.0" encoding="utf-8"?> +<ExtensionCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + <Items> + <PackageClass> + <Version>2.0</Version> + <Groups> + <Items> + <GroupItem Name="Default"> + <DisplayName>Default</DisplayName> + <DefaulChecked>true</DefaulChecked> + <Description>Default</Description> + <Files> + <Items /> + </Files> + </GroupItem> + </Items> + </Groups> + <Sections> + <Items /> + </Sections> + <Dependencies> + <Items> + <DependencyItem> + <Type>MediaPortal</Type> + <Id /> + <MinVersion> + <Major>1</Major> + <Minor>1</Minor> + <Build>6</Build> + <Revision>27644</Revision> + </MinVersion> + <MaxVersion> + <Major>1</Major> + <Minor>1</Minor> + <Build>6</Build> + <Revision>27644</Revision> + </MaxVersion> + <WarnOnly>false</WarnOnly> + <Message>requires MediaPortal version 1.1.6.27644 to 1.1.6.27644.</Message> + <Name>MediaPortal</Name> + </DependencyItem> + </Items> + </Dependencies> + <PluginDependencies> + <Items> + <PluginDependencyItem AssemblyName="MySleepTimer.dll"> + <CompatibleVersion> + <Items> + <CompatibleVersionItem> + <MinRequiredVersion>1.1.7.0</MinRequiredVersion> + <DesignedForVersion>1.1.7.0</DesignedForVersion> + </CompatibleVersionItem> + </Items> + </CompatibleVersion> + <SubSystemsUsed> + <Items /> + </SubSystemsUsed> + </PluginDependencyItem> + </Items> + </PluginDependencies> + <GeneralInfo> + <Name>MySleepTimer</Name> + <Id>05afd608-7fb0-4738-85b3-250bb8e521a6</Id> + <Author>Team MediaPortal, Anthrax (thx Chefkoch)</Author> + <HomePage>http://forum.team-mediaportal.com/MySleepTimer-t47353.html</HomePage> + <ForumPage>http://forum.team-mediaportal.com/MySleepTimer-t47353.html</ForumPage> + <UpdateUrl>http://mp-plugins.svn.sourceforge.net/viewvc/mp-plugins/trunk/plugins/MySleepTimer/MpeRelease/update.xml</UpdateUrl> + <Version> + <Major>1</Major> + <Minor>0</Minor> + <Build>6</Build> + <Revision>0</Revision> + </Version> + <ExtensionDescription>If you want to set a sleeptime by simply pressing a remote button, this plugin is what you are searching for. + +It is possible to define the steps which are used to set the sleeptime and detects the remaining playback time if a media is played while you pressed the sleeptimer button. + +If you are using IRSS, there will be NO need to configure the remote button mapping within MP, since IRSS detects the sleeptimer plugin and always sends the yellow button if the plugin is found,</ExtensionDescription> + <VersionDescription>added support for MediaPortal 1.2.1.0 final</VersionDescription> + <DevelopmentStatus>Stable</DevelopmentStatus> + <OnlineLocation>http://mp-plugins.svn.sourceforge.net/viewvc/mp-plugins/trunk/plugins/MySleepTimer/MpeRelease/MySleepTimer.mpe1</OnlineLocation> + <ReleaseDate>2011-11-19T00:54:51</ReleaseDate> + <Tags>standby, suspend, sleeptimer, sleep</Tags> + <Location>D:\Anthrax-Leprosy-Pi\Documents\Development\Projekte\MediaPortal\MySleepTimer\MpeRelease\MySleepTimer.mpe1</Location> + <Params> + <Items> + <SectionParam Name="Online Icon"> + <Value>http://mp-plugins.svn.sourceforge.net/viewvc/mp-plugins/trunk/plugins/MySleepTimer/MySleepTimer/img/MySleepTimer_enabled.png</Value> + <ValueType>String</ValueType> + <Description>The icon file of the package stored online (jpg,png,bmp)</Description> + </SectionParam> + <SectionParam Name="Configuration file"> + <Value>%Plugins%\process\MySleepTimer.dll</Value> + <ValueType>Template</ValueType> + <Description>The file used to configure the extension. + If have .exe extension the will be executed + If have .dll extension used like MP plugin configuration</Description> + </SectionParam> + <SectionParam Name="Online Screenshots"> + <Value /> + <ValueType>String</ValueType> + <Description>Online stored screenshot urls separated by ; </Description> + </SectionParam> + <SectionParam Name="Force to uninstall on update"> + <Value>yes</Value> + <ValueType>Bool</ValueType> + <Description>Show dialog and force to uninstall previous version when updating an extension. Should only be disabled if you are using an NSIS/MSI installer.</Description> + </SectionParam> + </Items> + </Params> + </GeneralInfo> + <UniqueFileList> + <Items /> + </UniqueFileList> + <ProjectSettings> + <FolderGroups /> + </ProjectSettings> + <IsSkin>false</IsSkin> + </PackageClass> + <PackageClass> + <Version>2.0</Version> + <Groups> + <Items> + <GroupItem Name="Default"> + <DisplayName>Default</DisplayName> + <DefaulChecked>true</DefaulChecked> + <Description>Default</Description> + <Files> + <Items /> + </Files> + </GroupItem> + </Items> + </Groups> + <Sections> + <Items /> + </Sections> + <Dependencies> + <Items> + <DependencyItem> + <Type>MediaPortal</Type> + <Id /> + <MinVersion> + <Major>1</Major> + <Minor>1</Minor> + <Build>6</Build> + <Revision>27644</Revision> + </MinVersion> + <MaxVersion> + <Major>1</Major> + <Minor>1</Minor> + <Build>6</Build> + <Revision>27644</Revision> + </MaxVersion> + <WarnOnly>false</WarnOnly> + <Message>requires MediaPortal version 1.1.6.27644 to 1.1.6.27644.</Message> + <Name>MediaPortal</Name> + </DependencyItem> + </Items> + </Dependencies> + <PluginDependencies> + <Items> + <PluginDependencyItem AssemblyName="MySleepTimer.dll"> + <CompatibleVersion> + <Items> + <CompatibleVersionItem> + <MinRequiredVersion>1.1.7.0</MinRequiredVersion> + <DesignedForVersion>1.1.7.0</DesignedForVersion> + </CompatibleVersionItem> + </Items> + </CompatibleVersion> + <SubSystemsUsed> + <Items /> + </SubSystemsUsed> + </PluginDependencyItem> + </Items> + </PluginDependencies> + <GeneralInfo> + <Name>MySleepTimer</Name> + <Id>05afd608-7fb0-4738-85b3-250bb8e521a6</Id> + <Author>Team MediaPortal, Anthrax (thx Chefkoch)</Author> + <HomePage>http://www.team-mediaportal.com/extensions/system/mysleeptimer</HomePage> + <ForumPage>http://forum.team-mediaportal.com/threads/mysleeptimer.47353/</ForumPage> + <UpdateUrl>http://mp-plugins.svn.sourceforge.net/viewvc/mp-plugins/trunk/plugins/MySleepTimer/MpeRelease/update.xml</UpdateUrl> + <Version> + <Major>2</Major> + <Minor>0</Minor> + <Build>0</Build> + <Revision>0</Revision> + </Version> + <ExtensionDescription>If you want to set a sleeptime by simply pressing a remote button, this plugin is what you are searching for. + +It is possible to define the steps which are used to set the sleeptime and detects the remaining playback time if a media is played while you pressed the sleeptimer button. + +If you are using IRSS, there will be NO need to configure the remote button mapping within MP, since IRSS detects the sleeptimer plugin and always sends the yellow button if the plugin is found,</ExtensionDescription> + <VersionDescription>added support for MediaPortal 1.2.2.0 final</VersionDescription> + <DevelopmentStatus>Stable</DevelopmentStatus> + <OnlineLocation>http://mp-plugins.svn.sourceforge.net/viewvc/mp-plugins/trunk/plugins/MySleepTimer/MpeRelease/MySleepTimer.mpe1</OnlineLocation> + <ReleaseDate>2012-03-16T00:54:51</ReleaseDate> + <Tags>standby, suspend, sleeptimer, sleep</Tags> + <Location>D:\Anthrax-Leprosy-Pi\Documents\Development\Projekte\MediaPortal\MySleepTimer\MySleepTimer\Extension\Installer\MySleepTimer.mpe1</Location> + <Params> + <Items> + <SectionParam Name="Online Icon"> + <Value>http://mp-plugins.svn.sourceforge.net/viewvc/mp-plugins/trunk/plugins/MySleepTimer/MySleepTimer/img/MySleepTimer_enabled.png</Value> + <ValueType>String</ValueType> + <Description>The icon file of the package stored online (jpg,png,bmp)</Description> + </SectionParam> + <SectionParam Name="Configuration file"> + <Value>%Plugins%\process\MySleepTimer.dll</Value> + <ValueType>Template</ValueType> + <Description>The file used to configure the extension. + If have .exe extension the will be executed + If have .dll extension used like MP plugin configuration</Description> + </SectionParam> + <SectionParam Name="Online Screenshots"> + <Value /> + <ValueType>String</ValueType> + <Description>Online stored screenshot urls separated by ; </Description> + </SectionParam> + <SectionParam Name="Force to uninstall on update"> + <Value>yes</Value> + <ValueType>Bool</ValueType> + <Description>Show dialog and force to uninstall previous version when updating an extension. Should only be disabled if you are using an NSIS/MSI installer.</Description> + </SectionParam> + </Items> + </Params> + </GeneralInfo> + <UniqueFileList> + <Items /> + </UniqueFileList> + <ProjectSettings> + <FolderGroups /> + </ProjectSettings> + <IsSkin>false</IsSkin> + </PackageClass> + </Items> +</ExtensionCollection> \ No newline at end of file Added: trunk/plugins/MySleepTimer/MySleepTimer/Plugin/Configuration/MySleepTimerConfig.Designer.cs =================================================================== --- trunk/plugins/MySleepTimer/MySleepTimer/Plugin/Configuration/MySleepTimerConfig.Designer.cs (rev 0) +++ trunk/plugins/MySleepTimer/MySleepTimer/Plugin/Configuration/MySleepTimerConfig.Designer.cs 2012-03-16 12:28:28 UTC (rev 4467) @@ -0,0 +1,365 @@ +namespace MySleepTimer.Plugin.Configuration { + partial class MySleepTimerConfig { + /// <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.comboBoxActionType = new System.Windows.Forms.ComboBox(); + this.label1 = new System.Windows.Forms.Label(); + this.numericUpDownSleepTimeMax = new System.Windows.Forms.NumericUpDown(); + this.numericUpDownSleepTimeStep = new System.Windows.Forms.NumericUpDown(); + this.label4 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.comboBoxShutDownType = new System.Windows.Forms.ComboBox(); + this.checkBoxShutDownForce = new System.Windows.Forms.CheckBox(); + this.label7 = new System.Windows.Forms.Label(); + this.numericUpDownNotifyBeforeSleep = new System.Windows.Forms.NumericUpDown(); + this.label2 = new System.Windows.Forms.Label(); + this.comboBoxSleepBehavior = new System.Windows.Forms.ComboBox(); + this.label9 = new System.Windows.Forms.Label(); + this.numericUpDownTimeOutN = new System.Windows.Forms.NumericUpDown(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.checkBoxUsePSSettings = new System.Windows.Forms.CheckBox(); + this.groupBoxTimer = new System.Windows.Forms.GroupBox(); + this.cancelButton = new System.Windows.Forms.Button(); + this.okButton = new System.Windows.Forms.Button(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownSleepTimeMax)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownSleepTimeStep)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownNotifyBeforeSleep)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownTimeOutN)).BeginInit(); + this.groupBox1.SuspendLayout(); + this.groupBoxTimer.SuspendLayout(); + this.SuspendLayout(); + // + // comboBoxActionType + // + this.comboBoxActionType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBoxActionType.DropDownWidth = 250; + this.comboBoxActionType.FormattingEnabled = true; + this.comboBoxActionType.Location = new System.Drawing.Point(169, 6); + this.comboBoxActionType.Name = "comboBoxActionType"; + this.comboBoxActionType.Size = new System.Drawing.Size(168, 21); + this.comboBoxActionType.TabIndex = 5; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(12, 9); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(146, 13); + this.label1.TabIndex = 0; + this.label1.Text = "ActionType to set sleep timer:"; + // + // numericUpDownSleepTimeMax + // + this.numericUpDownSleepTimeMax.Increment = new decimal(new int[] { + 10, + 0, + 0, + 0}); + this.numericUpDownSleepTimeMax.Location = new System.Drawing.Point(210, 19); + this.numericUpDownSleepTimeMax.Maximum = new decimal(new int[] { + 1440, + 0, + 0, + 0}); + this.numericUpDownSleepTimeMax.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.numericUpDownSleepTimeMax.Name = "numericUpDownSleepTimeMax"; + this.numericUpDownSleepTimeMax.Size = new System.Drawing.Size(71, 20); + this.numericUpDownSleepTimeMax.TabIndex = 25; + this.numericUpDownSleepTimeMax.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + // + // numericUpDownSleepTimeStep + // + this.numericUpDownSleepTimeStep.Location = new System.Drawing.Point(210, 45); + this.numericUpDownSleepTimeStep.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.numericUpDownSleepTimeStep.Name = "numericUpDownSleepTimeStep"; + this.numericUpDownSleepTimeStep.Size = new System.Drawing.Size(71, 20); + this.numericUpDownSleepTimeStep.TabIndex = 30; + this.numericUpDownSleepTimeStep.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(69, 21); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(130, 13); + this.label4.TabIndex = 0; + this.label4.Text = "Sleep time maximum [min]:"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(87, 47); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(112, 13); + this.label5.TabIndex = 0; + this.label5.Text = "Sleep time steps [min]:"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(6, 45); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(81, 13); + this.label3.TabIndex = 0; + this.label3.Text = "Shutdown type:"; + // + // comboBoxShutDownType + // + this.comboBoxShutDownType.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.comboBoxShutDownType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBoxShutDownType.FormattingEnabled = true; + this.comboBoxShutDownType.Location = new System.Drawing.Point(93, 42); + this.comboBoxShutDownType.Name = "comboBoxShutDownType"; + this.comboBoxShutDownType.Size = new System.Drawing.Size(168, 21); + this.comboBoxShutDownType.TabIndex = 15; + // + // checkBoxShutDownForce + // + this.checkBoxShutDownForce.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.checkBoxShutDownForce.AutoSize = true; + this.checkBoxShutDownForce.Location = new System.Drawing.Point(267, 44); + this.checkBoxShutDownForce.Name = "checkBoxShutDownForce"; + this.checkBoxShutDownForce.Size = new System.Drawing.Size(50, 17); + this.checkBoxShutDownForce.TabIndex = 20; + this.checkBoxShutDownForce.Text = "force"; + this.checkBoxShutDownForce.UseVisualStyleBackColor = true; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(25, 99); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(174, 13); + this.label7.TabIndex = 0; + this.label7.Text = "Start notification prior to sleep [min]:"; + // + // numericUpDownNotifyBeforeSleep + // + this.numericUpDownNotifyBeforeSleep.Location = new System.Drawing.Point(210, 97); + this.numericUpDownNotifyBeforeSleep.Name = "numericUpDownNotifyBeforeSleep"; + this.numericUpDownNotifyBeforeSleep.Size = new System.Drawing.Size(71, 20); + this.numericUpDownNotifyBeforeSleep.TabIndex = 40; + this.numericUpDownNotifyBeforeSleep.ValueChanged += new System.EventHandler(this.numericUpDownNotifyBeforeSleep_ValueChanged); + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(77, 35); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(81, 13); + this.label2.TabIndex = 0; + this.label2.Text = "Sleep behavior:"; + // + // comboBoxSleepBehavior + // + this.comboBoxSleepBehavior.AccessibleRole = System.Windows.Forms.AccessibleRole.None; + this.comboBoxSleepBehavior.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBoxSleepBehavior.DropDownWidth = 250; + this.comboBoxSleepBehavior.FormattingEnabled = true; + this.comboBoxSleepBehavior.Items.AddRange(new object[] { + "Shutdown", + "Exit MediaPortal", + "Show Basic Home"}); + this.comboBoxSleepBehavior.Location = new System.Drawing.Point(169, 33); + this.comboBoxSleepBehavior.Name = "comboBoxSleepBehavior"; + this.comboBoxSleepBehavior.Size = new System.Drawing.Size(168, 21); + this.comboBoxSleepBehavior.TabIndex = 10; + this.comboBoxSleepBehavior.SelectedIndexChanged += new System.EventHandler(this.comboBoxSleepBehavior_SelectedIndexChanged); + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(79, 73); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(120, 13); + this.label9.TabIndex = 0; + this.label9.Text = "Notification TimeOut [s]:"; + // + // numericUpDownTimeOutN + // + this.numericUpDownTimeOutN.Location = new System.Drawing.Point(210, 71); + this.numericUpDownTimeOutN.Maximum = new decimal(new int[] { + 65, + 0, + 0, + 0}); + this.numericUpDownTimeOutN.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.numericUpDownTimeOutN.Name = "numericUpDownTimeOutN"; + this.numericUpDownTimeOutN.Size = new System.Drawing.Size(71, 20); + this.numericUpDownTimeOutN.TabIndex = 50; + this.numericUpDownTimeOutN.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + // + // groupBox1 + // + this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBox1.Controls.Add(this.checkBoxUsePSSettings); + this.groupBox1.Controls.Add(this.label3); + this.groupBox1.Controls.Add(this.comboBoxShutDownType); + this.groupBox1.Controls.Add(this.checkBoxShutDownForce); + this.groupBox1.Location = new System.Drawing.Point(12, 73); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(323, 75); + this.groupBox1.TabIndex = 56; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Shutdown options"; + // + // checkBoxUsePSSettings + // + this.checkBoxUsePSSettings.AutoSize = true; + this.checkBoxUsePSSettings.Location = new System.Drawing.Point(9, 19); + this.checkBoxUsePSSettings.Name = "checkBoxUsePSSettings"; + this.checkBoxUsePSSettings.Size = new System.Drawing.Size(234, 17); + this.checkBoxUsePSSettings.TabIndex = 21; + this.checkBoxUsePSSettings.Text = "Use settings of Powerscheduler client plugin"; + this.checkBoxUsePSSettings.UseVisualStyleBackColor = true; + this.checkBoxUsePSSettings.CheckedChanged += new System.EventHandler(this.checkBoxUsePSSettings_CheckedChanged); + // + // groupBoxTimer + // + this.groupBoxTimer.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBoxTimer.Controls.Add(this.label4); + this.groupBoxTimer.Controls.Add(this.numericUpDownSleepTimeMax); + this.groupBoxTimer.Controls.Add(this.label9); + this.groupBoxTimer.Controls.Add(this.numericUpDownSleepTimeStep); + this.groupBoxTimer.Controls.Add(this.numericUpDownTimeOutN); + this.groupBoxTimer.Controls.Add(this.label5); + this.groupBoxTimer.Controls.Add(this.numericUpDownNotifyBeforeSleep); + this.groupBoxTimer.Controls.Add(this.label7); + this.groupBoxTimer.Location = new System.Drawing.Point(12, 154); + this.groupBoxTimer.Name = "groupBoxTimer"; + this.groupBoxTimer.Size = new System.Drawing.Size(323, 129); + this.groupBoxTimer.TabIndex = 57; + this.groupBoxTimer.TabStop = false; + this.groupBoxTimer.Text = "Timer && notify settings"; + // + // cancelButton + // + this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.cancelButton.Location = new System.Drawing.Point(260, 303); + this.cancelButton.Name = "cancelButton"; + this.cancelButton.Size = new System.Drawing.Size(75, 23); + this.cancelButton.TabIndex = 58; + this.cancelButton.Text = "Cancel"; + this.cancelButton.UseVisualStyleBackColor = true; + this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click); + // + // okButton + // + this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.okButton.Location = new System.Drawing.Point(179, 303); + this.okButton.Name = "okButton"; + this.okButton.Size = new System.Drawing.Size(75, 23); + this.okButton.TabIndex = 59; + this.okButton.Text = "OK"; + this.okButton.UseVisualStyleBackColor = true; + this.okButton.Click += new System.EventHandler(this.okButton_Click); + // + // MySleepTimerConfig + // + this.AcceptButton = this.okButton; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.cancelButton; + this.ClientSize = new System.Drawing.Size(347, 334); + this.Controls.Add(this.okButton); + this.Controls.Add(this.cancelButton); + this.Controls.Add(this.groupBoxTimer); + this.Controls.Add(this.groupBox1); + this.Controls.Add(this.comboBoxSleepBehavior); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.Controls.Add(this.comboBoxActionType); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "MySleepTimerConfig"; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "MySleepTimer - Configuration"; + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownSleepTimeMax)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownSleepTimeStep)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownNotifyBeforeSleep)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownTimeOutN)).EndInit(); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.groupBoxTimer.ResumeLayout(false); + this.groupBoxTimer.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.ComboBox comboBoxActionType; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.NumericUpDown numericUpDownSleepTimeMax; + private System.Windows.Forms.NumericUpDown numericUpDownSleepTimeStep; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.ComboBox comboBoxShutDownType; + private System.Windows.Forms.CheckBox checkBoxShutDownForce; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.NumericUpDown numericUpDownNotifyBeforeSleep; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.ComboBox comboBoxSleepBehavior; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.NumericUpDown numericUpDownTimeOutN; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.CheckBox checkBoxUsePSSettings; + private System.Windows.Forms.GroupBox groupBoxTimer; + private System.Windows.Forms.Button cancelButton; + private System.Windows.Forms.Button okButton; + } +} \ No newline at end of file Added: trunk/plugins/MySleepTimer/MySleepTimer/Plugin/Configuration/MySleepTimerConfig.cs =================================================================== --- trunk/plugins/MySleepTimer/MySleepTimer/Plugin/Configuration/MySleepTimerConfig.cs (rev 0) +++ trunk/plugins/MySleepTimer/MySleepTimer/Plugin/Configuration/MySleepTimerConfig.cs 2012-03-16 12:28:28 UTC (rev 4467) @@ -0,0 +1,215 @@ +#region Copyright (C) 2005-2010 Team MediaPortal + +// Copyright (C) 2005-2010 Team MediaPortal +// http://www.team-mediaportal.com +// +// MediaPortal 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 of the License, or +// (at your option) any later version. +// +// MediaPortal 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 MediaPortal. If not, see <http://www.gnu.org/licenses/>. + +#endregion + +using System; +using System.Collections.Generic; +using System.Windows.Forms; +using MediaPortal.Configuration; +using MediaPortal.GUI.Library; +using MediaPortal.UserInterface.Controls; +using MediaPortal.Util; +using MySleepTimer.Plugin.Window; +using Action = MediaPortal.GUI.Library.Action; + +namespace MySleepTimer.Plugin.Configuration { + + public partial class MySleepTimerConfig : MPConfigForm{ + public MySleepTimerConfig() { + InitializeComponent(); + LoadSettings(); + } + + #region Settings + + private void LoadSettings() { + try { + comboBoxActionType.DataSource = GenerateActionList(); + comboBoxActionType.DisplayMember = "ActionName"; + comboBoxActionType.ValueMember = "ActionType"; + comboBoxShutDownType.DataSource = GenerateShutdownList(); + comboBoxShutDownType.DisplayMember = "ShutdownName"; + comboBoxShutDownType.ValueMember = "ShutdownType"; + + Settings.Load(); + comboBoxActionType.SelectedValue = Settings.ActionType; + comboBoxSleepBehavior.Text = Settings.SleepBehavior; + + checkBoxUsePSSettings.Checked = Settings.UsePowerSchedulerSettings; + comboBoxShutDownType.SelectedValue = Settings.ShutdownType; + checkBoxShutDownForce.Checked = Settings.ShutdownForce; + + numericUpDownSleepTimeMax.Value = Settings.SleepTimeMaxium; + numericUpDownSleepTimeStep.Value = Settings.SleepTimeStep; + numericUpDownNotifyBeforeSleep.Value = Settings.NotifyBeforeSleep; + numericUpDownTimeOutN.Value = Settings.NotifyTimeOutMs; + + SetUpShutDownTypeControls(); + SetUpNotifyControls(); + } catch (Exception ex) { + Log.Error(ex); + } + } + + private void SaveSettings() { + Settings.ActionType = (Action.ActionType)comboBoxActionType.SelectedValue; + Settings.SleepBehavior = comboBoxSleepBehavior.Text; + + Settings.UsePowerSchedulerSettings = checkBoxUsePSSettings.Checked; + Settings.ShutdownType = (RestartOptions)comboBoxShutDownType.SelectedValue; + Settings.ShutdownForce = checkBoxShutDownForce.Checked; + + Settings.SleepTimeMaxium = (int)numericUpDownSleepTimeMax.Value; + Settings.SleepTimeStep = (int)numericUpDownSleepTimeStep.Value; + Settings.NotifyBeforeSleep = (int)numericUpDownNotifyBeforeSleep.Value; + Settings.NotifyTimeOutMs = (int)numericUpDownTimeOutN.Value; + Settings.Save(); + } + + #endregion + + #region Windows Forms events + + private void okButton_Click(object sender, EventArgs e) { + SaveSettings(); + Close(); + } + + private void cancelButton_Click(object sender, EventArgs e) { + Close(); + } + + + private void comboBoxSleepBehavior_SelectedIndexChanged(object sender, EventArgs e) { + SetUpShutDownTypeControls(); + } + + private void checkBoxUsePSSettings_CheckedChanged(object sender, EventArgs e) { + SetUpShutDownTypeControls(); + } + + private void numericUpDownNotifyBeforeSleep_ValueChanged(object sender, EventArgs e) { + SetUpNotifyControls(); + } + + private void numericUpDownNotifyInterval_ValueChanged(object sender, EventArgs e) { + SetUpNotifyControls(); + } + + #endregion + + private static List<ActionEntry> GenerateActionList() { + var ret = new List<ActionEntry>(); + + foreach (var variable in Enum.GetValues(typeof(Action.ActionType))) + ret.Add(new ActionEntry((Action.ActionType)variable)); + + ret.Sort(); + + return ret; + } + + private static List<ShutdownEntry> GenerateShutdownList() { + var ret = new List<ShutdownEntry>(); + + foreach (var variable in Enum.GetValues(typeof(RestartOptions))) + ret.Add(new ShutdownEntry((RestartOptions)variable)); + + ret.Sort(); + + return ret; + } + + private void SetUpShutDownTypeControls() { + groupBox1.Enabled = comboBoxSleepBehavior.Text == "Shutdown"; + + checkBoxUsePSSettings.Enabled = Settings.PowerSchedulerAvailable; + + if (checkBoxUsePSSettings.Enabled && checkBoxUsePSSettings.Checked) { + comboBoxShutDownType.Enabled = false; + checkBoxShutDownForce.Enabled = false; + } else { + comboBoxShutDownType.Enabled = true; + checkBoxShutDownForce.Enabled = true; + } + } + + private void SetUpNotifyControls() { + try { + if (numericUpDownNotifyBeforeSleep.Value != 0) { + label9.Enabled = true; + numericUpDownTimeOutN.Enabled = true; + } else { + label9.Enabled = false; + numericUpDownTimeOutN.Enabled = false; + } + } catch (Exception ex) { + Log.Error(ex); + } + } + } + + internal class ActionEntry : IComparable<ActionEntry> { + public Action.ActionType ActionType { get; private set; } + + public string ActionName { + get { return ActionType.ToString(); } + } + + public int ActionID { + get { return (int)ActionType; } + } + + public ActionEntry(Action.ActionType actionType) { + ActionType = actionType; + } + + #region IComparable<ActionEntry> Member + + public int CompareTo(ActionEntry other) { + return ActionName.CompareTo(other.ActionName); + } + + #endregion + } + + internal class ShutdownEntry : IComparable<ShutdownEntry> { + public RestartOptions ShutDownType { get; private set; } + + public string ShutdownName { + get { return ShutDownType.ToString(); } + } + + public int ShutdownID { + get { return (int)ShutDownType; } + } + + public ShutdownEntry(RestartOptions restartOptions) { + ShutDownType = restartOptions; + } + + #region IComparable<ShutdownEntry> Member + + public int CompareTo(ShutdownEntry other) { + return ShutdownName.CompareTo(other.ShutdownName); + } + + #endregion + } +} \ No newline at end of file Added: trunk/plugins/MySleepTimer/MySleepTimer/Plugin/Configuration/MySleepTimerConfig.resx =================================================================== --- trunk/plugins/MySleepTimer/MySleepTimer/Plugin/Configuration/MySleepTimerConfig.resx (rev 0) +++ trunk/plugins/MySleepTimer/MySleepTimer/Plugin/Configuration/MySleepTimerConfig.resx 2012-03-16 12:28:28 UTC (rev 4467) @@ -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 f... [truncated message content] |