private string CheckRT() { if (!string.IsNullOrEmpty(LSSettings.RTPath) && AppExists(LSSettings.RTPath)) { return(LSSettings.RTPath); } else { string rt = ProjectRT.SearchForRT(); if (rt != null) { return(rt); } else { return(""); } } }
public void ProcessFiles() { bool ask = true; if (LSSettings.UsedProgram == ProjectType.CameraRaw) { ask = false; } else if (LSSettings.UsedProgram == ProjectType.LapseStudio) { ask = true; ((ProjectLS)ProjectManager.CurrentProject).SaveFormat = LSSettings.SaveFormat; } else if (LSSettings.UsedProgram == ProjectType.RawTherapee) { if (!File.Exists(LSSettings.RTPath)) { string NewRTPath = ProjectRT.SearchForRT(); if (NewRTPath != null) { LSSettings.RTPath = NewRTPath; LSSettings.Save(); ((ProjectRT)ProjectManager.CurrentProject).RTPath = NewRTPath; } else { MsgBox.Show(Message.GetString("RawTherapee can't be found. Abort!")); return; } } ask = ((ProjectRT)ProjectManager.CurrentProject).RunRT; ((ProjectRT)ProjectManager.CurrentProject).SaveFormat = LSSettings.SaveFormat; } if (ask) { using (FileDialog fdlg = FDialog.CreateDialog(FileDialogType.SelectFolder, Message.GetString("Select Folder"))) { if (Directory.Exists(LSSettings.LastProcDir)) { fdlg.InitialDirectory = LSSettings.LastProcDir; } if (fdlg.Show() == WindowResponse.Ok) { LSSettings.LastProcDir = fdlg.SelectedPath; LSSettings.Save(); if (ProjectManager.CurrentProject.IsBrightnessCalculated) { ProjectManager.SetAltBrightness(MainGraph.Points); } ProjectManager.ProcessFiles(fdlg.SelectedPath); } } } else { if (ProjectManager.CurrentProject.IsBrightnessCalculated) { ProjectManager.SetAltBrightness(MainGraph.Points); } ProjectManager.ProcessFiles(); } SetSaveStatus(false); }