Пример #1
0
        private void Choose_Background(string setting)
        {
            var image = FileSelectHandler.ChooseImageLocation();

            if (image != null)
            {
                var config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);

                config.AppSettings.Settings[setting].Value = image;

                var bmp = Initialize_Bitmap(new Uri(config.AppSettings.Settings[setting].Value), 1024, 1024);

                switch (setting)
                {
                case "gamebackground":
                    gameGrid.Background.SetValue(ImageBrush.ImageSourceProperty, bmp);
                    break;

                case "websitebackground":
                    websiteGrid.Background.SetValue(ImageBrush.ImageSourceProperty, bmp);
                    break;

                case "eventbackground":
                    menuPanel.Background.SetValue(ImageBrush.ImageSourceProperty, bmp);
                    break;

                default:
                    break;
                }

                config.Save();
            }
        }
Пример #2
0
        public void ChooseDetailsImage()
        {
            var path = FileSelectHandler.ChooseImageLocation();

            if (path != null)
            {
                DetailsImageLocation = path;
            }
        }
Пример #3
0
        public void ChooseImageLocation()
        {
            string path = FileSelectHandler.ChooseImageLocation();

            if (path != null)
            {
                Game.ImageLocation = IconHandler.SaveImageToLocalStorage(path);
                DisplayImage       = null;
            }
        }