Permalink
Browse files

Merge pull request #51 from jmclocklin/master

Added an opt-in solution for issue #27 and made issue #9 significantly easier.
  • Loading branch information...
2 parents 4f3098c + e54504d commit 647720ec79299c65b6fed2d60b2caad176062744 Mark Lagendijk committed Dec 19, 2012

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -299,13 +299,29 @@ private void fileSelectOutputToolStripMenuItem_Click(object sender, EventArgs e)
DataGridViewCell cell = filesDataGridView.SelectedCells[0];
Models.File file = (Models.File)cell.OwningRow.DataBoundItem;
FileInfo fileInfo = new FileInfo(file.OutputPath);
- outputFolderBrowserDialog.SelectedPath = fileInfo.DirectoryName;
- if (outputFolderBrowserDialog.ShowDialog() == DialogResult.OK)
- {
- file.OutputPath = string.Format("{0}\\{1}", outputFolderBrowserDialog.SelectedPath, fileInfo.Name);
- filesDataGridView_DataChanged();
- Program.Settings.SaveSettings();
- }
+
+ if (!Program.Settings.UseAdvancedOutputFileSelector)
+ {
+ outputFolderBrowserDialog.SelectedPath = fileInfo.DirectoryName;
+ if (outputFolderBrowserDialog.ShowDialog() == DialogResult.OK)
+ {
+ file.OutputPath = string.Format("{0}\\{1}", outputFolderBrowserDialog.SelectedPath, fileInfo.Name);
+ filesDataGridView_DataChanged();
+ Program.Settings.SaveSettings();
+ }
+ }
+ else
+ {
+ advancedOutputFolderBrowserDialog.InitialDirectory = fileInfo.DirectoryName;
+ advancedOutputFolderBrowserDialog.FileName = fileInfo.Name;
+ if (advancedOutputFolderBrowserDialog.ShowDialog() == DialogResult.OK)
+ {
+ file.OutputPath = advancedOutputFolderBrowserDialog.FileName;
+ }
+ }
+
+ filesDataGridView_DataChanged();
+ Program.Settings.SaveSettings();
}
#endregion

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -23,6 +23,7 @@ private void loadSettings()
defaultMinifyCheckBox.Checked = Program.Settings.DefaultMinify;
compileOnSaveCheckBox.Checked = Program.Settings.CompileOnSave;
showSuccessMessagesCheckbox.Checked = Program.Settings.ShowSuccessMessages;
+ useAdvancedOutputFileSelector.Checked = Program.Settings.UseAdvancedOutputFileSelector;
}
private void saveSettings()
@@ -32,6 +33,7 @@ private void saveSettings()
Program.Settings.DefaultMinify = defaultMinifyCheckBox.Checked;
Program.Settings.CompileOnSave = compileOnSaveCheckBox.Checked;
Program.Settings.ShowSuccessMessages = showSuccessMessagesCheckbox.Checked;
+ Program.Settings.UseAdvancedOutputFileSelector = useAdvancedOutputFileSelector.Checked;
Program.Settings.SaveSettings();
}
View
@@ -19,6 +19,7 @@ public Settings()
ShowSuccessMessages = false;
StartWithWindows = true;
StartMinified = false;
+ UseAdvancedOutputFileSelector = false;
ApplyStartWithWindows();
}
@@ -27,6 +28,7 @@ public Settings()
public bool CompileOnSave { get; set; }
public bool ShowSuccessMessages { get; set; }
public bool StartMinified { get; set; }
+ public bool UseAdvancedOutputFileSelector { get; set; }
private bool startWithWindows;
public bool StartWithWindows

0 comments on commit 647720e

Please sign in to comment.