private void setStyles() { background.Background = Styles.theme(); aTitle.Foreground = Styles.text(); aDescription.Foreground = Styles.text(); appFunctionTXT.Foreground = Styles.text(); appFunction.Background = Styles.accent(); //moreOptionsTXT.Foreground = Styles.text(); }
private void setStyles() { windowTitle.Foreground = Styles.text(); titleBar.Background = Styles.accent(); windowBorder.BorderBrush = Styles.accent(); messageBox.Foreground = Styles.text(); messageBox.CaretBrush = Styles.text(); background.Background = Styles.theme(); btnYes.Background = Styles.button(); btnCancel.Background = Styles.button(); btnNo.Background = Styles.button(); btnOk.Background = Styles.button(); btnYes.Foreground = Styles.text(); btnCancel.Foreground = Styles.text(); btnNo.Foreground = Styles.text(); btnOk.Foreground = Styles.text(); }
public NotificationBox(string text, string title, int time) { InitializeComponent(); windowBorder.Visibility = Visibility.Visible; background.Background = Styles.theme(); nTitle.Foreground = Styles.text(); nBody.Foreground = Styles.text(); backBTN.Foreground = Styles.text(); windowBorder.BorderBrush = Styles.accent(); Left = SystemParameters.WorkArea.Width - Width - 10; Top = SystemParameters.WorkArea.Height - Height - 10; nTitle.Content = title; nBody.Text = text; timeOpen = time; timeTillClose.Interval = 1000; timeTillClose.Tick += TimeTillClose_Tick; timeTillClose.Start(); Visibility = Visibility.Visible; Activate(); }
public Home() { InitializeComponent(); try { background.Background = Styles.theme(); appName.Foreground = Styles.text(); appVersion.Foreground = Styles.text(); appNameLine.Stroke = Styles.gBWHorizontal; string[] appVersionSS = FileVersionInfo.GetVersionInfo(AppDomain.CurrentDomain.BaseDirectory + "kOFRRepo.dll").FileVersion.Split('.'); appVersion.Text = $"v{appVersionSS[0]}.{appVersionSS[1]}.{appVersionSS[2]}"; List <notices> noticesInfo = JsonConvert.DeserializeObject <List <notices> >(AppLibaryWindow.updateInfoJSON); foreach (var noticeData in noticesInfo) { if (noticeData.show == true || AppLibaryWindow.startupArgs.Contains("showall")) { Grid grid = new Grid(); grid.Margin = new Thickness(15, 15, 0, 0); grid.Width = 175; grid.Height = 210; Rectangle rectangle = new Rectangle(); rectangle.Fill = Styles.button(); rectangle.RadiusX = 10; rectangle.RadiusY = 10; WrapPanel wrappanel = new WrapPanel(); wrappanel.Width = 175; wrappanel.Orientation = Orientation.Vertical; wrappanel.HorizontalAlignment = HorizontalAlignment.Left; wrappanel.VerticalAlignment = VerticalAlignment.Top; TextBlock Title = new TextBlock(); Title.Margin = new Thickness(10, 10, 0, 0); Title.Width = 155; Title.TextWrapping = TextWrapping.Wrap; Title.Text = noticeData.title; Title.FontFamily = new FontFamily("Century Gothic"); Title.FontSize = 18; Title.Foreground = Styles.text(); TextBlock body = new TextBlock(); body.Margin = new Thickness(10, 5, 0, 0); body.Width = 155; body.Height = double.NaN; body.TextWrapping = TextWrapping.Wrap; body.Text = noticeData.body; body.FontFamily = new FontFamily("Century Gothic"); body.FontSize = 12; body.Foreground = Styles.text(); wrappanel.Children.Add(Title); wrappanel.Children.Add(body); grid.Children.Add(rectangle); grid.Children.Add(wrappanel); updateWrapPanel.Children.Insert(0, grid); } } } catch (Exception ex) { LogWriter.CreateLog(ex); msgBox.Show("Failed to get alerts from server."); } }