/// <summary>
        /// Initializes a new instance of the <see cref="ThemePreview"/> class.
        /// </summary>
        /// <param name="SchemeToPreview">The scheme to preview.</param>
        public ThemePreview(ColorSchemePreset SchemeToPreview)
        {
            PreviewPreset = SchemeToPreview;

            DoubleBuffered = true;
            SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            Size        = new Size(200, 110);
            TopDark     = new Rectangle(0, 0, 200, 20);
            TopDefault  = new Rectangle(0, TopDark.Bottom, 200, 60);
            Fab         = new Rectangle(Width - 60, TopDefault.Bottom - 20, 40, 40);
            PrimaryDark = new SolidBrush(((int)PreviewPreset.DarkPrimaryColor).ToColor());
            Primary     = new SolidBrush(((int)PreviewPreset.PrimaryColor).ToColor());
            Accent      = new SolidBrush(((int)PreviewPreset.AccentColor).ToColor());
            Text        = new SolidBrush(((int)PreviewPreset.TextShade).ToColor());
        }
Beispiel #2
0
 public ColorOverlay(Point Origin, ColorSchemePreset Theme, MaterialForm BaseFormToOverlay, MaterialSettings pSettingsDialog)
 {
     _SettingsDialog     = pSettingsDialog;
     _ColorSchemeToApply = Theme;
     _Origin             = Origin;
     _BaseForm           = BaseFormToOverlay;
     GenerateOriginalBitmap();
     BackgroundImage = Original;
     applyTheme      = false;
     FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
     InitializeComponent();
     objAnimationManager = new AnimationManager()
     {
         Increment     = 0.015,
         AnimationType = AnimationType.EaseInOut
     };
     DoubleBuffered = true;
     objAnimationManager.OnAnimationProgress += sender => Invalidate();
     objAnimationManager.OnAnimationFinished += objAnimationManager_OnAnimationFinished;
     _ColorSchemePen = new Pen(new SolidBrush(((int)_ColorSchemeToApply.PrimaryColor).ToColor()), 25);
 }