Exemplo n.º 1
0
 public static void SelectElement(BitmapEx bitmap, ThemeOptions themeOptions)
 {
     using (var graphics = bitmap.CreateGraphics())
         using (var pen = new Pen(themeOptions.ForegroundColor, 3))
         {
             graphics.DrawRectangle(pen, 0, 0, bitmap.Width, bitmap.Height);
         }
 }
Exemplo n.º 2
0
 public ThemeSelector(
     IOptions <ThemeOptions> themeOptionsAccessor,
     IOptions <SiteOptions> siteOptionsAccessor,
     IHttpContextAccessor httpContextAccessor)
 {
     _themeOptions = themeOptionsAccessor.Value;
     _siteOptions  = siteOptionsAccessor.Value;
     _httpContext  = httpContextAccessor.HttpContext;
 }
Exemplo n.º 3
0
 public JsonWallpaperData(ImageData[] imageData, Dictionary <string, bool> imageFolders)
 {
     //! This handles SAVING!!! | Don't go to this code segment for modifying how data is loaded!
     miscData          = new MiscData(); // values are updated in the constructor
     themeOptions      = OptionsData.ThemeOptions;
     this.imageFolders = imageFolders;
     tagData           = TaggingInfo.GetAllCategories();
     this.imageData    = imageData;
 }
Exemplo n.º 4
0
        public DrawingEngine(IDevice device, ThemeOptions themeOptions, IVisualTransitionFactory visualTransitionFactory)
        {
            _device       = device;
            _themeOptions = themeOptions;

            _imagesToDevice        = new LazyDictionary <Location, LayoutDrawElement>();
            _switchedLocations     = new ConcurrentDictionary <Location, Location>();
            _visualEffectProcessor = new VisualEffectProcessor(_device, visualTransitionFactory);
        }
Exemplo n.º 5
0
        private void ApplyThemeOption(ThemeOptions option)
        {
            if ((option & ThemeOptions.PlatformThemeEnabled) != 0)
            {
                ThemeManager.PlatformThemeEnabled = true;
            }

            if ((option & ThemeOptions.ThemeChangeSensitive) != 0)
            {
                ThemeManager.ApplicationThemeChangeSensitive = true;
            }
        }
Exemplo n.º 6
0
        public void ApplyTheme(MusicHelper musicHelper, Themes themeName)
        {
            ThemeOptions theme = GetTheme(themeName);

            musicHelper.MinimumSize = theme.WindowMinSize;
            musicHelper.MaximumSize = theme.WindowMaxSize;

            musicHelper.openButton.Size     = theme.OpenButtonSize;
            musicHelper.openButton.Location = theme.OpenButtonLocation;

            musicHelper.musicListBox.Size     = theme.musicListBoxSize;
            musicHelper.musicListBox.Location = theme.musicListBoxLocation;

            musicHelper.musicValue.Size     = theme.MusicValueSize;
            musicHelper.musicValue.Location = theme.MusicValueLocation;

            musicHelper.startButton.Size     = theme.StartButtonSize;
            musicHelper.startButton.Location = theme.StartButtonLocation;

            musicHelper.previousTrack.Size     = theme.PreviousTrackSize;
            musicHelper.previousTrack.Location = theme.PreviousTrackLocation;

            musicHelper.nextTrack.Size     = theme.NextTrackSize;
            musicHelper.nextTrack.Location = theme.NextTrackLocation;

            musicHelper.leftTrackCount.Size     = theme.LeftTrackCountSize;
            musicHelper.leftTrackCount.Location = theme.LeftTrackCountLocation;

            musicHelper.infinitiMusic.Size     = theme.InfinitiMusicSize;
            musicHelper.infinitiMusic.Location = theme.InfinitiMusicLocation;

            musicHelper.randomTrack.Size     = theme.RandomTrackSize;
            musicHelper.randomTrack.Location = theme.RandomTrackLocation;

            musicHelper.currentMomentLable.Size     = theme.CurrentMomentLableSize;
            musicHelper.currentMomentLable.Location = theme.CurrentMomentLableLocation;

            musicHelper.label1.Size     = theme.Label1Size;
            musicHelper.label1.Location = theme.Label1Location;

            musicHelper.maxLengthLabel.Size     = theme.MaxLengthLabelSize;
            musicHelper.maxLengthLabel.Location = theme.MaxLengthLabelLocation;

            musicHelper.loudTrackBar.Size     = theme.LoudTrackBarSize;
            musicHelper.loudTrackBar.Location = theme.LoudTrackBarLocation;
        }
        public ActionResult AdminMenu(ThemeOptions options)
        {
            using (var db = new DBContext())
            {
                var theme = db.ThemeOptions.FirstOrDefault(ok => ok.ID == options.ID);
                theme.BlogBossName    = options.BlogBossName;
                theme.BlogBossTitle   = options.BlogBossTitle;
                theme.BlogFooterText  = options.BlogFooterText;
                theme.BlogHeaderPhoto = options.BlogHeaderPhoto;
                db.SaveChanges();

                Session["BlogBossName"]   = options.BlogBossName;
                Session["BlogBossTitle"]  = options.BlogBossTitle;
                Session["BlogFooterText"] = options.BlogFooterText;

                return(View(theme));
            }
        }
        public ActionResult AdminMenu(ThemeOptions options)
        {
            using (UnitOfWork work = new UnitOfWork())
            {
                var theme = work.ThemeOptionsRepository.findById(options.ID);
                theme.BlogBossName    = options.BlogBossName;
                theme.BlogBossTitle   = options.BlogBossTitle;
                theme.BlogFooterText  = options.BlogFooterText;
                theme.BlogHeaderPhoto = options.BlogHeaderPhoto;

                work.ThemeOptionsRepository.update(theme);
                work.Save();

                Session["BlogBossName"]   = options.BlogBossName;
                Session["BlogBossTitle"]  = options.BlogBossTitle;
                Session["BlogFooterText"] = options.BlogFooterText;

                return(View(theme));
            }
        }
Exemplo n.º 9
0
        public static BitmapEx CreateBitmap(this IDevice device, ThemeOptions options)
        {
            var iconSize = device.IconSize;
            var result   = new BitmapEx(iconSize.Width, iconSize.Height, PixelFormat.Format24bppRgb);

            if (options.BackgroundBitmapRepresentation == null)
            {
                using (var graphics = result.CreateGraphics())
                    using (var brush = new SolidBrush(options.BackgroundColor))
                    {
                        graphics.FillRectangle(brush, 0, 0, result.Width, result.Height);
                    }
            }
            else
            {
                using (var sourceBitmap = options.BackgroundBitmapRepresentation.CreateBitmap())
                    BitmapHelpers.ResizeBitmap(sourceBitmap, result);
            }

            return(result);
        }
Exemplo n.º 10
0
 public NUIApplication(Size2D windowSize, Position2D windowPosition, ThemeOptions option) : base(new NUICoreBackend("", NUIApplication.WindowMode.Opaque, windowSize, windowPosition))
 {
     ApplyThemeOption(option);
 }
Exemplo n.º 11
0
 public NUIApplication(ThemeOptions option) : base(new NUICoreBackend())
 {
     ApplyThemeOption(option);
 }
        private void kryptonButton9_Click(object sender, EventArgs e)
        {
            ThemeOptions themeOptions = new ThemeOptions();

            themeOptions.Show();
        }
        private void kbtnThemeOptions_Click(object sender, EventArgs e)
        {
            ThemeOptions themeOptions = new ThemeOptions();

            themeOptions.Show();
        }