public void reloadSettings() { rtb_note.FontFamily = (FontFamily)Properties.Settings.Default["FontFamily"]; rtb_note.FontSize = (double)Properties.Settings.Default["Size"]; rtb_note.FontWeight = ((bool)Properties.Settings.Default["Bold"]) ? FontWeights.Bold : FontWeights.Normal; rtb_note.FontStyle = ((bool)Properties.Settings.Default["Italic"]) ? FontStyles.Italic : FontStyles.Normal; ThemeModel th = theme_list.Find(q => q.Name == Properties.Settings.Default["Theme"].ToString()); rtb_note.Background = th.TH_background; rtb_note.Foreground = th.TH_foreground; }
private void MyWindow_Loaded(object sender, RoutedEventArgs e) { rtb_note.FontFamily = (FontFamily)Properties.Settings.Default["FontFamily"]; rtb_note.FontSize = (double)Properties.Settings.Default["Size"]; rtb_note.FontWeight = ((bool)Properties.Settings.Default["Bold"]) ? FontWeights.Bold : FontWeights.Normal; rtb_note.FontStyle = ((bool)Properties.Settings.Default["Italic"]) ? FontStyles.Italic : FontStyles.Normal; ThemeModel th = theme_list.Find(q => q.Name == Properties.Settings.Default["Theme"].ToString()); rtb_note.Background = th.TH_background; rtb_note.Foreground = th.TH_foreground; }