public ColorOverlay(Point Origin, MaterialSkinManager.Themes Theme, MaterialForm BaseFormToOverlay, MaterialSettings pSettingsDialog) { _SettingsDialog = pSettingsDialog; _BaseForm = BaseFormToOverlay; _ThemeToApply = Theme; _Origin = Origin; applyTheme = true; 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; }
public MaterialThemeSettings(MaterialForm pBaseForm, MaterialSettings pSettings) { InitializeComponent(); _Parent = pSettings; _BaseForm = pBaseForm; tgl_Theme.Checked = SkinManager.Theme == MaterialSkinManager.Themes.DARK; Ignore = tgl_Theme.Checked; foreach (ColorSchemePreset objPrest in SkinManager.ColorSchemes.List()) { ThemePreview objPreview = new ThemePreview(objPrest); objPreview.Click += objPreview_Click; flowLayoutPanel1.Controls.Add(objPreview); } Bitmap bmp = new Bitmap(materialFloatingActionButton1.Width, materialFloatingActionButton1.Height); Graphics g = Graphics.FromImage(bmp); Pen p = new Pen(Brushes.White, 6); g.DrawLine(p, new Point(0, bmp.Height / 2), new Point(bmp.Width, bmp.Height / 2)); g.DrawLine(p, new Point(bmp.Width / 2, 0), new Point(bmp.Width / 2, bmp.Height)); materialFloatingActionButton1.Icon = bmp; }
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); }