void loadSettings() { IniManip inimanip = new IniManip("/settings.ini"); FrameRateBox.Text = inimanip.Get("Settings", "FrameRate", "30"); SpeedBox.Text = inimanip.Get("Settings", "Speed", "5"); DC_box.IsChecked = inimanip.Get("Settings", "DetectScreenChange", "True").ToLower() == "true" ? true : false; DragThreshold = inimanip.GetInt("Settings", "DragThreshold", 6); area_window.Top = inimanip.GetInt("CaptureArea", "Y", 70); area_window.Left = inimanip.GetInt("CaptureArea", "X", 70); area_window.Width = inimanip.GetInt("CaptureArea", "Width", 300); area_window.Height = inimanip.GetInt("CaptureArea", "Height", 300); IniManip Lang = new IniManip("/lang.ini"); CaptureButton.Content = Lang.Get("Lang", "Capture", "Capture"); RecordButton.Content = Lang.Get("Lang", "Record", "Record"); AreaButton.Content = Lang.Get("Lang", "Area", "Area"); ProportionButtion.Content = Lang.Get("Lang", "Prop-None", "None"); frameRate_textBlock.Text = Lang.Get("Lang", "FrameRate", "FrameRate"); speed_textBlock.Text = Lang.Get("Lang", "Speed", "Speed"); DC_box.Content = Lang.Get("Lang", "DetectChange", "DetectChange"); fileNane_textBlock.Text = Lang.Get("Lang", "FileName", "FileName"); }
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { notify.Visible = false; recorder.Abort(); UI_thread.Abort(); Drag_thread.Abort(); IniManip inimanip = new IniManip("/settings.ini"); inimanip.Write("Settings", "FrameRate", FrameRateBox.Text); inimanip.Write("Settings", "Speed", SpeedBox.Text); inimanip.Write("Settings", "DetectScreenChange", DC_box.IsChecked.ToString()); inimanip.Write("Settings", "FileName", FileNameBox.Text); inimanip.Write("CaptureArea", "X", ((int)area_window.Left).ToString()); inimanip.Write("CaptureArea", "Y", ((int)area_window.Top).ToString()); inimanip.Write("CaptureArea", "Width", ((int)area_window.Width).ToString()); inimanip.Write("CaptureArea", "Height", ((int)area_window.Height).ToString()); }