public Settings() { InitializeComponent(); this.DataContext = CurrentModel; if (debugCheck == 1) { Debug.IsChecked = true; Texter.Clear(); } if (progressbarCheck == 1) { Pb.IsChecked = true; Texter.Clear(); } if (autoCheck == 1) { Auto.IsChecked = true; Type.IsEnabled = false; Texter.Clear(); } if (File.ReadAllText(@"EST.txt") != "") { int strings = System.IO.File.ReadAllLines("EST.txt").Length; int str = 0; int data = strings / 6; for (int path = 0; path < data; path++) { if (File.ReadLines("EST.txt").Skip(str + path).First() == "") { continue; } else { WrapPanel wrapPanel = new WrapPanel(); RadioButton rdn = new RadioButton(); if (File.ReadLines("EST.txt").Skip(str + 3).First() != "") { ImageSource image = new ImageSourceConverter().ConvertFromString(File.ReadLines("EST.txt").Skip(str + 3).First()) as ImageSource; wrapPanel.Children.Add(new Image { Source = image, Width = 17, Height = 15 }); } wrapPanel.Children.Add(new TextBlock { Text = File.ReadLines("EST.txt").Skip(str + 1).First(), Foreground = Brushes.White }); rdn.TabIndex = Int32.Parse(File.ReadLines("EST.txt").Skip(5).First()); rdn.Content = wrapPanel; rdn.Name = File.ReadLines("EST.txt").Skip(str + 1).First(); Tsys.Items.Add(rdn); str += 6; } } } foreach (UIElement uI in Tsys.Items) { if (uI is RadioButton) { ((RadioButton)uI).Checked += Sys_Checked; } } foreach (UIElement uI in Lang.Items) { if (uI is RadioButton) { ((RadioButton)uI).Checked += Lang_Checked; } } }
private void Progressbar_MouseLeave(object sender, MouseEventArgs e) { Texter.Clear(); Texter.Foreground = Brushes.White; }
private void Auto_MouseLeave(object sender, MouseEventArgs e) { Texter.Clear(); }
private void Fullscreen_MouseLeave(object sender, MouseEventArgs e) { Texter.Clear(); Texter.Foreground = Brushes.White; }