Esempio n. 1
0
        //Selection changes on picture combobox
        private void picPostionComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ComboBox selection = (ComboBox)sender;

            switch (selection.SelectedValue.ToString())
            {
            case "Centered":
                PictureStyle = WinConfigWrapper.Style.Centered;
                break;

            case "Fill":
                PictureStyle = WinConfigWrapper.Style.Fill;
                break;

            case "Fit":
                PictureStyle = WinConfigWrapper.Style.Fit;
                break;

            case "Span":
                PictureStyle = WinConfigWrapper.Style.Span;
                break;

            case "Stretched":
                PictureStyle = WinConfigWrapper.Style.Stretched;
                break;

            case "Tiled":
                PictureStyle = WinConfigWrapper.Style.Tiled;
                break;

            default:
                PictureStyle = WinConfigWrapper.Style.Centered;
                break;
            }
        }
Esempio n. 2
0
        //Control panel is deactivated
        void controlPanel_Deactivated(object sender, EventArgs e)
        {
            //Get config info from control panel on deactivation
            query          = controlPanel.SearchTerm;
            timer.Interval = new TimeSpan(0, 0, controlPanel.PictureTimeout);
            wallpaperStyle = controlPanel.PictureStyle;
            WinConfigWrapper.SetWallPaperStyle(wallpaperStyle);

            //If the query has changed then reload
            if (previousQuery != query)
            {
                RESET_IMAGE_FLAG     = true;
                persistentImageCount = 0;
                AdvanceImages();
                previousQuery = query;
            }
        }
Esempio n. 3
0
        //Control panel is deactivated
        void controlPanel_Deactivated(object sender, EventArgs e)
        {
            //Get config info from control panel on deactivation
            query = controlPanel.SearchTerm;
            timer.Interval = new TimeSpan(0, 0, controlPanel.PictureTimeout);
            wallpaperStyle = controlPanel.PictureStyle;
            WinConfigWrapper.SetWallPaperStyle(wallpaperStyle);

            //If the query has changed then reload
            if(previousQuery != query)
            {
                RESET_IMAGE_FLAG = true;
                persistentImageCount = 0;
                AdvanceImages();
                previousQuery = query;
            }
        }