Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

remove unused *.xrfm File, small cleanup in PythonBinding

  • Loading branch information...
commit 8af15ec0d2fc1f408e01e0c61b2cd815647d3b90 1 parent 585bb4e
@PeterForstmeier PeterForstmeier authored
View
5 src/AddIns/BackendBindings/Python/PythonBinding/Project/PythonBinding.csproj
@@ -214,7 +214,6 @@
<None Include="PythonBinding.addin">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
- <EmbeddedResource Include="Resources\PythonOptionsPanel.xfrm" />
<EmbeddedResource Include="Resources\ApplicationSettingsPanel.xfrm" />
<EmbeddedResource Include="Resources\CompilingOptionsPanel.xfrm" />
<None Include="Templates\ConsoleProject.xpt">
@@ -276,6 +275,10 @@
<Name>ICSharpCode.SharpDevelop</Name>
<Private>False</Private>
</ProjectReference>
+ <ProjectReference Include="..\..\..\..\..\Main\Base\Project\ICSharpCode.SharpDevelop.csproj">
+ <Project>{2748AD25-9C63-4E12-877B-4DCE96FBED54}</Project>
+ <Name>ICSharpCode.SharpDevelop</Name>
+ </ProjectReference>
<ProjectReference Include="..\..\..\..\..\Main\Core\Project\ICSharpCode.Core.csproj">
<Project>{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}</Project>
<Name>ICSharpCode.Core</Name>
View
55 src/AddIns/BackendBindings/Python/PythonBinding/Project/Resources/PythonOptionsPanel.xfrm
@@ -1,55 +0,0 @@
-<Components version="1.0">
- <System.Windows.Forms.UserControl>
- <Name value="pythonOptionsPanel" />
- <ClientSize value="{Width=326, Height=308}" />
- <Controls>
- <System.Windows.Forms.GroupBox>
- <Name value="configurationGroupBox" />
- <Location value="3, 12" />
- <Text value="Python Configuration" />
- <Anchor value="Top, Left, Right" />
- <Size value="320, 229" />
- <TabIndex value="0" />
- <Controls>
- <System.Windows.Forms.TextBox>
- <Name value="pythonLibraryPathTextBox" />
- <TabIndex value="4" />
- <Location value="95, 52" />
- <Anchor value="Top, Left, Right" />
- <Size value="217, 20" />
- </System.Windows.Forms.TextBox>
- <System.Windows.Forms.Label>
- <Name value="pythonLibraryPathLabel" />
- <Location value="6, 54" />
- <Text value="Path:" />
- <Size value="83, 23" />
- <TabIndex value="3" />
- </System.Windows.Forms.Label>
- <System.Windows.Forms.Button>
- <Name value="browseButton" />
- <Location value="288, 25" />
- <Text value="..." />
- <Anchor value="Top, Right" />
- <UseVisualStyleBackColor value="True" />
- <Size value="24, 23" />
- <TabIndex value="2" />
- </System.Windows.Forms.Button>
- <System.Windows.Forms.TextBox>
- <Name value="pythonFileNameTextBox" />
- <TabIndex value="1" />
- <Size value="187, 20" />
- <Location value="95, 25" />
- <Anchor value="Top, Left, Right" />
- </System.Windows.Forms.TextBox>
- <System.Windows.Forms.Label>
- <Name value="commandLabel" />
- <Location value="6, 28" />
- <Text value="Command:" />
- <Size value="83, 23" />
- <TabIndex value="0" />
- </System.Windows.Forms.Label>
- </Controls>
- </System.Windows.Forms.GroupBox>
- </Controls>
- </System.Windows.Forms.UserControl>
-</Components>
View
23 src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonOptionsPanel.xaml.cs
@@ -3,12 +3,11 @@
using System;
using System.ComponentModel;
-using System.Windows.Controls;
using System.Windows.Input;
using ICSharpCode.SharpDevelop.Gui;
+using ICSharpCode.SharpDevelop.Gui.OptionPanels;
using ICSharpCode.SharpDevelop.Widgets;
-using Microsoft.Win32;
using SDCore = ICSharpCode.Core;
namespace ICSharpCode.PythonBinding
@@ -34,7 +33,7 @@ public PythonOptionsPanel()
get { return pythonFileName; }
set {
pythonFileName = value;
- OnPropertyChanged("PythonFileName");
+ base.RaisePropertyChanged(() => PythonFileName);
}
}
@@ -45,11 +44,10 @@ public PythonOptionsPanel()
void Browse()
{
- var dialog = new OpenFileDialog();
- dialog.Filter = SDCore.StringParser.Parse("${res:SharpDevelop.FileFilter.ExecutableFiles}|*.exe");
- if (dialog.ShowDialog() ?? false) {
- PythonFileName = dialog.FileName;
- }
+ var str = OptionsHelper.OpenFile (SDCore.StringParser.Parse("${res:SharpDevelop.FileFilter.ExecutableFiles}|*.exe"));
+ if (String.IsNullOrEmpty(str))
+ return;
+ PythonFileName = str;
}
public override bool SaveOptions()
@@ -58,14 +56,5 @@ public override bool SaveOptions()
options.PythonLibraryPath = pythonLibraryPath;
return true;
}
-
- public event PropertyChangedEventHandler PropertyChanged;
-
- void OnPropertyChanged(string name)
- {
- if (PropertyChanged != null) {
- PropertyChanged(this, new PropertyChangedEventArgs(name));
- }
- }
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.