Beispiel #1
0
        /// <summary>
        ///   Assigns all member values of this instance to the respective members of the given instance.
        /// </summary>
        /// <param name="other">
        ///   The target instance to assign to.
        /// </param>
        /// <exception cref="ArgumentNullException">
        ///   <paramref name="other" /> is <c>null</c>.
        /// </exception>
        /// <exception cref="ArgumentException">
        ///   <paramref name="other" /> is not castable to the <see cref="ScreenSettingsCollection" /> type.
        /// </exception>
        public void AssignTo(object other)
        {
            if (other == null)
            {
                throw new ArgumentNullException();
            }
            if (!(other is ScreenSettingsCollection))
            {
                throw new ArgumentException();
            }

            ScreenSettingsCollection otherInstance = (ScreenSettingsCollection)other;

            for (int i = 0; i < this.Count; i++)
            {
                if (i >= otherInstance.Count)
                {
                    otherInstance.Items.Add(this[i]);
                }
                else
                {
                    this[i].AssignTo(otherInstance[i]);
                }
            }
        }
Beispiel #2
0
 /// <summary>
 ///   Initializes a new instance of the <see cref="GeneralConfig" /> class.
 /// </summary>
 public GeneralConfig()
 {
     this.cycleAfterStartup            = false;
     this.terminateAfterStartup        = false;
     this.startAutocyclingAfterStartup = false;
     this.minimizeOnClose = false;
     this.cycleAfterDisplaySettingsChanged = false;
     this.autocycleInterval          = new TimeSpan(0, 0, 30);
     this.lastActiveListSize         = 30;
     this.wallpaperChangeType        = WallpaperChangeType.ChangeAll;
     this.wallpaperDoubleClickAction = WallpaperClickAction.ShowConfigurationWindow;
     this.trayIconSingleClickAction  = TrayIconClickAction.NoAction;
     this.trayIconDoubleClickAction  = TrayIconClickAction.ShowMainWindow;
     this.screensSettings            = new ScreenSettingsCollection();
 }
Beispiel #3
0
 /// <summary>
 ///   Initializes a new instance of the <see cref="WallpaperBuilderBase" /> class.
 /// </summary>
 /// <param name="screensSettings">
 ///   A collection of <see cref="ScreenSettings" /> objects containing the specific properties for each single screen.
 /// </param>
 /// <exception cref="ArgumentNullException">
 ///   <paramref name="screensSettings" /> is <c>null</c>.
 /// </exception>
 /// <seealso cref="ScreenSettingsCollection">ScreenSettingsCollection Class</seealso>
 /// <seealso cref="ScreenSettings">ScreenSettings Class</seealso>
 protected WallpaperBuilderBase(ScreenSettingsCollection screensSettings)
 {
     this.ScreensSettings = screensSettings;
 }
Beispiel #4
0
 public WallpaperBuilderBaseContracts(ScreenSettingsCollection screensSettings) : base(screensSettings)
 {
 }
Beispiel #5
0
 /// <summary>
 ///   Initializes a new instance of the <see cref="WallpaperBuilderAllCloned" /> class.
 /// </summary>
 /// <inheritdoc />
 public WallpaperBuilderAllCloned(ScreenSettingsCollection screensSettings) : base(screensSettings)
 {
 }
Beispiel #6
0
 /// <summary>
 ///   Initializes a new instance of the <see cref="WallpaperBuilderOneByOne" /> class.
 /// </summary>
 /// <inheritdoc />
 public WallpaperBuilderOneByOne(ScreenSettingsCollection screensSettings) : base(screensSettings)
 {
     this.LastScreenLayout = new List <Wallpaper>(Screen.AllScreens.Length);
 }