public Updater() { InitializeComponent(); BG.BeginInit(); BG.Source = baseColora.Bgpa; BG.EndInit(); this.Background = baseColora.Tran; WindowXCaption.SetHeight(this, 0); this.MT1.Foreground = baseColora.Fg; this.MT1.FontFamily = baseColora.Fonts; this.MT1.FontSize = 15; this.T1.Foreground = baseColora.Fg; this.T1.FontFamily = baseColora.Fonts; this.T1.FontSize = 13; this.T2.Foreground = baseColora.Fg; this.T2.FontFamily = baseColora.Fonts; this.T2.FontSize = 13; this.ICON.Foreground = baseColora.Fg; ButtonHelper.SetHoverBrush(ICON, baseColora.Fg); this.pbDown.Background = baseColora.DBg; this.pbDown.Foreground = baseColora.Main; ProgressBarHelper.SetCornerRadius(pbDown, 0); Thread thread = new Thread(Start); thread.Start(); }
public PassWordEnterF7() { InitializeComponent(); BG.BeginInit(); BG.Source = baseColora.Bgpa; BG.EndInit(); this.Background = baseColora.Tran; WindowXCaption.SetHeight(this, 0); this.Time.Background = baseColora.DBg; this.Time.Foreground = baseColora.Main; ProgressBarHelper.SetCornerRadius(Time, 0); Border.Background = baseColora.DBg; this.Password.Background = baseColora.DBg; this.Password.Foreground = baseColora.Fg; ButtonHelper.SetHoverBrush(B1, baseColora.Tran); this.B1.Background = baseColora.Tran; Timer timer = new Timer(); timer = new Timer(1000); timer.Elapsed += new ElapsedEventHandler(OnTimedEvent); timer.Enabled = true; }
private void UpdateTemplate() { var color = Helper.GetColorByOffset(_linearGradientBrush.GradientStops, SldTheme.Value / 7); ProgressBarHelper.SetCornerRadius(PgbCustom, SldCornerRadius.Value); if (_usingAnimation) { ProgressBarHelper.SetAnimateTo(PgbCustom, SldProgress.Value); } else { PgbCustom.Value = SldProgress.Value; } switch (ProgressBarHelper.GetProgressBarStyle(PgbCustom)) { case ProgressBarStyle.Standard: PgbCustom.Background = new Color() { A = 30, R = color.R, G = color.G, B = color.B }.ToBrush(); PgbCustom.BorderBrush = Colors.Transparent.ToBrush(); PgbCustom.Foreground = color.ToBrush(); break; case ProgressBarStyle.Ring: PgbCustom.Background = Colors.White.ToBrush(); PgbCustom.BorderBrush = new Color() { A = 30, R = color.R, G = color.G, B = color.B }.ToBrush(); PgbCustom.Foreground = color.ToBrush(); break; } }