|
From: <ant...@us...> - 2009-01-05 20:25:26
|
Revision: 2491
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=2491&view=rev
Author: anthrax-leprosy
Date: 2009-01-05 20:25:20 +0000 (Mon, 05 Jan 2009)
Log Message:
-----------
Initial Upload - MySleepTimer
Added Paths:
-----------
trunk/plugins/MySleepTimer/MpiRelease/
trunk/plugins/MySleepTimer/MpiRelease/MySleepTimer.xml
trunk/plugins/MySleepTimer/MpiRelease/MySleepTimer.xmp
trunk/plugins/MySleepTimer/MySleepTimer/
trunk/plugins/MySleepTimer/MySleepTimer/MySleepTimer.cs
trunk/plugins/MySleepTimer/MySleepTimer/MySleepTimer.csproj
trunk/plugins/MySleepTimer/MySleepTimer/MySleepTimerConfig.Designer.cs
trunk/plugins/MySleepTimer/MySleepTimer/MySleepTimerConfig.cs
trunk/plugins/MySleepTimer/MySleepTimer/MySleepTimerConfig.resx
trunk/plugins/MySleepTimer/MySleepTimer/Properties/
trunk/plugins/MySleepTimer/MySleepTimer/Properties/AssemblyInfo.cs
trunk/plugins/MySleepTimer/MySleepTimer.sln
Property Changed:
----------------
trunk/plugins/MySleepTimer/
Property changes on: trunk/plugins/MySleepTimer
___________________________________________________________________
Added: svn:ignore
+ *.suo
*.Load
Added: trunk/plugins/MySleepTimer/MpiRelease/MySleepTimer.xml
===================================================================
--- trunk/plugins/MySleepTimer/MpiRelease/MySleepTimer.xml (rev 0)
+++ trunk/plugins/MySleepTimer/MpiRelease/MySleepTimer.xml 2009-01-05 20:25:20 UTC (rev 2491)
@@ -0,0 +1,42 @@
+<MPinstalerS>
+ <ver>1.00.000</ver>
+ <ExtensionList>
+ <Extension>
+ <FileName>MySleepTimer.mpi</FileName>
+ <Name>MySleepTimer</Name>
+ <URL>http://www.team-mediaportal.com</URL>
+ <Version>1.0.1.0</Version>
+ <Author>Anthrax</Author>
+ <Description>Anybody around here using MediaPortal as his/her over-the-counter (but highly addictive) sleeping agent?
+
+Well, I sure as heck do
+
+Ever since I started using MediaPortal some two years ago, I was missing the essential funtionality every cheap old TV has - a simple push-button sleep timer...
+So spending one sleepless night I finally managed to program one myself.
+
+MySleepTimer - MediaPortal Process Plugin
+=========================================
+
+- settings should be pretty much self explanatory (ACTION_REMOTE_YELLOW_BUTTON works perfectly on my behalf)
+- inside MediaPortal perform the selected action repeatedly to increment the sleep time according to the configured steps
+- going beyond the maximum sleep time stops the timer until being reset the next time 'action' occurs
+
+regards,
+Anthrax</Description>
+ <Group>Automation</Group>
+ <Logo>iVBORw0KGgoAAAANSUhEUgAAAEUAAABmCAYAAACdtVyxAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAewQAAHsEBw2lUUwAAF9dJREFUeF7tnQd0VNX2xp/vPf++Z8FeUVSaPSqiIEUQBRURO4oFO9gQBRHF/rBhAwvYu1QpIUhHQXrvJYB0kpBkMpMy6Qnvfb9xdv43N5PMZIKRrIVrfetmZu495Tt7f3uffS7LA4YvHv63v+K/Thd1OiDSfkcuHfnfSO/dK/dBSnViz549B7jwd312w31P4HN1jbPaCKmAjH/oNzcqJOnPJuevIMUmDBH/dOBA12d+M7LsmWqxmGohxWElbkIg4v+COMjxN9/xmxHlJOdPJ2avkxLCTZgEZNjEsAAmDQn/Fg4O4hDH33wP/hW8z0gy66G9UrqzN11qr5ESgWYwIVbeyICEQ4VaQRyuq+Gw4G9GlJMcJzF/iltVmZRyXMP0wtwDIpgYVsFEIeII4SjhGOFY4bjglb+PDv52ZJAoSHITVK5r2ZiitZ4qkeIipDwizEXMKiCDSTP5E4SThNrCycErf/PdicLxwfsgj+cgk3Ygl3Yh2ynQjKGU9TDGypITNSkuQtyuwaCdJJhFMEkmCwGnCqcL9YUGQsPglb/rCXWF04Q6QbIgEGvCssyCjCBzL6f1RO1aUZESghCE0NwDU0cbnESw8qcEiWCyTPxM4RwhRjhfuCB45e/zhHOFs4P3QRwEugmiD/qiTxaiPHIqFbEqTUo5hGDKDAwTZyWxCNyASUACVnBWcKJM/iLhEuFSobnQQrhMa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iMM9h2/cx/P8KxI/YF26see/qIO+YkykF8ruBhoXBn9YJzhhNX9e0SaUl6jIYg58PZZtx59/E9HP3rMyCP6H/fTUW/r73dkJe9pMu9rtQdoggPlKh9owh8CTfCjULDfufIMz9IGbYnod0X4G7JCRNftLiXWEQ0hVbKUULmMzllqHz78kCeOHHHYc+DokYf3PXbkkc+LmBc0kRc1oZe02i8DTfIVoAm/Wh7sHu7nWdqgLdoEtC9yyGRLaUe0ZITdEFbG5BiELKP2YcP//YDwsIh5BBw1ohYW8xiQ1TyuSXXX5J4waLI9wsHu5VnaANYm7dOPFoBznTJ1kcrMoUpCG6qjQ4YddJTIuE2404kjRhx6F9CK3m3QCncxaJXviQTc72yDv2nX2ZfIIReqtH5EldGGY1uE/Eu4RrgB1Bp+8I2hoNW8yQmt9s2Rwvlcee3zvfo/M9x4I/m9SkJLBxpIY6FdedBgr/qz4ej7Sqw2kolXdE+VSNEAThSaRwKZd4uqIpJ+gov096oQEzUp6vwfwoXBQWAt+xJO+qtIOUFEnLeP4hwWLVpiorIUdXiAUE9osA8jam2JlpTDRMbp+zhOqW5LOUaEnFwDcFA0xERrKceLkJqAQ6uFFJFxoHB0DcHh1UUKGewRNQTVSgpCW1NQ6f1QpTVFZGApB9cgVDq7jYaUg4LEQE5NQLWQgtBCTE1BtZDyz2AEgpyagGrRFDaCEFMjUF0hmX0PxNQIVAspwcJSjSBEC1dpPYm6mk9nNQSV1pOqkIIL7fOIxnWiJiXoQvtJcbO+r1tKtFZSJUupSqf7+rOVTvP39QntjfHtJyXE/0xhPyn7SYnsf7Gx31L2W8p+S4naC6J+cG+Evn21jf2k7NeU/ZoStRdE/eC+qgd7Y1z7SQmhKf8DhcQspf0GjeQAAAAASUVORK5CYII=</Logo>
+ <Properties>
+ <MPMaxVersion />
+ <MPMinVersion />
+ <MinExtensionVersion />
+ <MaxExtensionVersion />
+ <ForumURL>http://forum.team-mediaportal.com/plugins-47/new-plugin-mysleeptimer-47353/</ForumURL>
+ <WebURL />
+ <CreationDate>26-10-08</CreationDate>
+ <SingleGroupSelect>False</SingleGroupSelect>
+ </Properties>
+ <Uninstall />
+ </Extension>
+ </ExtensionList>
+ <Option />
+</MPinstalerS>
\ No newline at end of file
Added: trunk/plugins/MySleepTimer/MpiRelease/MySleepTimer.xmp
===================================================================
--- trunk/plugins/MySleepTimer/MpiRelease/MySleepTimer.xmp (rev 0)
+++ trunk/plugins/MySleepTimer/MpiRelease/MySleepTimer.xmp 2009-01-05 20:25:20 UTC (rev 2491)
@@ -0,0 +1,55 @@
+<MPinstaler>
+ <ver>1.00.000</ver>
+ <FileList>
+ <File>
+ <FileName>MySleepTimer.dll</FileName>
+ <Type>Plugin</Type>
+ <SubType>Window</SubType>
+ <Source>MySleepTimer.dll</Source>
+ <Id>01010</Id>
+ <Option />
+ <Guid>091dabbb-9a12-4627-8e08-ebd81816d065</Guid>
+ </File>
+ </FileList>
+ <StringList />
+ <Actions />
+ <SetupGroups />
+ <SetupGroupMappings />
+ <Option>
+ <BuildFileName>MySleepTimer.mpi</BuildFileName>
+ <ProiectFileName>MySleepTimer.xmp</ProiectFileName>
+ <ProiectName>MySleepTimer</ProiectName>
+ <Author>Anthrax</Author>
+ <UpdateURL>http://www.team-mediaportal.com</UpdateURL>
+ <Version>1.0.1.1</Version>
+ <Description>Anybody around here using MediaPortal as his/her over-the-counter (but highly addictive) sleeping agent?
+
+Well, I sure as heck do
+
+Ever since I started using MediaPortal some two years ago, I was missing the essential funtionality every cheap old TV has - a simple push-button sleep timer...
+So spending one sleepless night I finally managed to program one myself.
+
+MySleepTimer - MediaPortal Process Plugin
+=========================================
+
+- settings should be pretty much self explanatory (ACTION_REMOTE_YELLOW_BUTTON works perfectly on my behalf)
+- inside MediaPortal perform the selected action repeatedly to increment the sleep time according to the configured steps
+- going beyond the maximum sleep time stops the timer until being reset the next time 'action' occurs
+
+regards,
+Anthrax</Description>
+ <Group>Automation</Group>
+ <Release>Stable </Release>
+ <Logo>iVBORw0KGgoAAAANSUhE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uSXXX5J4waLI9wsHu5VnaANYm7dOPFoBznTJ1kcrMoUpCG6qjQ4YddJTIuE2404kjRhx6F9CK3m3QCncxaJXviQTc72yDv2nX2ZfIIReqtH5EldGGY1uE/Eu4RrgB1Bp+8I2hoNW8yQmt9s2Rwvlcee3zvfo/M9x4I/m9SkJLBxpIY6FdedBgr/qz4ej7Sqw2kolXdE+VSNEAThSaRwKZd4uqIpJ+gov096oQEzUp6vwfwoXBQWAt+xJO+qtIOUFEnLeP4hwWLVpiorIUdXiAUE9osA8jam2JlpTDRMbp+zhOqW5LOUaEnFwDcFA0xERrKceLkJqAQ6uFFJFxoHB0DcHh1UUKGewRNQTVSgpCW1NQ6f1QpTVFZGApB9cgVDq7jYaUg4LEQE5NQLWQgtBCTE1BtZDyz2AEgpyagGrRFDaCEFMjUF0hmX0PxNQIVAspwcJSjSBEC1dpPYm6mk9nNQSV1pOqkIIL7fOIxnWiJiXoQvtJcbO+r1tKtFZSJUupSqf7+rOVTvP39QntjfHtJyXE/0xhPyn7SYnsf7Gx31L2W8p+S4naC6J+cG+Evn21jf2k7NeU/ZoStRdE/eC+qgd7Y1z7SQmhKf8DhcQspf0GjeQAAAAASUVORK5CYII=</Logo>
+ </Option>
+ <Properties>
+ <MPMaxVersion />
+ <MPMinVersion />
+ <MinExtensionVersion />
+ <MaxExtensionVersion />
+ <ForumURL>http://forum.team-mediaportal.com/plugins-47/new-plugin-mysleeptimer-47353/</ForumURL>
+ <WebURL />
+ <CreationDate>26-10-08</CreationDate>
+ <SingleGroupSelect>False</SingleGroupSelect>
+ </Properties>
+</MPinstaler>
\ No newline at end of file
Property changes on: trunk/plugins/MySleepTimer/MySleepTimer
___________________________________________________________________
Added: svn:ignore
+ *.user
obj
bin
Added: trunk/plugins/MySleepTimer/MySleepTimer/MySleepTimer.cs
===================================================================
--- trunk/plugins/MySleepTimer/MySleepTimer/MySleepTimer.cs (rev 0)
+++ trunk/plugins/MySleepTimer/MySleepTimer/MySleepTimer.cs 2009-01-05 20:25:20 UTC (rev 2491)
@@ -0,0 +1,209 @@
+#region Copyright (C) 2005-2008 Team MediaPortal
+
+/*
+ * Copyright (C) 2005-2008 Team MediaPortal
+ * http://www.team-mediaportal.com
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Make; see the file COPYING. If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ */
+
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System;
+using System.Windows.Forms;
+using MediaPortal.GUI.Library;
+using MediaPortal.UserInterface.Controls;
+using MediaPortal.GUI;
+using MediaPortal.Util;
+using MediaPortal.Dialogs;
+using MediaPortal.Configuration;
+
+namespace MySleepTimer {
+ public class MySleepTimer : GUIWindow, ISetupForm {
+
+ private int sleepTimeCurrent = -1;
+ private int sleepTimeLeft = 0;
+ private GUIDialogNotify dialogSleepTimerNotify;
+ private Action.ActionType actionType;
+ private RestartOptions restartOption;
+ private bool shutdownForce = false;
+ private int sleepTimeMaxium = 120;
+ private int sleepTimeStep = 10;
+ private int notifyInterval = 5;
+ private Timer timerNotify;
+ private Timer timerShutDown;
+
+
+ public MySleepTimer() {
+ using (MediaPortal.Profile.Settings xmlReader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) {
+ actionType = (Action.ActionType)xmlReader.GetValueAsInt("MySleepTimer", "#MySleepTimer.ActionType", (int)(Action.ActionType.ACTION_REMOTE_YELLOW_BUTTON));
+ restartOption = (RestartOptions)xmlReader.GetValueAsInt("MySleepTimer", "#MySleepTimer.ShutdownType", (int)RestartOptions.ShutDown);
+ shutdownForce = xmlReader.GetValueAsBool("MySleepTimer", "#MySleepTimer.ShutdownForce", false);
+ sleepTimeMaxium = xmlReader.GetValueAsInt("MySleepTimer", "#MySleepTimer.Maximum", 120);
+ sleepTimeStep = xmlReader.GetValueAsInt("MySleepTimer", "#MySleepTimer.Step", 10);
+ notifyInterval = xmlReader.GetValueAsInt("MySleepTimer", "#MySleepTimer.NotifyInterval", 5);
+ }
+ timerNotify = new Timer();
+ timerNotify.Interval = notifyInterval * 60 * 1000;
+ timerNotify.Tick += new EventHandler(timerNotify_Tick);
+ timerShutDown = new Timer();
+ timerShutDown.Tick += new EventHandler(timerShutDown_Tick);
+ GUIWindowManager.OnNewAction += new OnActionHandler(GUIWindowManager_OnNewAction);
+
+ }
+
+ void GUIWindowManager_OnNewAction(Action action) {
+ if (action.wID == actionType) {
+ if (sleepTimeCurrent == -1) {
+ sleepTimeCurrent = 0;
+ try {
+ string[] shortCurrentRemaining = GUIPropertyManager.GetProperty("#shortcurrentremaining").Split(new char[] { ':' });
+ TimeSpan currentRemaining = new TimeSpan(Convert.ToInt16(shortCurrentRemaining[0]), Convert.ToInt16(shortCurrentRemaining[1]), 0);
+ if ((int)currentRemaining.TotalMinutes != 0) {
+ SetSleepTime((int)currentRemaining.TotalMinutes + 1, "Sleep in: " + ((int)currentRemaining.TotalMinutes +1) + " min (remaining playtime)");
+ base.OnAction(action);
+ return;
+ }
+ }
+ catch { }
+ }
+ sleepTimeCurrent += sleepTimeStep;
+ if (sleepTimeCurrent > sleepTimeMaxium) {
+ sleepTimeCurrent = -1;
+ timerShutDown.Stop();
+ timerNotify.Stop();
+ ShowNotifyDialog("Sleep Timer stopped!");
+ }
+ else {
+ SetSleepTime(sleepTimeCurrent);
+ }
+ base.OnAction(action);
+ }
+ }
+
+ void timerShutDown_Tick(object sender, EventArgs e) {
+ timerNotify.Stop();
+ ShowNotifyDialog("Time's up - Have a good night!");
+ WindowsController.ExitWindows(restartOption, shutdownForce, null);
+ }
+
+ void timerNotify_Tick(object sender, EventArgs e) {
+ if (timerShutDown.Enabled) {
+ sleepTimeLeft -= notifyInterval;
+ if (sleepTimeLeft > 0) {
+ ShowNotifyDialog("Minutes remaining: " + sleepTimeLeft);
+ }
+ }
+ }
+
+ private void SetSleepTime(int when) {
+ SetSleepTime(when, null);
+ }
+ private void SetSleepTime(int when, string message) {
+ sleepTimeLeft = when;
+ timerShutDown.Interval = (int)new TimeSpan(0, when, 0).TotalMilliseconds;
+ timerShutDown.Start();
+ timerNotify.Start();
+ if (message == null) {
+ ShowNotifyDialog("Sleep in: " + sleepTimeCurrent.ToString() + " min");
+ }
+ else {
+ ShowNotifyDialog(message);
+ }
+ }
+
+ private void ShowNotifyDialog(string notifyMessage) {
+ dialogSleepTimerNotify = (GUIDialogNotify)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_NOTIFY);
+ dialogSleepTimerNotify.TimeOut = 3;
+ dialogSleepTimerNotify.SetHeading("MySleepTimer");
+ dialogSleepTimerNotify.SetImage(GUIGraphicsContext.Skin + @"\Media\button_shutdown_focus.png");
+ dialogSleepTimerNotify.SetText(notifyMessage);
+ dialogSleepTimerNotify.DoModal(GUIWindowManager.ActiveWindow);
+ }
+
+ #region ISetupForm Members
+
+ // Returns the name of the plugin which is shown in the plugin menu
+ public string PluginName() {
+ return "MySleepTimer";
+ }
+
+ // Returns the description of the plugin is shown in the plugin menu
+ public string Description() {
+ return "Want MediaPortal to be your sleeping agent of choice? Well, here you go! (but be warned - might be highly addictive!)";
+ }
+
+ // Returns the author of the plugin which is shown in the plugin menu
+ public string Author() {
+ return "Anthrax";
+ }
+
+ // show the setup dialog
+ public void ShowPlugin() {
+ new MySleepTimerConfig().ShowDialog();
+ }
+
+ // Indicates whether plugin can be enabled/disabled
+ public bool CanEnable() {
+ return true;
+ }
+
+ // Get Windows-ID
+ public int GetWindowId() {
+ // WindowID of windowplugin belonging to this setup
+ // enter your own unique code
+ return 9876;
+ }
+
+ // Indicates if plugin is enabled by default;
+ public bool DefaultEnabled() {
+ return true;
+ }
+
+ // indicates if a plugin has it's own setup screen
+ public bool HasSetup() {
+ return true;
+ }
+
+ /// <summary>
+ /// If the plugin should have it's own button on the main menu of Mediaportal then it
+ /// should return true to this method, otherwise if it should not be on home
+ /// it should return false
+ /// </summary>
+ /// <param name="strButtonText">text the button should have</param>
+ /// <param name="strButtonImage">image for the button, or empty for default</param>
+ /// <param name="strButtonImageFocus">image for the button, or empty for default</param>
+ /// <param name="strPictureImage">subpicture for the button or empty for none</param>
+ /// <returns>true : plugin needs it's own button on home
+ /// false : plugin does not need it's own button on home</returns>
+
+ public bool GetHome(out string strButtonText, out string strButtonImage,
+ out string strButtonImageFocus, out string strPictureImage) {
+ strButtonText = PluginName();
+ strButtonImage = String.Empty;
+ strButtonImageFocus = String.Empty;
+ strPictureImage = String.Empty;
+ return false;
+ }
+
+
+ #endregion
+ }
+}
\ No newline at end of file
Added: trunk/plugins/MySleepTimer/MySleepTimer/MySleepTimer.csproj
===================================================================
--- trunk/plugins/MySleepTimer/MySleepTimer/MySleepTimer.csproj (rev 0)
+++ trunk/plugins/MySleepTimer/MySleepTimer/MySleepTimer.csproj 2009-01-05 20:25:20 UTC (rev 2491)
@@ -0,0 +1,81 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{03856C9E-0926-41DB-A13A-AE3D08285428}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>MySleepTimer</RootNamespace>
+ <AssemblyName>MySleepTimer</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>false</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>none</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>.\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Core, Version=0.9.3.890, Culture=neutral, processorArchitecture=x86">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>C:\Programme\Team MediaPortal\MediaPortal\Core.dll</HintPath>
+ </Reference>
+ <Reference Include="Dialogs, Version=0.9.3.896, Culture=neutral, processorArchitecture=x86">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>C:\Programme\Team MediaPortal\MediaPortal\plugins\Windows\Dialogs.dll</HintPath>
+ </Reference>
+ <Reference Include="RemotePlugins, Version=0.9.3.900, Culture=neutral, processorArchitecture=x86">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>C:\Programme\Team MediaPortal\MediaPortal\RemotePlugins.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Windows.Forms" />
+ <Reference Include="System.Xml" />
+ <Reference Include="Utils, Version=2.2.6.879, Culture=neutral, processorArchitecture=x86">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>C:\Programme\Team MediaPortal\MediaPortal\Utils.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="MySleepTimer.cs">
+ </Compile>
+ <Compile Include="MySleepTimerConfig.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="MySleepTimerConfig.Designer.cs">
+ <DependentUpon>MySleepTimerConfig.cs</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="MySleepTimerConfig.resx">
+ <SubType>Designer</SubType>
+ <DependentUpon>MySleepTimerConfig.cs</DependentUpon>
+ </EmbeddedResource>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+ <PropertyGroup>
+ <PostBuildEvent>xcopy "$(TargetPath)" "..\..\MySleepTimer\MpiRelease" /Y</PostBuildEvent>
+ </PropertyGroup>
+</Project>
\ No newline at end of file
Added: trunk/plugins/MySleepTimer/MySleepTimer/MySleepTimerConfig.Designer.cs
===================================================================
--- trunk/plugins/MySleepTimer/MySleepTimer/MySleepTimerConfig.Designer.cs (rev 0)
+++ trunk/plugins/MySleepTimer/MySleepTimer/MySleepTimerConfig.Designer.cs 2009-01-05 20:25:20 UTC (rev 2491)
@@ -0,0 +1,239 @@
+namespace MySleepTimer {
+ 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.numericUpDownNotifyInterval = new System.Windows.Forms.NumericUpDown();
+ this.label32 = new System.Windows.Forms.Label();
+ this.label3 = new System.Windows.Forms.Label();
+ this.label5 = new System.Windows.Forms.Label();
+ this.button1 = new System.Windows.Forms.Button();
+ this.label2 = new System.Windows.Forms.Label();
+ this.comboBoxShutDownType = new System.Windows.Forms.ComboBox();
+ this.checkBoxShutDownForce = new System.Windows.Forms.CheckBox();
+ ((System.ComponentModel.ISupportInitialize)(this.numericUpDownSleepTimeMax)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.numericUpDownSleepTimeStep)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.numericUpDownNotifyInterval)).BeginInit();
+ this.SuspendLayout();
+ //
+ // comboBoxActionType
+ //
+ this.comboBoxActionType.DropDownWidth = 250;
+ this.comboBoxActionType.FormattingEnabled = true;
+ this.comboBoxActionType.Location = new System.Drawing.Point(172, 12);
+ this.comboBoxActionType.Name = "comboBoxActionType";
+ this.comboBoxActionType.Size = new System.Drawing.Size(168, 21);
+ this.comboBoxActionType.TabIndex = 0;
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(12, 15);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(143, 13);
+ this.label1.TabIndex = 1;
+ 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(172, 66);
+ this.numericUpDownSleepTimeMax.Maximum = new decimal(new int[] {
+ 500,
+ 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 = 2;
+ this.numericUpDownSleepTimeMax.Value = new decimal(new int[] {
+ 1,
+ 0,
+ 0,
+ 0});
+ //
+ // numericUpDownSleepTimeStep
+ //
+ this.numericUpDownSleepTimeStep.Increment = new decimal(new int[] {
+ 10,
+ 0,
+ 0,
+ 0});
+ this.numericUpDownSleepTimeStep.Location = new System.Drawing.Point(172, 92);
+ 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 = 3;
+ this.numericUpDownSleepTimeStep.Value = new decimal(new int[] {
+ 1,
+ 0,
+ 0,
+ 0});
+ //
+ // numericUpDownNotifyInterval
+ //
+ this.numericUpDownNotifyInterval.Increment = new decimal(new int[] {
+ 5,
+ 0,
+ 0,
+ 0});
+ this.numericUpDownNotifyInterval.Location = new System.Drawing.Point(172, 118);
+ this.numericUpDownNotifyInterval.Minimum = new decimal(new int[] {
+ 1,
+ 0,
+ 0,
+ 0});
+ this.numericUpDownNotifyInterval.Name = "numericUpDownNotifyInterval";
+ this.numericUpDownNotifyInterval.Size = new System.Drawing.Size(71, 20);
+ this.numericUpDownNotifyInterval.TabIndex = 4;
+ this.numericUpDownNotifyInterval.Value = new decimal(new int[] {
+ 1,
+ 0,
+ 0,
+ 0});
+ //
+ // label32
+ //
+ this.label32.AutoSize = true;
+ this.label32.Location = new System.Drawing.Point(23, 68);
+ this.label32.Name = "label32";
+ this.label32.Size = new System.Drawing.Size(132, 13);
+ this.label32.TabIndex = 5;
+ this.label32.Text = "Sleep time maximum (mins)";
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(41, 94);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(114, 13);
+ this.label3.TabIndex = 6;
+ this.label3.Text = "Sleep time steps (mins)";
+ //
+ // label5
+ //
+ this.label5.AutoSize = true;
+ this.label5.Location = new System.Drawing.Point(27, 120);
+ this.label5.Name = "label5";
+ this.label5.Size = new System.Drawing.Size(128, 13);
+ this.label5.TabIndex = 8;
+ this.label5.Text = "Notification Interval (mins)";
+ //
+ // button1
+ //
+ this.button1.Location = new System.Drawing.Point(293, 115);
+ this.button1.Name = "button1";
+ this.button1.Size = new System.Drawing.Size(47, 23);
+ this.button1.TabIndex = 9;
+ this.button1.Text = "OK";
+ this.button1.UseVisualStyleBackColor = true;
+ this.button1.Click += new System.EventHandler(this.button1_Click);
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.Location = new System.Drawing.Point(77, 42);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(78, 13);
+ this.label2.TabIndex = 11;
+ this.label2.Text = "Shutdown type";
+ //
+ // comboBoxShutDownType
+ //
+ this.comboBoxShutDownType.FormattingEnabled = true;
+ this.comboBoxShutDownType.Location = new System.Drawing.Point(172, 39);
+ this.comboBoxShutDownType.Name = "comboBoxShutDownType";
+ this.comboBoxShutDownType.Size = new System.Drawing.Size(115, 21);
+ this.comboBoxShutDownType.TabIndex = 10;
+ //
+ // checkBoxShutDownForce
+ //
+ this.checkBoxShutDownForce.AutoSize = true;
+ this.checkBoxShutDownForce.Location = new System.Drawing.Point(293, 41);
+ this.checkBoxShutDownForce.Name = "checkBoxShutDownForce";
+ this.checkBoxShutDownForce.Size = new System.Drawing.Size(50, 17);
+ this.checkBoxShutDownForce.TabIndex = 12;
+ this.checkBoxShutDownForce.Text = "force";
+ this.checkBoxShutDownForce.UseVisualStyleBackColor = true;
+ //
+ // MySleepTimerConfig
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(352, 150);
+ this.Controls.Add(this.checkBoxShutDownForce);
+ this.Controls.Add(this.label2);
+ this.Controls.Add(this.comboBoxShutDownType);
+ this.Controls.Add(this.button1);
+ this.Controls.Add(this.label5);
+ this.Controls.Add(this.label3);
+ this.Controls.Add(this.label32);
+ this.Controls.Add(this.numericUpDownNotifyInterval);
+ this.Controls.Add(this.numericUpDownSleepTimeStep);
+ this.Controls.Add(this.numericUpDownSleepTimeMax);
+ this.Controls.Add(this.label1);
+ this.Controls.Add(this.comboBoxActionType);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+ this.Name = "MySleepTimerConfig";
+ this.Text = "MySleepTimer - Configuration";
+ ((System.ComponentModel.ISupportInitialize)(this.numericUpDownSleepTimeMax)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.numericUpDownSleepTimeStep)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.numericUpDownNotifyInterval)).EndInit();
+ 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.NumericUpDown numericUpDownNotifyInterval;
+ private System.Windows.Forms.Label label32;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.Label label5;
+ private System.Windows.Forms.Button button1;
+ private System.Windows.Forms.Label label2;
+ private System.Windows.Forms.ComboBox comboBoxShutDownType;
+ private System.Windows.Forms.CheckBox checkBoxShutDownForce;
+ }
+}
\ No newline at end of file
Added: trunk/plugins/MySleepTimer/MySleepTimer/MySleepTimerConfig.cs
===================================================================
--- trunk/plugins/MySleepTimer/MySleepTimer/MySleepTimerConfig.cs (rev 0)
+++ trunk/plugins/MySleepTimer/MySleepTimer/MySleepTimerConfig.cs 2009-01-05 20:25:20 UTC (rev 2491)
@@ -0,0 +1,146 @@
+#region Copyright (C) 2005-2008 Team MediaPortal
+
+/*
+ * Copyright (C) 2005-2008 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 System.Collections;
+using MediaPortal.GUI.Library;
+using MediaPortal.Configuration;
+using MediaPortal.UserInterface.Controls;
+using MediaPortal.Util;
+
+
+namespace MySleepTimer {
+ public partial class MySleepTimerConfig : MPConfigForm {
+ public MySleepTimerConfig() {
+ InitializeComponent();
+ Load += new EventHandler(MySleepTimerConfig_Load);
+
+ }
+
+ void MySleepTimerConfig_Load(object sender, EventArgs e) {
+ comboBoxActionType.DataSource = GenerateActionList();
+ comboBoxActionType.DisplayMember = "ActionName";
+ comboBoxActionType.ValueMember = "ActionID";
+ comboBoxShutDownType.DataSource = GenerateShutdownList();
+ comboBoxShutDownType.DisplayMember = "ShutdownName";
+ comboBoxShutDownType.ValueMember = "ShutdownID";
+
+ using (MediaPortal.Profile.Settings xmlReader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) {
+ comboBoxActionType.SelectedValue = xmlReader.GetValueAsInt("MySleepTimer", "#MySleepTimer.ActionType", (int)(Action.ActionType.ACTION_REMOTE_YELLOW_BUTTON));
+ comboBoxShutDownType.SelectedValue = xmlReader.GetValueAsInt("MySleepTimer", "#MySleepTimer.ShutdownType", (int)RestartOptions.ShutDown);
+ checkBoxShutDownForce.Checked = xmlReader.GetValueAsBool("MySleepTimer", "#MySleepTimer.ShutdownForce", false);
+ numericUpDownSleepTimeMax.Value = xmlReader.GetValueAsInt("MySleepTimer", "#MySleepTimer.Maximum", 120);
+ numericUpDownSleepTimeStep.Value = xmlReader.GetValueAsInt("MySleepTimer", "#MySleepTimer.Step", 10);
+ numericUpDownNotifyInterval.Value = xmlReader.GetValueAsInt("MySleepTimer", "#MySleepTimer.NotifyInterval", 5);
+ }
+ }
+
+ private ArrayList GenerateActionList() {
+ ArrayList ret = new ArrayList();
+ string[] names = Enum.GetNames(typeof(Action.ActionType));
+ int[] values = (int[])Enum.GetValues(typeof(Action.ActionType));
+ for (int i = 0; i < names.Length; i++) {
+ ret.Add(new ActionEntry(names[i], values[i]));
+ //MessageBox.Show(String.Format("{0} : {1}",names[i],values[i]));
+ }
+ return ret;
+ }
+
+ private ArrayList GenerateShutdownList() {
+ ArrayList ret = new ArrayList();
+ string[] names = Enum.GetNames(typeof(RestartOptions));
+ int[] values = (int[])Enum.GetValues(typeof(RestartOptions));
+ for (int i = 0; i < names.Length; i++) {
+ ret.Add(new ShutdownEntry(names[i], values[i]));
+ //MessageBox.Show(String.Format("{0} : {1}",names[i],values[i]));
+ }
+ return ret;
+ }
+
+
+ private void button1_Click(object sender, EventArgs e) {
+ // Read configuration settings
+ using (MediaPortal.Profile.Settings xmlWriter = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) {
+ xmlWriter.SetValue("MySleepTimer", "#MySleepTimer.ActionType", comboBoxActionType.SelectedValue);
+ xmlWriter.SetValue("MySleepTimer", "#MySleepTimer.ShutdownType", comboBoxShutDownType.SelectedValue);
+ xmlWriter.SetValueAsBool("MySleepTimer", "#MySleepTimer.ShutdownForce", checkBoxShutDownForce.Checked);
+ xmlWriter.SetValue("MySleepTimer", "#MySleepTimer.Maximum", numericUpDownSleepTimeMax.Value.ToString());
+ xmlWriter.SetValue("MySleepTimer", "#MySleepTimer.Step", numericUpDownSleepTimeStep.Value.ToString());
+ xmlWriter.SetValue("MySleepTimer", "#MySleepTimer.NotifyInterval", numericUpDownNotifyInterval.Value.ToString());
+ }
+ this.Close();
+ }
+ }
+
+ class ActionEntry {
+ private string actionName;
+ private int actionID;
+
+ public string ActionName {
+ get {
+ return actionName;
+ }
+ }
+
+ public int ActionID {
+ get {
+ return actionID;
+ }
+ }
+
+ public ActionEntry(string Name, int ID) {
+
+ this.actionName = Name;
+ this.actionID = ID;
+ }
+ }
+ class ShutdownEntry {
+ private string shutdownName;
+ private int shutdownID;
+
+ public string ShutdownName {
+ get {
+ return shutdownName;
+ }
+ }
+
+ public int ShutdownID {
+ get {
+ return shutdownID;
+ }
+ }
+
+ public ShutdownEntry(string Name, int ID) {
+
+ this.shutdownName = Name;
+ this.shutdownID = ID;
+ }
+ }
+}
\ No newline at end of file
Added: trunk/plugins/MySleepTimer/MySleepTimer/MySleepTimerConfig.resx
===================================================================
--- trunk/plugins/MySleepTimer/MySleepTimer/MySleepTimerConfig.resx (rev 0)
+++ trunk/plugins/MySleepTimer/MySleepTimer/MySleepTimerConfig.resx 2009-01-05 20:25:20 UTC (rev 2491)
@@ -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
Added: trunk/plugins/MySleepTimer/MySleepTimer/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/MySleepTimer/MySleepTimer/Properties/AssemblyInfo.cs (rev 0)
+++ trunk/plugins/MySleepTimer/MySleepTimer/Properties/AssemblyInfo.cs 2009-01-05 20:25:20 UTC (rev 2491)
@@ -0,0 +1,35 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("MySleepTimer")]
+[assembly: AssemblyDescription("MediaPortal Plugin - Sleep Timer")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("private")]
+[assembly: AssemblyProduct("MySleepTimer")]
+[assembly: AssemblyCopyright("Copyright © 2008")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("216cf21b-9128-47a1-bd0f-33baa87b887...
[truncated message content] |