#develop (short for SharpDevelop) is a free IDE for .NET programming languages.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

61 lines
1.6 KiB

// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
using System;
using System.ComponentModel;
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;
namespace ICSharpCode.PythonBinding
{
public partial class PythonOptionsPanel : OptionPanel, INotifyPropertyChanged
{
PythonAddInOptions options = new PythonAddInOptions();
string pythonFileName;
string pythonLibraryPath;
public PythonOptionsPanel()
{
InitializeComponent();
this.pythonFileName = options.PythonFileName;
this.pythonLibraryPath = options.PythonLibraryPath;
this.BrowseCommand = new RelayCommand(Browse);
this.DataContext = this;
}
public ICommand BrowseCommand { get; private set; }
public string PythonFileName {
get { return pythonFileName; }
set {
pythonFileName = value;
base.RaisePropertyChanged(() => PythonFileName);
}
}
public string PythonLibraryPath {
get { return pythonLibraryPath; }
set { pythonLibraryPath = value; }
}
void Browse()
{
string str = OptionsHelper.OpenFile ("${res:SharpDevelop.FileFilter.ExecutableFiles}|*.exe","",TextBoxEditMode.EditRawProperty);
if (String.IsNullOrEmpty(str))
return;
PythonFileName = str;
}
public override bool SaveOptions()
{
options.PythonFileName = pythonFileName;
options.PythonLibraryPath = pythonLibraryPath;
return true;
}
}
}