/// <summary> /// Read config /// </summary> private void ReadUserSettings() { numericUpDown1.Value = Settings.Default.FramesPerSec; saveLocBox.Text = Settings.Default.BitmapTempLoc; langComboBox.SelectedItem = (string) Settings.Default.Language; voutLocBox.Text = Settings.Default.VideoLoc; videoTypeBox.Text = Settings.Default.VideoType; var parser = new HookParser(); var data = parser.Parse(); foreach (var item in data) { videoTypeBox.Items.Add(item.HookId); } }
/// <summary> /// Read user app settings /// </summary> private void ReadUserSettings() { Opacity = (double) Settings.Default.Opacity; saveLoc = Settings.Default.BitmapTempLoc; if (string.IsNullOrEmpty(saveLoc)) { saveLoc = Path.GetTempPath(); Settings.Default.BitmapTempLoc = saveLoc; } //create dir if necessary if (!Directory.Exists(saveLoc)) { try { Directory.CreateDirectory(saveLoc); } catch (Exception e) { log.Error("unable to create dir", e); log.Info("Setting save loction to temp dir"); saveLoc = Path.GetTempPath(); Settings.Default.BitmapTempLoc = saveLoc; } } var parser = new HookParser(); hooks = parser.Parse(); //retrive the user stored fps from the settings file config. fps = Settings.Default.FramesPerSec; }