private void WallpaperConfigControl_Load(object sender, EventArgs e)
        {
            var config = WallpaperConfiguration.getWallpaperConfigurationValues();

            radioButton_leftScreen_ImageFromFolder.Checked  = !config.leftScreenStatic;
            radioButton_rightScreen_ImageFromFolder.Checked = !config.rightScreenStatic;
            textBox_Intervall_seconds.Text = config.intervall_in_seconds.ToString();
            textBox_leftScreen_XRes.Text   = config.x_resolution_left_screen.ToString();
            textBox_leftScreen_YRes.Text   = config.y_resolution_left_screen.ToString();
            textBox_rightScreen_XRes.Text  = config.x_resolution_right_screen.ToString();
            textBox_rightScreen_YRes.Text  = config.y_resolution_right_screen.ToString();
            if (config.leftScreenStatic)
            {
                textBox__leftScreen_path_staticImage.Text = config.leftScreenImageSource;
            }
            else
            {
                textBox__leftScreen_path_Folder.Text = config.leftScreenImageSource;
            }
            if (config.rightScreenStatic)
            {
                textBox__rightScreen_path_staticImage.Text = config.rightScreenImageSource;
            }
            else
            {
                textBox__rightScreen_path_Folder.Text = config.rightScreenImageSource;
            }
        }
예제 #2
0
 public WallPaperManager()
 {
     timer.AutoReset = true;
     timer.Elapsed  += new ElapsedEventHandler(timer_Elapsed);
     config          = WallpaperConfiguration.getWallpaperConfigurationValues();
     timer.Interval  = config.intervall_in_seconds * 1000;
     updateWallpaper();
 }
예제 #3
0
 public WallPaperManager(WallPaperConfigurationValues _config)
 {
     timer.AutoReset = true;
     timer.Elapsed  += new ElapsedEventHandler(timer_Elapsed);
     config          = _config;
     WallpaperConfiguration.saveNewConfig(config);
     timer.Interval = config.intervall_in_seconds * 1000;
     timer.Start();
     updateWallpaper();
 }