private void WindowMain_Closing(object sender, System.ComponentModel.CancelEventArgs e) { Horoscope.Properties.Settings ps = Horoscope.Properties.Settings.Default; ps.Top = this.Top; ps.Left = this.Left; ps.Save(); }
private void WindowMain_Loaded(object sender, RoutedEventArgs e) { HideFromAltTab(new WindowInteropHelper(this).Handle); Horoscope.Properties.Settings ps = Horoscope.Properties.Settings.Default; this.Top = ps.Top; this.Left = ps.Left; }
public void WriteSetting(SettingStyle style) { Horoscope.Properties.Settings ps = Horoscope.Properties.Settings.Default; ps.CurrentZodiac = currentZodiac; var converter = new BrushConverter(); ps.Background = converter.ConvertToString(border.Background); ps.WindowOrasity = gridOpacity.Opacity; ps.FontSize = WindowMain.FontSize; ps.FontName = WindowMain.FontFamily.Source; ps.FontOpacity = presentDay.Foreground.Opacity; ps.Foreground = converter.ConvertToString(presentDay.Foreground); if (WindowMain.FontStyle == FontStyles.Normal) { ps.FontStyle = "Normal"; } if (WindowMain.FontStyle == FontStyles.Italic) { ps.FontStyle = "Italic"; } if (WindowMain.FontWeight == FontWeights.Normal) { ps.FontWeight = "Normal"; } if (WindowMain.FontWeight == FontWeights.Bold) { ps.FontWeight = "Bold"; } }