/* * ///<summary>Returns true if the given path is part of the image paths stored in the database list, false otherwise.</summary> * public static bool IsImagePath(string path){ * string imagePaths=PrefC.GetString(PrefName.DocPath"); * return IsImagePath(path,imagePaths); * }*/ private void butOK_Click(object sender, System.EventArgs e) { //remember that user might be using a website or a linux box to store images, therefore must allow forward slashes. if (radioUseFolder.Checked) { if (textLocalPath.Text != "") { if (ImageStore.GetValidPathFromString(textLocalPath.Text) == null) { MsgBox.Show(this, "The path override for this computer is invalid. The folder must exist and must contain all 26 A through Z folders."); return; } } else if (textServerPath.Text != "") { if (ImageStore.GetValidPathFromString(textServerPath.Text) == null) { MsgBox.Show(this, "The path override for this server is invalid. The folder must exist and must contain all 26 A through Z folders."); return; } } else { if (ImageStore.GetValidPathFromString(textDocPath.Text) == null) { MsgBox.Show(this, "The path is invalid. The folder must exist and must contain all 26 A through Z folders."); return; } } } if (Prefs.UpdateBool(PrefName.AtoZfolderUsed, radioUseFolder.Checked) | Prefs.UpdateString(PrefName.DocPath, textDocPath.Text) | Prefs.UpdateString(PrefName.ExportPath, textExportPath.Text) | Prefs.UpdateString(PrefName.LetterMergePath, textLetterMergePath.Text)) { DataValid.SetInvalid(InvalidType.Prefs); } if (ImageStore.LocalAtoZpath != textLocalPath.Text) //if local path changed { ImageStore.LocalAtoZpath = textLocalPath.Text; //ComputerPref compPref=ComputerPrefs.GetForLocalComputer(); ComputerPrefs.LocalComputer.AtoZpath = ImageStore.LocalAtoZpath; ComputerPrefs.Update(ComputerPrefs.LocalComputer); } if (ReplicationServers.GetAtoZpath() != textServerPath.Text) { ReplicationServer server = ReplicationServers.GetForLocalComputer(); server.AtoZpath = textServerPath.Text; ReplicationServers.Update(server); DataValid.SetInvalid(InvalidType.ReplicationServers); } DialogResult = DialogResult.OK; }