item.Query = query;\r
item.PictureSettings = pictureSettings;\r
MessageBox.Show("Changes to \"" + presetName + "\" Saved", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);\r
+ updateUserPresetsFile();\r
}\r
}\r
}\r
presets.Clear();\r
user_presets.Clear();\r
\r
- string filePath = string.Empty;\r
-\r
// Load in the users presets from user_presets.xml\r
- filePath = Application.StartupPath.ToString() + "\\presets.xml";\r
+ string filePath = Application.StartupPath + "\\presets.xml";\r
if (File.Exists(filePath))\r
{\r
using (FileStream strm = new FileStream(filePath, FileMode.Open, FileAccess.Read))\r
}\r
\r
// Load in the users presets from user_presets.xml\r
- filePath = Application.StartupPath.ToString() + "\\user_presets.xml";\r
+ filePath = Application.StartupPath + "\\user_presets.xml";\r
if (File.Exists(filePath))\r
{\r
using (FileStream strm = new FileStream(filePath, FileMode.Open, FileAccess.Read))\r
/// </summary>\r
private void updatePresetsFile()\r
{\r
- string userPresets = Application.StartupPath.ToString() + "\\presets.xml";\r
+ string userPresets = Application.StartupPath + "\\presets.xml";\r
try\r
{\r
using (FileStream strm = new FileStream(userPresets, FileMode.Create, FileAccess.Write))\r
}\r
catch (Exception exc)\r
{\r
- MessageBox.Show("Unable to write to the file. Please make sure the location has the correct permissions for file writing.\n Error Information: \n\n" + exc.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);\r
+ MessageBox.Show("Unable to write to the file. Please make sure the location has the correct permissions for file writing.\n Error Information: \n\n" + exc, "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);\r
}\r
}\r
\r
/// </summary>\r
private void updateUserPresetsFile()\r
{\r
- string userPresets = Application.StartupPath.ToString() + "\\user_presets.xml";\r
+ string userPresets = Application.StartupPath + "\\user_presets.xml";\r
try\r
{\r
using (FileStream strm = new FileStream(userPresets, FileMode.Create, FileAccess.Write))\r
}\r
catch (Exception exc)\r
{\r
- MessageBox.Show("Unable to write to the file. Please make sure the location has the correct permissions for file writing.\n Error Information: \n\n" + exc.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);\r
+ MessageBox.Show("Unable to write to the file. Please make sure the location has the correct permissions for file writing.\n Error Information: \n\n" + exc, "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);\r
}\r
}\r
\r