Browse Source
git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@6380 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61pull/1/head
6 changed files with 138 additions and 2 deletions
@ -0,0 +1,95 @@
@@ -0,0 +1,95 @@
|
||||
<?xml version="1.0"?> |
||||
<Template originator="Matt Ward"> |
||||
<TemplateConfiguration> |
||||
<Name>${res:Templates.Project.WinFXApplication.Name}</Name> |
||||
<Category>Python</Category> |
||||
<Icon>Python.Template.WinFormsProject</Icon> |
||||
<Description>${res:Templates.Project.WinFXApplication.Description}</Description> |
||||
<SupportedTargetFrameworks>v3.0</SupportedTargetFrameworks> |
||||
</TemplateConfiguration> |
||||
|
||||
<!-- Actions --> |
||||
<Actions> |
||||
<Open filename="Window1.xaml"/> |
||||
</Actions> |
||||
|
||||
<!-- Template Content --> |
||||
<Project language="Python"> |
||||
<CreateActions> |
||||
<RunCommand path="/SharpDevelop/BackendBindings/TemplateCommands/AddDotNet35ReferencesIfTargetFrameworkIs35"/> |
||||
</CreateActions> |
||||
|
||||
<PropertyGroup> |
||||
<OutputType>WinExe</OutputType> |
||||
<MainFile>Application.py</MainFile> |
||||
<DebugInfo>True</DebugInfo> |
||||
<StartArguments>-X:Debug Application.py</StartArguments> |
||||
<StartWorkingDirectory>.\</StartWorkingDirectory> |
||||
<StartAction>Program</StartAction> |
||||
<StartProgram>${addinpath:ICSharpCode.PythonBinding}\ipy.exe</StartProgram> |
||||
</PropertyGroup> |
||||
|
||||
<PropertyGroup configuration="Release" escapeValue="false"> |
||||
<OutputType>WinExe</OutputType> |
||||
<MainFile>Application.py</MainFile> |
||||
<StartArguments>Application.py</StartArguments> |
||||
<StartWorkingDirectory>.\</StartWorkingDirectory> |
||||
<StartAction>Program</StartAction> |
||||
<StartProgram>${addinpath:ICSharpCode.PythonBinding}\ipy.exe</StartProgram> |
||||
</PropertyGroup> |
||||
|
||||
<ProjectItems> |
||||
<Reference Include="mscorlib"/> |
||||
<Reference Include="System"/> |
||||
<Reference Include="System.Data" /> |
||||
<Reference Include="System.Xml" /> |
||||
<Reference Include="PresentationCore"> |
||||
<RequiredTargetFramework>3.0</RequiredTargetFramework> |
||||
</Reference> |
||||
<Reference Include="PresentationFramework"> |
||||
<RequiredTargetFramework>3.0</RequiredTargetFramework> |
||||
</Reference> |
||||
<Reference Include="WindowsBase"> |
||||
<RequiredTargetFramework>3.0</RequiredTargetFramework> |
||||
</Reference> |
||||
<Reference Include="IronPython"> |
||||
<HintPath>${addinpath:ICSharpCode.PythonBinding}\IronPython.dll</HintPath> |
||||
</Reference> |
||||
<Reference Include="IronPython.Modules"> |
||||
<HintPath>${addinpath:ICSharpCode.PythonBinding}\IronPython.Modules.dll</HintPath> |
||||
</Reference> |
||||
</ProjectItems> |
||||
<Files> |
||||
<File |
||||
name="Application.py" |
||||
SubType="Code"> |
||||
<![CDATA[import clr |
||||
|
||||
clr.AddReference('PresentationFramework') |
||||
|
||||
from System.IO import FileMode, FileStream |
||||
from System.Windows import Application |
||||
from System.Windows.Markup import XamlReader |
||||
|
||||
stream = FileStream('Window1.xaml', FileMode.Open) |
||||
window = XamlReader.Load(stream) |
||||
app = Application() |
||||
app.Run(window) |
||||
]]></File> |
||||
<File |
||||
name="Window1.xaml" |
||||
buildAction="None" |
||||
CopyToOutputDirectory="Always" |
||||
language="XML"><![CDATA[<Window |
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||
Title="${StandardNamespace}" |
||||
Height="300" |
||||
Width="300"> |
||||
<Grid> |
||||
|
||||
</Grid> |
||||
</Window>]]></File> |
||||
</Files> |
||||
</Project> |
||||
</Template> |
@ -0,0 +1,27 @@
@@ -0,0 +1,27 @@
|
||||
<Template author="Matt Ward" version="1.0"> |
||||
<Config |
||||
name = "${res:Templates.File.WinFXWindow.Name}" |
||||
icon = "Python.Template.Form" |
||||
category = "Python" |
||||
defaultname = "Window${Number}.xaml" |
||||
language = "Python"/> |
||||
|
||||
<Description>${res:Templates.File.WinFXWindow.Description}</Description> |
||||
|
||||
<Files> |
||||
<File |
||||
name="${FullName}" |
||||
language="XML" |
||||
CopyToOutputDirectory="Always" |
||||
buildAction="None"> |
||||
<![CDATA[<Window |
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||
Title="${ClassName}" Height="300" Width="300"> |
||||
<Grid> |
||||
|
||||
</Grid> |
||||
</Window>]]></File> |
||||
</Files> |
||||
<AdditionalOptions/> |
||||
</Template> |
Loading…
Reference in new issue