From: <che...@us...> - 2009-06-14 13:07:50
|
Revision: 2921 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=2921&view=rev Author: chef_koch Date: 2009-06-14 13:07:48 +0000 (Sun, 14 Jun 2009) Log Message: ----------- resharped the project Modified Paths: -------------- trunk/plugins/MySleepTimer/MySleepTimer/MySleepTimer.cs trunk/plugins/MySleepTimer/MySleepTimer/MySleepTimerConfig.Designer.cs trunk/plugins/MySleepTimer/MySleepTimer/MySleepTimerConfig.cs trunk/plugins/MySleepTimer/MySleepTimer/Properties/AssemblyInfo.cs Modified: trunk/plugins/MySleepTimer/MySleepTimer/MySleepTimer.cs =================================================================== --- trunk/plugins/MySleepTimer/MySleepTimer/MySleepTimer.cs 2009-06-14 12:59:41 UTC (rev 2920) +++ trunk/plugins/MySleepTimer/MySleepTimer/MySleepTimer.cs 2009-06-14 13:07:48 UTC (rev 2921) @@ -1,339 +1,383 @@ -#region Copyright (C) 2005-2008 Team MediaPortal +#region Copyright (C) 2005-2009 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 - * - */ +// Copyright (C) 2005-2009 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.Timers; using System.Windows.Forms; -using MediaPortal.UserInterface.Controls; -using MediaPortal.GUI; +using MediaPortal.Configuration; +using MediaPortal.Dialogs; using MediaPortal.GUI.Library; +using MediaPortal.Profile; using MediaPortal.Util; -using MediaPortal.Dialogs; -using MediaPortal.Configuration; +using Timer=System.Timers.Timer; +namespace MySleepTimer +{ + [PluginIcons("MySleepTimer.img.MySleepTimer_enabled.png", "MySleepTimer.img.MySleepTimer_disabled.png")] + public class MySleepTimer : GUIWindow, ISetupForm + { + private const int SHUTDOWN_CYCLE_MS = 60*1000; + private const int SHUTDOWN_ANNOUNCE_MS = 3*1000; -namespace MySleepTimer { - [PluginIcons("MySleepTimer.img.MySleepTimer_enabled.png", "MySleepTimer.img.MySleepTimer_disabled.png")] - public class MySleepTimer : GUIWindow, ISetupForm { - const int SHUTDOWN_CYCLE_MS = 60 * 1000; - const int SHUTDOWN_ANNOUNCE_MS = 3 * 1000; + //timers + private readonly Timer timerShutDown; + private readonly Timer timerAction; + private readonly Timer timerNotify; + //MP + private GUIDialogNotify dialogSleepTimerNotify; - //timers - private System.Timers.Timer timerShutDown; - private System.Timers.Timer timerAction; - private System.Timers.Timer timerNotify; - //MP - private GUIDialogNotify dialogSleepTimerNotify; + //globals + private int sleepTimeCurrent = 0; + private bool timedOut = true; + private bool setByPlay = false; + private bool shutdowning = false; + //settings + private readonly Action.ActionType actionType = Action.ActionType.ACTION_REMOTE_YELLOW_BUTTON; + private readonly string sleepBehavior = "Shutdown"; + private readonly RestartOptions restartOption = RestartOptions.ShutDown; + private readonly bool shutdownForce = false; + private readonly int sleepTimeMaxium = 120; //(1..n) + private readonly int sleepTimeStep = 10; //(1..n) + private readonly int actionTimeOutMs = 2*1000; //(1..n * 1000) + private readonly int notifyBeforeSleep = 3; //(0..n) + private readonly int notifyInterval = 1; //(1..notifyBeforeSleep) + private readonly int notifyTimeOutMs = 3*1000; //(1..65 * 1000) - //globals - private int sleepTimeCurrent = 0; - private bool timedOut = true; - private bool setByPlay = false; - private bool shutdowning = false; - //settings - private Action.ActionType actionType = Action.ActionType.ACTION_REMOTE_YELLOW_BUTTON; - private string sleepBehavior = "Shutdown"; - private RestartOptions restartOption = RestartOptions.ShutDown; - private bool shutdownForce = false; - private int sleepTimeMaxium = 120; //(1..n) - private int sleepTimeStep = 10; //(1..n) - private int actionTimeOutMs = 2 * 1000; //(1..n * 1000) - private int notifyBeforeSleep = 3; //(0..n) - private int notifyInterval = 1; //(1..notifyBeforeSleep) - private int notifyTimeOutMs = 3 * 1000; //(1..65 * 1000) - - public MySleepTimer() { - try { - timerShutDown = new System.Timers.Timer(); - timerAction = new System.Timers.Timer(); - timerNotify = new System.Timers.Timer(); - //read settings from config - 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)); - sleepBehavior = xmlReader.GetValueAsString("MySleepTimer", "#MySleepTimer.SleepBehavior", "Shutdown"); - 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); - actionTimeOutMs = xmlReader.GetValueAsInt("MySleepTimer", "#MySleepTimer.ActionTimeOut", 2) * 1000; - notifyBeforeSleep = xmlReader.GetValueAsInt("MySleepTimer", "#MySleepTimer.NotifyBeforeSleep", 3); - notifyInterval = xmlReader.GetValueAsInt("MySleepTimer", "#MySleepTimer.NotifyInterval", 1); - notifyTimeOutMs = xmlReader.GetValueAsInt("MySleepTimer", "#MySleepTimer.NotifyTimeOut", 3) * 1000; - } - //inits - timerShutDown.Interval = SHUTDOWN_CYCLE_MS; - timerShutDown.Elapsed += new System.Timers.ElapsedEventHandler(timerShutDown_Tick); - timerAction.Interval = actionTimeOutMs; - timerAction.AutoReset = false; - timerAction.Elapsed += new System.Timers.ElapsedEventHandler(timerAction_Tick); - timerNotify.Interval = notifyTimeOutMs; - timerNotify.AutoReset = false; - timerNotify.Elapsed += new System.Timers.ElapsedEventHandler(timerNotify_Tick); - GUIWindowManager.OnNewAction += new OnActionHandler(GUIWindowManager_OnNewAction); - } - catch (Exception ex) { - //log errors here - } + public MySleepTimer() + { + try + { + timerShutDown = new Timer(); + timerAction = new Timer(); + timerNotify = new Timer(); + //read settings from config + using (Settings xmlReader = new Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) + { + actionType = + (Action.ActionType) + xmlReader.GetValueAsInt("MySleepTimer", "#MySleepTimer.ActionType", + (int) (Action.ActionType.ACTION_REMOTE_YELLOW_BUTTON)); + sleepBehavior = xmlReader.GetValueAsString("MySleepTimer", "#MySleepTimer.SleepBehavior", "Shutdown"); + 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); + actionTimeOutMs = xmlReader.GetValueAsInt("MySleepTimer", "#MySleepTimer.ActionTimeOut", 2)*1000; + notifyBeforeSleep = xmlReader.GetValueAsInt("MySleepTimer", "#MySleepTimer.NotifyBeforeSleep", 3); + notifyInterval = xmlReader.GetValueAsInt("MySleepTimer", "#MySleepTimer.NotifyInterval", 1); + notifyTimeOutMs = xmlReader.GetValueAsInt("MySleepTimer", "#MySleepTimer.NotifyTimeOut", 3)*1000; } + //inits + timerShutDown.Interval = SHUTDOWN_CYCLE_MS; + timerShutDown.Elapsed += new ElapsedEventHandler(timerShutDown_Tick); + timerAction.Interval = actionTimeOutMs; + timerAction.AutoReset = false; + timerAction.Elapsed += new ElapsedEventHandler(timerAction_Tick); + timerNotify.Interval = notifyTimeOutMs; + timerNotify.AutoReset = false; + timerNotify.Elapsed += new ElapsedEventHandler(timerNotify_Tick); + GUIWindowManager.OnNewAction += new OnActionHandler(GUIWindowManager_OnNewAction); + } + catch (Exception ex) + { + //log errors here + } + } - void GUIWindowManager_OnNewAction(Action action) { - try { - if ((action.wID == actionType) && (!shutdowning)) //action and no shutdown in progress - { - timerAction.Stop(); - timerNotify.Stop(); - if (timedOut && timerShutDown.Enabled) //1st press - { - timedOut = false; - //action - timerAction.Start(); - ShowNotifyDialog(actionTimeOutMs, string.Format("Time left: {0} min", sleepTimeCurrent)); - } - else //additional presses - { - timerShutDown.Stop(); - SetTime(); - if (sleepTimeCurrent > 0) - timerShutDown.Start(); - if ((sleepTimeCurrent > 0) && (sleepTimeCurrent <= notifyBeforeSleep) && ((notifyBeforeSleep - sleepTimeCurrent) % notifyInterval == 0)) //notify - { - timerNotify.Start(); - ShowNotifyDialog(notifyTimeOutMs, null); - } - else //action - { - timerAction.Start(); - ShowNotifyDialog(actionTimeOutMs, null); - } - } - base.OnAction(action); - } + private void GUIWindowManager_OnNewAction(Action action) + { + try + { + if ((action.wID == actionType) && (!shutdowning)) //action and no shutdown in progress + { + timerAction.Stop(); + timerNotify.Stop(); + if (timedOut && timerShutDown.Enabled) //1st press + { + timedOut = false; + //action + timerAction.Start(); + ShowNotifyDialog(actionTimeOutMs, string.Format("Time left: {0} min", sleepTimeCurrent)); + } + else //additional presses + { + timerShutDown.Stop(); + SetTime(); + if (sleepTimeCurrent > 0) + timerShutDown.Start(); + if ((sleepTimeCurrent > 0) && (sleepTimeCurrent <= notifyBeforeSleep) && + ((notifyBeforeSleep - sleepTimeCurrent)%notifyInterval == 0)) //notify + { + timerNotify.Start(); + ShowNotifyDialog(notifyTimeOutMs, null); } - catch (Exception ex) { - //log errors here + else //action + { + timerAction.Start(); + ShowNotifyDialog(actionTimeOutMs, null); } + } + base.OnAction(action); } + } + catch (Exception ex) + { + //log errors here + } + } - void timerAction_Tick(object sender, EventArgs e) { - try { - timedOut = true; - setByPlay = false; //reset play flag - //will stop after tick (AutoReset = false) - } - catch (Exception ex) { - //log errors here - } - } + private void timerAction_Tick(object sender, EventArgs e) + { + try + { + timedOut = true; + setByPlay = false; //reset play flag + //will stop after tick (AutoReset = false) + } + catch (Exception ex) + { + //log errors here + } + } - void timerNotify_Tick(object sender, EventArgs e) { - try { - timedOut = true; - //will stop after tick (AutoReset = false) - } - catch (Exception ex) { - //log errors here - } - } + private void timerNotify_Tick(object sender, EventArgs e) + { + try + { + timedOut = true; + //will stop after tick (AutoReset = false) + } + catch (Exception ex) + { + //log errors here + } + } - void timerShutDown_Tick(object sender, EventArgs e) { - try { - if (sleepTimeCurrent > 0) { - sleepTimeCurrent -= 1; - if (sleepTimeCurrent == 0) //shutdown - { - shutdowning = true; //to block action - timerShutDown.Stop(); - timerAction.Stop(); - timerNotify.Stop(); - ShowNotifyDialog(SHUTDOWN_ANNOUNCE_MS, "Time's up - Have a good night !"); - //reset globals - sleepTimeCurrent = 0; - timedOut = true; - setByPlay = false; - shutdowning = false; - switch (sleepBehavior) { - case "Shutdown": - WindowsController.ExitWindows(restartOption, shutdownForce, null); - break; - case "Exit MediaPortal": - Application.Exit(); - break; - case "Show Basic Home": - GUIWindowManager.ActivateWindow((int)Window.WINDOW_HOME, true); - break; - default: - WindowsController.ExitWindows(restartOption, shutdownForce, null); - break; - } - } - else if ((sleepTimeCurrent <= notifyBeforeSleep) && ((notifyBeforeSleep - sleepTimeCurrent) % notifyInterval == 0)) //notify - { - timerAction.Stop(); - timerNotify.Stop(); - timedOut = false; //simulate 1st press - with reset by notify timer - timerNotify.Start(); - ShowNotifyDialog(notifyTimeOutMs, null); - } - } + private void timerShutDown_Tick(object sender, EventArgs e) + { + try + { + if (sleepTimeCurrent > 0) + { + sleepTimeCurrent -= 1; + if (sleepTimeCurrent == 0) //shutdown + { + shutdowning = true; //to block action + timerShutDown.Stop(); + timerAction.Stop(); + timerNotify.Stop(); + ShowNotifyDialog(SHUTDOWN_ANNOUNCE_MS, "Time's up - Have a good night !"); + //reset globals + sleepTimeCurrent = 0; + timedOut = true; + setByPlay = false; + shutdowning = false; + switch (sleepBehavior) + { + case "Shutdown": + WindowsController.ExitWindows(restartOption, shutdownForce, null); + break; + case "Exit MediaPortal": + Application.Exit(); + break; + case "Show Basic Home": + GUIWindowManager.ActivateWindow((int) Window.WINDOW_HOME, true); + break; + default: + WindowsController.ExitWindows(restartOption, shutdownForce, null); + break; } - catch (Exception ex) { - //log errors here - } + } + else if ((sleepTimeCurrent <= notifyBeforeSleep) && ((notifyBeforeSleep - sleepTimeCurrent)%notifyInterval == 0)) + //notify + { + timerAction.Stop(); + timerNotify.Stop(); + timedOut = false; //simulate 1st press - with reset by notify timer + timerNotify.Start(); + ShowNotifyDialog(notifyTimeOutMs, null); + } } + } + catch (Exception ex) + { + //log errors here + } + } - private void SetTime() { - try { - //get remaining playtime (if any) - int totalMinutes = 0; - try { - //TO DO - add additional test here - to detect if some video play is realy in progress - string[] shortCurrentRemaining = GUIPropertyManager.GetProperty("#shortcurrentremaining").Split(new char[] { ':' }); - totalMinutes = (int.Parse(shortCurrentRemaining[0]) * 60) + int.Parse(shortCurrentRemaining[1]); - } - catch { } - - if ((totalMinutes != 0) && (sleepTimeCurrent == 0)) { - //play and additional press from "stopped" - sleepTimeCurrent = totalMinutes + 1; - setByPlay = true; //set play flag - } - else { - //other additional presses - if ((totalMinutes != 0) && (setByPlay)) { - //play and 2nd additional press - sleepTimeCurrent = 0; //prepare for standard increment - } - setByPlay = false; //reset play flag - //standard increment - sleepTimeCurrent += sleepTimeStep; - sleepTimeCurrent = (sleepTimeCurrent / sleepTimeStep) * sleepTimeStep; //normalize - if (sleepTimeCurrent > sleepTimeMaxium) - sleepTimeCurrent = 0; //overflowed; let timer be stopped - } - } - catch (Exception ex) { - //log errors here - } + private void SetTime() + { + try + { + //get remaining playtime (if any) + int totalMinutes = 0; + try + { + //TO DO - add additional test here - to detect if some video play is realy in progress + string[] shortCurrentRemaining = + GUIPropertyManager.GetProperty("#shortcurrentremaining").Split(new char[] {':'}); + totalMinutes = (int.Parse(shortCurrentRemaining[0])*60) + int.Parse(shortCurrentRemaining[1]); } - - private void ShowNotifyDialog(int timeOut, string notifyMessage) { - try { - timeOut /= 1000; //to seconds - //construct message if empty - if (notifyMessage == null) { - if (sleepTimeCurrent > 0) //running - { - if (setByPlay) //play - notifyMessage = string.Format("Sleep in: {0} min (remaining playtime)", sleepTimeCurrent); - else //standard - notifyMessage = string.Format("Sleep in: {0} min", sleepTimeCurrent); - } - else //stopped - notifyMessage = "Sleep Timer stopped !"; - } - - //show - dialogSleepTimerNotify = (GUIDialogNotify)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_NOTIFY); - dialogSleepTimerNotify.TimeOut = timeOut; - dialogSleepTimerNotify.SetImage(GUIGraphicsContext.Skin + @"\Media\MySleepTimer_logo.png"); - dialogSleepTimerNotify.SetHeading("MySleepTimer"); - dialogSleepTimerNotify.SetText(notifyMessage); - dialogSleepTimerNotify.DoModal(GUIWindowManager.ActiveWindow); - } - catch (Exception ex) { - //log errors here - } + catch + { } - #region ISetupForm Members - - // Returns the name of the plugin which is shown in the plugin menu - public string PluginName() { - return "MySleepTimer"; + if ((totalMinutes != 0) && (sleepTimeCurrent == 0)) + { + //play and additional press from "stopped" + sleepTimeCurrent = totalMinutes + 1; + setByPlay = true; //set play flag } - - // 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!)"; + else + { + //other additional presses + if ((totalMinutes != 0) && (setByPlay)) + { + //play and 2nd additional press + sleepTimeCurrent = 0; //prepare for standard increment + } + setByPlay = false; //reset play flag + //standard increment + sleepTimeCurrent += sleepTimeStep; + sleepTimeCurrent = (sleepTimeCurrent/sleepTimeStep)*sleepTimeStep; //normalize + if (sleepTimeCurrent > sleepTimeMaxium) + sleepTimeCurrent = 0; //overflowed; let timer be stopped } + } + catch (Exception ex) + { + //log errors here + } + } - // Returns the author of the plugin which is shown in the plugin menu - public string Author() { - return "Anthrax"; + private void ShowNotifyDialog(int timeOut, string notifyMessage) + { + try + { + timeOut /= 1000; //to seconds + //construct message if empty + if (notifyMessage == null) + { + if (sleepTimeCurrent > 0) //running + { + if (setByPlay) //play + notifyMessage = string.Format("Sleep in: {0} min (remaining playtime)", sleepTimeCurrent); + else //standard + notifyMessage = string.Format("Sleep in: {0} min", sleepTimeCurrent); + } + else //stopped + notifyMessage = "Sleep Timer stopped !"; } - // show the setup dialog - public void ShowPlugin() { - new MySleepTimerConfig().ShowDialog(); - } + //show + dialogSleepTimerNotify = (GUIDialogNotify) GUIWindowManager.GetWindow((int) Window.WINDOW_DIALOG_NOTIFY); + dialogSleepTimerNotify.TimeOut = timeOut; + dialogSleepTimerNotify.SetImage(GUIGraphicsContext.Skin + @"\Media\MySleepTimer_logo.png"); + dialogSleepTimerNotify.SetHeading("MySleepTimer"); + dialogSleepTimerNotify.SetText(notifyMessage); + dialogSleepTimerNotify.DoModal(GUIWindowManager.ActiveWindow); + } + catch (Exception ex) + { + //log errors here + } + } - // Indicates whether plugin can be enabled/disabled - public bool CanEnable() { - return true; - } + #region ISetupForm Members - // Get Windows-ID - public int GetWindowId() { - // WindowID of windowplugin belonging to this setup - // enter your own unique code - return 9876; - } + // Returns the name of the plugin which is shown in the plugin menu + public string PluginName() + { + return "MySleepTimer"; + } - // Indicates if plugin is enabled by default; - public bool DefaultEnabled() { - return true; - } + // 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!)"; + } - // indicates if a plugin has it's own setup screen - public bool HasSetup() { - return true; - } + // Returns the author of the plugin which is shown in the plugin menu + public string Author() + { + return "Anthrax"; + } - /// <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> + // show the setup dialog + public void ShowPlugin() + { + new MySleepTimerConfig().ShowDialog(); + } - 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; - } + // 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; + } - #endregion + // 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 Modified: trunk/plugins/MySleepTimer/MySleepTimer/MySleepTimerConfig.Designer.cs =================================================================== --- trunk/plugins/MySleepTimer/MySleepTimer/MySleepTimerConfig.Designer.cs 2009-06-14 12:59:41 UTC (rev 2920) +++ trunk/plugins/MySleepTimer/MySleepTimer/MySleepTimerConfig.Designer.cs 2009-06-14 13:07:48 UTC (rev 2921) @@ -1,358 +1,363 @@ -namespace MySleepTimer { - partial class MySleepTimerConfig { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; +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); - } + /// <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 + #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.label4 = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.label8 = new System.Windows.Forms.Label(); - this.buttonOK = new System.Windows.Forms.Button(); - 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.label6 = new System.Windows.Forms.Label(); - this.numericUpDownTimeOutB = new System.Windows.Forms.NumericUpDown(); - this.label9 = new System.Windows.Forms.Label(); - this.numericUpDownTimeOutN = new System.Windows.Forms.NumericUpDown(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownSleepTimeMax)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownSleepTimeStep)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownNotifyInterval)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownNotifyBeforeSleep)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownTimeOutB)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownTimeOutN)).BeginInit(); - this.SuspendLayout(); - // - // comboBoxActionType - // - 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[] { + /// <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.label4 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.label8 = new System.Windows.Forms.Label(); + this.buttonOK = new System.Windows.Forms.Button(); + 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.label6 = new System.Windows.Forms.Label(); + this.numericUpDownTimeOutB = new System.Windows.Forms.NumericUpDown(); + this.label9 = new System.Windows.Forms.Label(); + this.numericUpDownTimeOutN = new System.Windows.Forms.NumericUpDown(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownSleepTimeMax)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownSleepTimeStep)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownNotifyInterval)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownNotifyBeforeSleep)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownTimeOutB)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownTimeOutN)).BeginInit(); + this.SuspendLayout(); + // + // comboBoxActionType + // + 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(169, 87); - this.numericUpDownSleepTimeMax.Maximum = new decimal(new int[] { + this.numericUpDownSleepTimeMax.Location = new System.Drawing.Point(169, 87); + this.numericUpDownSleepTimeMax.Maximum = new decimal(new int[] { 1440, 0, 0, 0}); - this.numericUpDownSleepTimeMax.Minimum = new decimal(new int[] { + 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[] { + 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(169, 113); - this.numericUpDownSleepTimeStep.Minimum = new decimal(new int[] { + // + // numericUpDownSleepTimeStep + // + this.numericUpDownSleepTimeStep.Location = new System.Drawing.Point(169, 113); + 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[] { + 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}); - // - // numericUpDownNotifyInterval - // - this.numericUpDownNotifyInterval.Location = new System.Drawing.Point(169, 191); - this.numericUpDownNotifyInterval.Minimum = new decimal(new int[] { + // + // numericUpDownNotifyInterval + // + this.numericUpDownNotifyInterval.Location = new System.Drawing.Point(169, 191); + 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 = 45; - this.numericUpDownNotifyInterval.Value = new decimal(new int[] { + this.numericUpDownNotifyInterval.Name = "numericUpDownNotifyInterval"; + this.numericUpDownNotifyInterval.Size = new System.Drawing.Size(71, 20); + this.numericUpDownNotifyInterval.TabIndex = 45; + this.numericUpDownNotifyInterval.Value = new decimal(new int[] { 1, 0, 0, 0}); - this.numericUpDownNotifyInterval.ValueChanged += new System.EventHandler(this.numericUpDownNotifyInterval_ValueChanged); - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(53, 89); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(105, 13); - this.label4.TabIndex = 0; - this.label4.Text = "Sleep time maximum:"; - // - // label5 - // - this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(71, 115); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(87, 13); - this.label5.TabIndex = 0; - this.label5.Text = "Sleep time steps:"; - // - // label8 - // - this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(57, 193); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(101, 13); - this.label8.TabIndex = 0; - this.label8.Text = "Notification Interval:"; - // - // buttonOK - // - this.buttonOK.Location = new System.Drawing.Point(290, 214); - this.buttonOK.Name = "buttonOK"; - this.buttonOK.Size = new System.Drawing.Size(47, 23); - this.buttonOK.TabIndex = 55; - this.buttonOK.Text = "OK"; - this.buttonOK.UseVisualStyleBackColor = true; - this.buttonOK.Click += new System.EventHandler(this.button1_Click); - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(77, 63); - 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.FormattingEnabled = true; - this.comboBoxShutDownType.Location = new System.Drawing.Point(169, 60); - this.comboBoxShutDownType.Name = "comboBoxShutDownType"; - this.comboBoxShutDownType.Size = new System.Drawing.Size(115, 21); - this.comboBoxShutDownType.TabIndex = 15; - // - // checkBoxShutDownForce - // - this.checkBoxShutDownForce.AutoSize = true; - this.checkBoxShutDownForce.Location = new System.Drawing.Point(290, 62); - 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(9, 167); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(149, 13); - this.label7.TabIndex = 0; - this.label7.Text = "Start notification prior to sleep:"; - // - // numericUpDownNotifyBeforeSleep - // - this.numericUpDownNotifyBeforeSleep.Location = new System.Drawing.Point(169, 165); - 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.DropDownWidth = 250; - this.comboBoxSleepBehavior.FormattingEnabled = true; - this.comboBoxSleepBehavior.Items.AddRange(new object[] { + this.numericUpDownNotifyInterval.ValueChanged += new System.EventHandler(this.numericUpDownNotifyInterval_ValueChanged); + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(53, 89); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(105, 13); + this.label4.TabIndex = 0; + this.label4.Text = "Sleep time maximum:"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(71, 115); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(87, 13); + this.label5.TabIndex = 0; + this.label5.Text = "Sleep time steps:"; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(57, 193); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(101, 13); + this.label8.TabIndex = 0; + this.label8.Text = "Notification Interval:"; + // + // buttonOK + // + this.buttonOK.Location = new System.Drawing.Point(290, 214); + this.buttonOK.Name = "buttonOK"; + this.buttonOK.Size = new System.Drawing.Size(47, 23); + this.buttonOK.TabIndex = 55; + this.buttonOK.Text = "OK"; + this.buttonOK.UseVisualStyleBackColor = true; + this.buttonOK.Click += new System.EventHandler(this.button1_Click); + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(77, 63); + 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.FormattingEnabled = true; + this.comboBoxShutDownType.Location = new System.Drawing.Point(169, 60); + this.comboBoxShutDownType.Name = "comboBoxShutDownType"; + this.comboBoxShutDownType.Size = new System.Drawing.Size(115, 21); + this.comboBoxShutDownType.TabIndex = 15; + // + // checkBoxShutDownForce + // + this.checkBoxShutDownForce.AutoSize = true; + this.checkBoxShutDownForce.Location = new System.Drawing.Point(290, 62); + 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(9, 167); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(149, 13); + this.label7.TabIndex = 0; + this.label7.Text = "Start notification prior to sleep:"; + // + // numericUpDownNotifyBeforeSleep + // + this.numericUpDownNotifyBeforeSleep.Location = new System.Drawing.Point(169, 165); + 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.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); - // - // label6 - // - this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(60, 141); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(98, 13); - this.label6.TabIndex = 0; - this.label6.Text = "Button TimeOut [s]:"; - // - // numericUpDownTimeOutB - // - this.numericUpDownTimeOutB.Location = new System.Drawing.Point(169, 139); - this.numericUpDownTimeOutB.Minimum = new decimal(new int[] { + 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); + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(60, 141); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(98, 13); + this.label6.TabIndex = 0; + this.label6.Text = "Button TimeOut [s]:"; + // + // numericUpDownTimeOutB + // + this.numericUpDownTimeOutB.Location = new System.Drawing.Point(169, 139); + this.numericUpDownTimeOutB.Minimum = new decimal(new int[] { 1, 0, 0, 0}); - this.numericUpDownTimeOutB.Name = "numericUpDownTimeOutB"; - this.numericUpDownTimeOutB.Size = new System.Drawing.Size(71, 20); - this.numericUpDownTimeOutB.TabIndex = 35; - this.numericUpDownTimeOutB.Value = new decimal(new int[] { + this.numericUpDownTimeOutB.Name = "numericUpDownTimeOutB"; + this.numericUpDownTimeOutB.Size = new System.Drawing.Size(71, 20); + this.numericUpDownTimeOutB.TabIndex = 35; + this.numericUpDownTimeOutB.Value = new decimal(new int[] { 1, 0, 0, 0}); - // - // label9 - // - this.label9.AutoSize = true; - this.label9.Location = new System.Drawing.Point(38, 219); - 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(169, 217); - this.numericUpDownTimeOutN.Maximum = new decimal(new int[] { + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(38, 219); + 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(169, 217); + this.numericUpDownTimeOutN.Maximum = new decimal(new int[] { 65, 0, 0, 0}); - this.numericUpDownTimeOutN.Minimum = new decimal(new int[] { + 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[] { + 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}); - // - // MySleepTimerConfig - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(348, 243); - this.Controls.Add(this.label9); - this.Controls.Add(this.numericUpDownTimeOutN); - this.Controls.Add(this.label6); - this.Controls.Add(this.numericUpDownTimeOutB); - this.Controls.Add(this.comboBoxSleepBehavior); - this.Controls.Add(this.label2); - this.Controls.Add(this.label7); - this.Controls.Add(this.numericUpDownNotifyBeforeSleep); - this.Controls.Add(this.checkBoxShutDownForce); - this.Controls.Add(this.label3); - this.Controls.Add(this.comboBoxShutDownType); - this.Controls.Add(this.buttonOK); - this.Controls.Add(this.label8); - this.Controls.Add(this.label5); - this.Controls.Add(this.label4); - 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(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownNotifyBeforeSleep)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownTimeOutB)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownTimeOutN)).EndInit(); - this.ResumeLayout(false); - this.PerformLayout(); + // + // MySleepTimerConfig + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(348, 243); + this.Controls.Add(this.label9); + this.Controls.Add(this.numericUpDownTimeOutN); + this.Controls.Add(this.label6); + this.Controls.Add(this.numericUpDownTimeOutB); + this.Controls.Add(this.comboBoxSleepBehavior); + this.Controls.Add(this.label2); + this.Controls.Add(this.label7); + this.Controls.Add(this.numericUpDownNotifyBeforeSleep); + this.Controls.Add(this.checkBoxShutDownForce); + this.Controls.Add(this.label3); + this.Controls.Add(this.comboBoxShutDownType); + this.Controls.Add(this.buttonOK); + this.Controls.Add(this.label8); + this.Controls.Add(this.label5); + this.Controls.Add(this.label4); + 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(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownNotifyBeforeSleep)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownTimeOutB)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownTimeOutN)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); - } + } - #endregion + #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 label4; - private System.Windows.Forms.Label label5; - private System.Windows.Forms.Label label8; - private System.Windows.Forms.Button buttonOK; - 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 label6; - private System.Windows.Forms.NumericUpDown numericUpDownTimeOutB; - private System.Windows.Forms.Label label9; - private System.Windows.Forms.NumericUpDown numericUpDownTimeOutN; - } + 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 label4; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label8; + private System.Windows.F... [truncated message content] |