private void SaveOptions_Click(object sender, RoutedEventArgs e) { try { if (Directory.Exists(this.txt_repositoryfolder.Text)) { DirectoryManager dm = DirectoryManager.GetInstance(); dm.SaveHomeFolder(this.txt_repositoryfolder.Text); FolderBrowser fb = FolderBrowser.GetInstance(); fb.ChangeHomeFolder(this.txt_repositoryfolder.Text); this.Close(); } else { MessageBox.Show("Invalid path"); } if (File.Exists(txt_imageeditor.Text)) { SettingsManager.UpdateSetting("ImageEditorPath", txt_imageeditor.Text); } else { MessageBox.Show("Invalid editor path"); } //devices int deviceid = this.DeviceCombo.SelectedIndex; Capture capture = Capture.GetInstance(); if (deviceid >= 0) { if (MultimediaUtil.VideoInputDevices[deviceid] != null) { capture.SetCaptureDevice(MultimediaUtil.VideoInputDevices[deviceid]); } } //editor } catch (Exception ex) { MessageBox.Show(ex.Message); MessageBox.Show(ex.StackTrace); throw; } }