diff --git a/src/AddIns/Analysis/CodeAnalysis/Src/AnalysisIdeOptionsPanel.xaml.cs b/src/AddIns/Analysis/CodeAnalysis/Src/AnalysisIdeOptionsPanel.xaml.cs index 655d6b3ca1..5d7e1e4097 100644 --- a/src/AddIns/Analysis/CodeAnalysis/Src/AnalysisIdeOptionsPanel.xaml.cs +++ b/src/AddIns/Analysis/CodeAnalysis/Src/AnalysisIdeOptionsPanel.xaml.cs @@ -10,6 +10,7 @@ using System.IO; using ICSharpCode.Core; using ICSharpCode.SharpDevelop.Gui; using ICSharpCode.SharpDevelop.Gui.OptionPanels; +using ICSharpCode.SharpDevelop.Project; namespace ICSharpCode.CodeAnalysis { @@ -39,7 +40,7 @@ namespace ICSharpCode.CodeAnalysis private void FindFxCopPath_Click(object sender, System.Windows.RoutedEventArgs e) { - string fn = OptionsHelper.OpenFile("${res:SharpDevelop.FileFilter.ExecutableFiles}|*.exe;"); + string fn = OptionsHelper.OpenFile("${res:SharpDevelop.FileFilter.ExecutableFiles}|*.exe;","",TextBoxEditMode.EditRawProperty); if (!String.IsNullOrEmpty(fn)) { string path = Path.GetDirectoryName(fn); if (FxCopWrapper.IsFxCopPath(path)) { diff --git a/src/AddIns/Analysis/SourceAnalysis/Src/AnalysisIdeOptionsPanel.xaml.cs b/src/AddIns/Analysis/SourceAnalysis/Src/AnalysisIdeOptionsPanel.xaml.cs index 97f15e53c9..c931ee0a1b 100644 --- a/src/AddIns/Analysis/SourceAnalysis/Src/AnalysisIdeOptionsPanel.xaml.cs +++ b/src/AddIns/Analysis/SourceAnalysis/Src/AnalysisIdeOptionsPanel.xaml.cs @@ -20,6 +20,7 @@ using System.Windows.Media; using ICSharpCode.Core; using ICSharpCode.SharpDevelop.Gui; using ICSharpCode.SharpDevelop.Gui.OptionPanels; +using ICSharpCode.SharpDevelop.Project; namespace ICSharpCode.SourceAnalysis { @@ -62,7 +63,7 @@ namespace ICSharpCode.SourceAnalysis private void FindStyleCopPath_Click(object sender, System.Windows.RoutedEventArgs e) { string filter = StringParser.Parse("StyleCop|*" + StyleCopWrapper.STYLE_COP_FILE + "|${res:SharpDevelop.FileFilter.AllFiles}|*.*"); - string path = OptionsHelper.OpenFile(filter); + string path = OptionsHelper.OpenFile(filter,"",TextBoxEditMode.EditRawProperty); if (!String.IsNullOrEmpty(path)) { if (StyleCopWrapper.IsStyleCopPath(path)) { StyleCopPath = path; diff --git a/src/AddIns/Analysis/SourceAnalysis/Src/AnalysisOptionsPanel.xaml.cs b/src/AddIns/Analysis/SourceAnalysis/Src/AnalysisOptionsPanel.xaml.cs index 1b6bdaede8..86729d25e2 100644 --- a/src/AddIns/Analysis/SourceAnalysis/Src/AnalysisOptionsPanel.xaml.cs +++ b/src/AddIns/Analysis/SourceAnalysis/Src/AnalysisOptionsPanel.xaml.cs @@ -50,7 +50,7 @@ namespace ICSharpCode.SourceAnalysis void BrowseButton_Click(object sender, RoutedEventArgs e) { - var fn = OptionsHelper.OpenFile(String.Empty); + var fn = OptionsHelper.OpenFile(String.Empty,"",TextBoxEditMode.EditRawProperty); if (!String.IsNullOrEmpty(fn)) { settingsFileTextBox.Text = fn; } diff --git a/src/AddIns/BackendBindings/CppBinding/CppBinding/Project/ApplicationOptions.cs b/src/AddIns/BackendBindings/CppBinding/CppBinding/Project/ApplicationOptions.cs index 8e3f886693..a38533c45e 100644 --- a/src/AddIns/BackendBindings/CppBinding/CppBinding/Project/ApplicationOptions.cs +++ b/src/AddIns/BackendBindings/CppBinding/CppBinding/Project/ApplicationOptions.cs @@ -346,7 +346,7 @@ namespace ICSharpCode.CppBinding.Project void ApplicationIconButton_Click(object sender, RoutedEventArgs e) { - string fileName = OptionsHelper.OpenFile(iconsfilter); + string fileName = OptionsHelper.OpenFile(iconsfilter,base.BaseDirectory,TextBoxEditMode.EditRawProperty); if (!String.IsNullOrEmpty(fileName)) { this.applicationIconTextBox.Text = fileName; @@ -408,7 +408,7 @@ namespace ICSharpCode.CppBinding.Project void BrowseForManifest() { applicationManifestComboBox.SelectedIndex = -1; - var fileName = OptionsHelper.OpenFile(manifestFilter); + var fileName = OptionsHelper.OpenFile(manifestFilter,base.BaseDirectory,TextBoxEditMode.EditRawProperty); if (!String.IsNullOrEmpty(fileName)) { this.applicationManifestComboBox.Items.Insert(0,fileName); this.applicationManifestComboBox.SelectedIndex = 0; diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonOptionsPanel.xaml.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonOptionsPanel.xaml.cs index 928e46fdab..0b64a33df6 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonOptionsPanel.xaml.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonOptionsPanel.xaml.cs @@ -7,6 +7,7 @@ using System.Windows.Input; using ICSharpCode.SharpDevelop.Gui; using ICSharpCode.SharpDevelop.Gui.OptionPanels; +using ICSharpCode.SharpDevelop.Project; using ICSharpCode.SharpDevelop.Widgets; using SDCore = ICSharpCode.Core; @@ -44,7 +45,7 @@ namespace ICSharpCode.PythonBinding void Browse() { - string str = OptionsHelper.OpenFile ("${res:SharpDevelop.FileFilter.ExecutableFiles}|*.exe"); + string str = OptionsHelper.OpenFile ("${res:SharpDevelop.FileFilter.ExecutableFiles}|*.exe","",TextBoxEditMode.EditRawProperty); if (String.IsNullOrEmpty(str)) return; PythonFileName = str; diff --git a/src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj b/src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj index 8a8bc8fb94..58bc4f4b1e 100644 --- a/src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj +++ b/src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj @@ -28,6 +28,7 @@ v4.0 + ..\..\StartUp\Project\Resources\SharpDevelop.ico Full diff --git a/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/ApplicationSettings.xaml b/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/ApplicationSettings.xaml index c6d2754b81..8ea694e964 100644 --- a/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/ApplicationSettings.xaml +++ b/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/ApplicationSettings.xaml @@ -9,7 +9,9 @@ xmlns:core="http://icsharpcode.net/sharpdevelop/core" xmlns:optionpanels="clr-namespace:ICSharpCode.SharpDevelop.Gui.OptionPanels" xmlns:project="clr-namespace:ICSharpCode.SharpDevelop.Project"> - + @@ -59,16 +61,32 @@ - - - + + + + + + + Text="{Binding StartupObject.Value,UpdateSourceTrigger=PropertyChanged}" + IsEditable="True" + IsEnabled="False"> + - + + @@ -78,8 +96,10 @@ + VerticalAlignment="Center" + TextChanged="ApplicationIconTextBox_TextChanged" + Text="{Binding ApplicationIcon.Value,UpdateSourceTrigger=PropertyChanged}"> + @@ -93,12 +113,16 @@ - - - + + + + + diff --git a/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/ApplicationSettings.xaml.cs b/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/ApplicationSettings.xaml.cs index 0506c16ae5..71b3b5d27b 100644 --- a/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/ApplicationSettings.xaml.cs +++ b/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/ApplicationSettings.xaml.cs @@ -32,12 +32,13 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels public ApplicationSettings() { InitializeComponent(); + this.DataContext = this; } private void Initialize() { - + startupObjectComboBox.Items.Clear(); foreach (IClass c in GetPossibleStartupObjects(base.Project)) { startupObjectComboBox.Items.Add(c.FullyQualifiedName); } @@ -65,16 +66,36 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels } + private List itemsSource; + + public List ManifestItems { + get { return itemsSource; } + set { itemsSource = value; + base.RaisePropertyChanged(() => ManifestItems); + } + } + + void FillManifestCombo() { - applicationManifestComboBox.Items.Add(StringParser.Parse("${res:Dialog.ProjectOptions.ApplicationSettings.Manifest.EmbedDefault}")); - applicationManifestComboBox.Items.Add(StringParser.Parse("${res:Dialog.ProjectOptions.ApplicationSettings.Manifest.DoNotEmbedManifest}")); + itemsSource = new List(); + itemsSource.Add(StringParser.Parse("${res:Dialog.ProjectOptions.ApplicationSettings.Manifest.EmbedDefault}")); + itemsSource.Add(StringParser.Parse("${res:Dialog.ProjectOptions.ApplicationSettings.Manifest.DoNotEmbedManifest}")); foreach (string fileName in Directory.GetFiles(base.BaseDirectory, "*.manifest")) { - applicationManifestComboBox.Items.Add(Path.GetFileName(fileName)); + itemsSource.Add(Path.GetFileName(fileName)); } - applicationManifestComboBox.Items.Add(StringParser.Parse("<${res:Global.CreateButtonText}...>")); - applicationManifestComboBox.Items.Add(StringParser.Parse("<${res:Global.BrowseText}...>")); - applicationManifestComboBox.SelectedIndex = 0; + itemsSource.Add(StringParser.Parse("<${res:Global.CreateButtonText}...>")); + itemsSource.Add(StringParser.Parse("<${res:Global.BrowseText}...>")); +// applicationManifestComboBox.Items.Clear(); +// applicationManifestComboBox.Items.Add(StringParser.Parse("${res:Dialog.ProjectOptions.ApplicationSettings.Manifest.EmbedDefault}")); +// applicationManifestComboBox.Items.Add(StringParser.Parse("${res:Dialog.ProjectOptions.ApplicationSettings.Manifest.DoNotEmbedManifest}")); +// foreach (string fileName in Directory.GetFiles(base.BaseDirectory, "*.manifest")) { +// applicationManifestComboBox.Items.Add(Path.GetFileName(fileName)); +// } +// applicationManifestComboBox.Items.Add(StringParser.Parse("<${res:Global.CreateButtonText}...>")); +// applicationManifestComboBox.Items.Add(StringParser.Parse("<${res:Global.BrowseText}...>")); +// applicationManifestComboBox.ItemsSource = itemsSource; + ManifestItems = itemsSource; } @@ -82,13 +103,20 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels get { return GetProperty("AssemblyName", "", TextBoxEditMode.EditRawProperty); } } + public ProjectProperty RootNamespace { get { return GetProperty("RootNamespace", "", TextBoxEditMode.EditRawProperty); } } public ProjectProperty OutputType { - get {return GetProperty("OutputType", ICSharpCode.SharpDevelop.Project.OutputType.Exe); } + get { + return GetProperty("OutputType", ICSharpCode.SharpDevelop.Project.OutputType.Exe); } + } + + + public ProjectProperty StartupObject { + get {return GetProperty("StartupObject", "", TextBoxEditMode.EditRawProperty); } } @@ -98,7 +126,14 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels public ProjectProperty ApplicationManifest { - get { return GetProperty("ApplicationManifest", "", TextBoxEditMode.EditRawProperty); } + get { + return GetProperty("ApplicationManifest", "", TextBoxEditMode.EditRawProperty); } + } + + + public ProjectProperty NoWin32Manifest { + get { + return GetProperty("NoWin32Manifest",false); } } @@ -114,11 +149,37 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels { base.Load(project, configuration, platform); Initialize(); + if (string.IsNullOrEmpty(this.ApplicationManifest.Value)) { + if (this.NoWin32Manifest.Value) { + applicationManifestComboBox.SelectedIndex = 1; + } else { + applicationManifestComboBox.SelectedIndex = 0; + } + } + else { + applicationManifestComboBox.Text = this.ApplicationManifest.Value; + } + IsDirty = false; } protected override bool Save(MSBuildBasedProject project, string configuration, string platform) { + if (applicationManifestComboBox.SelectedIndex == 0) { + // Embed default manifest + this.NoWin32Manifest.Value = false; + this.ApplicationManifest.Value = ""; + this.NoWin32Manifest.Location = ApplicationManifest.Location; + } else if (applicationManifestComboBox.SelectedIndex == 1) { + // No manifest + this.NoWin32Manifest.Value = true; + this.ApplicationManifest.Value = ""; + this.NoWin32Manifest.Location = ApplicationManifest.Location; + } else { + ApplicationManifest.Value = applicationManifestComboBox.Text; + this.NoWin32Manifest.Value = false; + this.NoWin32Manifest.Location = ApplicationManifest.Location; + } return base.Save(project, configuration, platform); } @@ -141,12 +202,14 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels return results; } + void project_MinimumSolutionVersionChanged(object sender, EventArgs e) { // embedding manifests requires the project to target MSBuild 3.5 or higher applicationManifestComboBox.IsEnabled = base.Project.MinimumSolutionVersion >= Solution.SolutionVersionVS2008; } + #region refresh Outputpath + StartupOptions void RefreshOutputNameTextBox (object sender, TextChangedEventArgs e) @@ -182,38 +245,84 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels void ApplicationIconButton_Click(object sender, RoutedEventArgs e) { - string fileName = OptionsHelper.OpenFile(iconsfilter); + string fileName = OptionsHelper.OpenFile(iconsfilter,base.BaseDirectory,TextBoxEditMode.EditRawProperty); if (!String.IsNullOrEmpty(fileName)) { this.applicationIconTextBox.Text = fileName; } } - + void ApplicationIconTextBox_TextChanged(object sender, TextChangedEventArgs e) { if (base.Project != null) { if(FileUtility.IsValidPath(this.applicationIconTextBox.Text)) { string appIconPath = Path.Combine(base.BaseDirectory, this.applicationIconTextBox.Text); - Console.WriteLine(appIconPath); - var b = File.Exists(appIconPath); if (File.Exists(appIconPath)) { - try { - - FileStream stream = new FileStream(appIconPath, FileMode.Open, FileAccess.Read); - Image image = new Image(); - BitmapImage src = new BitmapImage(); - src.BeginInit(); - src.StreamSource = stream; - src.EndInit(); - - image.Source = src; - image.Stretch = Stretch.Uniform; + MemoryStream memoryStream = new MemoryStream(); + using (var stream = new FileStream(appIconPath, FileMode.Open, FileAccess.Read)) + { + memoryStream.SetLength(stream.Length); + stream.Read(memoryStream.GetBuffer(), 0, (int)stream.Length); + + memoryStream.Flush(); + stream.Close(); + + Image image = new Image(); + BitmapImage src = new BitmapImage(); + src.BeginInit(); + src.StreamSource = memoryStream; + src.EndInit(); + image.Source = src; + image.Stretch = Stretch.Uniform; + Image = image.Source; + } - this.applicationIconImage.Source = image.Source; - this.applicationIconImage.Stretch = Stretch.Fill; + } catch (OutOfMemoryException) { + Image = null; + MessageService.ShowErrorFormatted("${res:Dialog.ProjectOptions.ApplicationSettings.InvalidIconFile}", + FileUtility.NormalizePath(appIconPath)); + } + } else { + Image = null; + } + } + } + } + + private ImageSource image; + + public ImageSource Image { + get { return image; } + set { image = value; + base.RaisePropertyChanged(() => Image); } + } + + /* + void ApplicationIconTextBox_TextChanged(object sender, TextChangedEventArgs e) + { + if (base.Project != null) { + if(FileUtility.IsValidPath(this.applicationIconTextBox.Text)) + { + string appIconPath = Path.Combine(base.BaseDirectory, this.applicationIconTextBox.Text); + if (File.Exists(appIconPath)) { +// http://stackoverflow.com/questions/569561/dynamic-loading-of-images-in-wpf + try { + using (var stream = new FileStream(appIconPath, FileMode.Open, FileAccess.Read)) + { + Image image = new Image(); + BitmapImage src = new BitmapImage(); + src.BeginInit(); + src.StreamSource = stream; + src.EndInit(); + + image.Source = src; + image.Stretch = Stretch.Uniform; + this.applicationIconImage.Source = image.Source; + this.applicationIconImage.Stretch = Stretch.Fill; + } } catch (OutOfMemoryException) { this.applicationIconImage.Source = null; @@ -226,13 +335,14 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels } } } - + */ #endregion #region manifest void ApplicationManifestComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { + Console.WriteLine("ComboBox_SelectionChanged {0}",applicationManifestComboBox.Text); if (applicationManifestComboBox.SelectedIndex == applicationManifestComboBox.Items.Count - 2) { CreateManifest(); } else if (applicationManifestComboBox.SelectedIndex == applicationManifestComboBox.Items.Count - 1) { @@ -243,12 +353,12 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels void BrowseForManifest() { - applicationManifestComboBox.SelectedIndex = -1; - var fileName = OptionsHelper.OpenFile(manifestFilter); + var fileName = OptionsHelper.OpenFile(manifestFilter,base.BaseDirectory,TextBoxEditMode.EditRawProperty); if (!String.IsNullOrEmpty(fileName)) { - this.applicationManifestComboBox.Items.Insert(0,fileName); - this.applicationManifestComboBox.SelectedIndex = 0; + applicationManifestComboBox.Text = fileName; } + Console.WriteLine("aaa {0}",applicationManifestComboBox.Text); + Console.WriteLine("bbb {0}",ApplicationManifest.Value); } void CreateManifest() @@ -277,7 +387,8 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels FileService.OpenFile(manifestFile); - this.applicationManifestComboBox.Items.Insert(0,"app.manifest"); +// this.applicationManifestComboBox.Items.Insert(0,"app.manifest"); + ManifestItems.Insert(0,"app.manifest"); this.applicationManifestComboBox.SelectedIndex = 0; } @@ -287,13 +398,19 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels void Win32ResourceComboButton_Click(object sender, RoutedEventArgs e) { - string fileName = OptionsHelper.OpenFile(win32filter); + string fileName = OptionsHelper.OpenFile(win32filter,base.BaseDirectory,TextBoxEditMode.EditRawProperty); if (!String.IsNullOrEmpty(fileName)) { this.win32ResourceFileTextBox.Text = fileName; } } + void ApplicationManifestComboBox_LostFocus(object sender, RoutedEventArgs e) + { + Console.WriteLine("ComboBox_LostFocus {0}",applicationManifestComboBox.Text); + } + + #endregion } } diff --git a/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/OptionsHelper.cs b/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/OptionsHelper.cs index b7f38a3c8f..03783534f6 100644 --- a/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/OptionsHelper.cs +++ b/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/OptionsHelper.cs @@ -17,7 +17,7 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels public static string BrowseForFolder(string description,string baseDirectory, string startLocation,string relativeLocation, - TextBoxEditMode textBoxEditMode) + TextBoxEditMode textBoxEditMode) { string startAt = startLocation; if (!String.IsNullOrEmpty(relativeLocation)) { @@ -40,45 +40,17 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels return MSBuildInternals.Escape(path); } } - } return startLocation; } - /* - public void Event(object sender, EventArgs e) - { - string startLocation = panel.baseDirectory; - if (startLocation != null) { - string text = panel.ControlDictionary[target].Text; - if (textBoxEditMode == TextBoxEditMode.EditRawProperty) - text = MSBuildInternals.Unescape(text); - startLocation = FileUtility.GetAbsolutePath(startLocation, text); - } - - using (FolderBrowserDialog fdiag = FileService.CreateFolderBrowserDialog(description, startLocation)) { - if (fdiag.ShowDialog() == DialogResult.OK) { - string path = fdiag.SelectedPath; - if (panel.baseDirectory != null) { - path = FileUtility.GetRelativePath(panel.baseDirectory, path); - } - if (!path.EndsWith("\\") && !path.EndsWith("/")) - path += "\\"; - if (textBoxEditMode == TextBoxEditMode.EditEvaluatedProperty) { - panel.ControlDictionary[target].Text = path; - } else { - panel.ControlDictionary[target].Text = MSBuildInternals.Escape(path); - } - } - } - } - */ + /// /// Open File /// /// /// - public static string OpenFile (string filter) + public static string OpenFile (string filter,string baseDirectory,TextBoxEditMode textBoxEditMode) { var dialog = new OpenFileDialog(); if (!String.IsNullOrEmpty(filter)) { @@ -86,7 +58,15 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels } if (dialog.ShowDialog() ?? false) { - return dialog.FileName; + string fileName = dialog.FileName; + if (!String.IsNullOrEmpty(baseDirectory)) { + fileName = FileUtility.GetRelativePath(baseDirectory, fileName); + } + if (textBoxEditMode == TextBoxEditMode.EditEvaluatedProperty) { + return fileName; + } else { + return MSBuildInternals.Escape(fileName); + } } return string.Empty; } diff --git a/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/Signing.xaml.cs b/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/Signing.xaml.cs index aa2a0357a0..0d0025d953 100644 --- a/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/Signing.xaml.cs +++ b/src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/Signing.xaml.cs @@ -143,9 +143,11 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels void BrowseKeyFile() { - string str = OptionsHelper.OpenFile("${res:SharpDevelop.FileFilter.KeyFiles} (" + KeyFileExtensions + ")|" + KeyFileExtensions + "|${res:SharpDevelop.FileFilter.AllFiles}|*.*"); - if (!String.IsNullOrEmpty(str)) { - this.AssemblyOriginatorKeyFile.Value = str; + string fileName = OptionsHelper.OpenFile("${res:SharpDevelop.FileFilter.KeyFiles} (" + KeyFileExtensions + ")|" + KeyFileExtensions + "|${res:SharpDevelop.FileFilter.AllFiles}|*.*", + base.BaseDirectory, + TextBoxEditMode.EditRawProperty); + if (!String.IsNullOrEmpty(fileName)) { + this.AssemblyOriginatorKeyFile.Value = fileName; } } diff --git a/src/Main/Base/Project/Src/Gui/Dialogs/ReferenceDialog/ServiceReference/ServiceReferenceOptionsPanel..xaml.cs b/src/Main/Base/Project/Src/Gui/Dialogs/ReferenceDialog/ServiceReference/ServiceReferenceOptionsPanel..xaml.cs index e48debd877..a4d36101c2 100644 --- a/src/Main/Base/Project/Src/Gui/Dialogs/ReferenceDialog/ServiceReference/ServiceReferenceOptionsPanel..xaml.cs +++ b/src/Main/Base/Project/Src/Gui/Dialogs/ReferenceDialog/ServiceReference/ServiceReferenceOptionsPanel..xaml.cs @@ -6,6 +6,7 @@ using System.ComponentModel; using System.Windows.Input; using ICSharpCode.SharpDevelop.Gui.Dialogs.ReferenceDialog.ServiceReference; +using ICSharpCode.SharpDevelop.Project; using ICSharpCode.SharpDevelop.Widgets; using Microsoft.Win32; @@ -28,7 +29,7 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels.ServiceReference void Browse() { - string fileName = OptionsHelper.OpenFile(string.Empty); + string fileName = OptionsHelper.OpenFile(string.Empty,"",TextBoxEditMode.EditRawProperty); if (!String.IsNullOrEmpty(fileName)) { SvcUtilPath = fileName; }