The representation of a TimerOptions used for XML serialization.
Example #1
0
        /// <summary>
        /// Sets all of the options from an instance of the <see cref="TimerOptionsInfo"/> class.
        /// </summary>
        /// <param name="info">A <see cref="TimerOptionsInfo"/>.</param>
        public void Set(TimerOptionsInfo info)
        {
            if (info == null)
            {
                throw new ArgumentNullException("info");
            }

            this.title = info.Title;
            this.alwaysOnTop = info.AlwaysOnTop;
            this.promptOnExit = info.PromptOnExit;
            this.doNotKeepComputerAwake = info.DoNotKeepComputerAwake;
            this.showTimeElapsed = info.ShowTimeElapsed;
            this.loopTimer = info.LoopTimer;
            this.popUpWhenExpired = info.PopUpWhenExpired;
            this.closeWhenExpired = info.CloseWhenExpired;
            this.shutDownWhenExpired = info.ShutDownWhenExpired;
            this.color = Color.FromIdentifier(info.ColorIdentifier);
            this.sound = Sound.FromIdentifier(info.SoundIdentifier);
            this.loopSound = info.LoopSound;
            this.windowSize = WindowSize.FromWindowSizeInfo(info.WindowSize);
        }
Example #2
0
 /// <summary>
 /// Returns a <see cref="TimerOptions"/> for the specified <see cref="TimerOptionsInfo"/>, or <c>null</c> if
 /// the specified <see cref="TimerOptionsInfo"/> is <c>null</c>.
 /// </summary>
 /// <param name="info">A <see cref="TimerOptionsInfo"/>.</param>
 /// <returns>A <see cref="TimerOptions"/> for the specified <see cref="TimerOptionsInfo"/>, or <c>null</c> if
 /// the specified <see cref="TimerOptionsInfo"/> is <c>null</c>.</returns>
 public static TimerOptions FromTimerOptionsInfo(TimerOptionsInfo info)
 {
     return info != null ? new TimerOptions(info) : null;
 }
Example #3
0
        /// <summary>
        /// Sets all of the options from an instance of the <see cref="TimerOptionsInfo"/> class.
        /// </summary>
        /// <param name="info">A <see cref="TimerOptionsInfo"/>.</param>
        public void Set(TimerOptionsInfo info)
        {
            if (info == null)
            {
                throw new ArgumentNullException("info");
            }

            this.title = info.Title;
            this.alwaysOnTop = info.AlwaysOnTop;
            this.promptOnExit = info.PromptOnExit;
            this.doNotKeepComputerAwake = info.DoNotKeepComputerAwake;
            this.showTimeElapsed = info.ShowTimeElapsed;
            this.loopTimer = info.LoopTimer;
            this.popUpWhenExpired = info.PopUpWhenExpired;
            this.closeWhenExpired = info.CloseWhenExpired;
            this.shutDownWhenExpired = info.ShutDownWhenExpired;
            this.theme = Theme.FromIdentifier(info.ThemeIdentifier);
            this.sound = Sound.FromIdentifier(info.SoundIdentifier);
            this.loopSound = info.LoopSound;
            this.windowTitleMode = info.WindowTitleMode;
            this.windowSize = WindowSize.FromWindowSizeInfo(info.WindowSize);

            this.OnPropertyChanged(
                "Title",
                "AlwaysOnTop",
                "PromptOnExit",
                "DoNotKeepComputerAwake",
                "ShowTimeElapsed",
                "LoopTimer",
                "PopUpWhenExpired",
                "CloseWhenExpired",
                "ShutDownWhenExpired",
                "Theme",
                "Sound",
                "LoopSound",
                "WindowTitleMode",
                "WindowSize");
        }
Example #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TimerOptions"/> class from a <see cref="TimerOptionsInfo"/>.
 /// </summary>
 /// <param name="info">A <see cref="TimerOptionsInfo"/>.</param>
 public TimerOptions(TimerOptionsInfo info)
 {
     this.Set(info);
 }
Example #5
0
        /// <summary>
        /// Sets all of the options from an instance of the <see cref="TimerOptionsInfo"/> class.
        /// </summary>
        /// <param name="info">A <see cref="TimerOptionsInfo"/>.</param>
        public void Set(TimerOptionsInfo info)
        {
            if (info == null)
            {
                throw new ArgumentNullException("info");
            }

            this.title = info.Title;
            this.alwaysOnTop = info.AlwaysOnTop;
            this.loopTimer = info.LoopTimer;
            this.popUpWhenExpired = info.PopUpWhenExpired;
            this.closeWhenExpired = info.CloseWhenExpired;
            this.color = Color.FromIdentifier(info.ColorIdentifier);
            this.sound = Sound.FromIdentifier(info.SoundIdentifier);
            this.loopSound = info.LoopSound;
            this.windowSize = WindowSize.FromWindowSizeInfo(info.WindowSize);
        }