-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathIronPythonConsole.xaml
More file actions
89 lines (88 loc) · 4.74 KB
/
IronPythonConsole.xaml
File metadata and controls
89 lines (88 loc) · 4.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<Window x:Class="NavisPythonShell.IronPythonConsole"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:avalonEdit="http://icsharpcode.net/sharpdevelop/avalonedit"
xmlns:console="clr-namespace:PythonConsoleControl;assembly=PythonConsoleControl"
xmlns:wpg="clr-namespace:WPG;assembly=WPG"
xmlns:pg="http://schemas.denisvuyka.wordpress.com/wpfpropertygrid"
Title="IronPython Console" Height="600" Width="850">
<!--
Copyright (c) 2010 Joe Moorhouse
-->
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="50*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="30*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid Grid.Row="0" Grid.Column="0">
<console:IronPythonConsoleControl Name="consoleControl"></console:IronPythonConsoleControl>
</Grid>
<GridSplitter Grid.Row="1" Height="10" VerticalAlignment="Center" HorizontalAlignment="Stretch"></GridSplitter>
<DockPanel Grid.Row="2" Grid.Column="0">
<ToolBar DockPanel.Dock="Top">
<ToolBar.Resources>
<Style TargetType="{x:Type Image}">
<Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type ButtonBase}, AncestorLevel=1}, Path=IsEnabled}" Value="False">
<Setter Property="Opacity" Value="0.30" />
</DataTrigger>
</Style.Triggers>
</Style>
</ToolBar.Resources>
<Button Click="openFileClick">
<Image Source="Images/Open.png" Height="16" SnapsToDevicePixels="True" ToolTip="Open Python Script"/>
</Button>
<Button Click="saveFileClick">
<Image Source="Images/Save.png" Height="16" SnapsToDevicePixels="True" ToolTip="Save This Script Into File"/>
</Button>
<Separator/>
<Button Command="Cut">
<Image Source="Images/Cut.png" Height="16" SnapsToDevicePixels="True" ToolTip="Cut Selected"/>
</Button>
<Button Command="Copy">
<Image Source="Images/Copy.png" Height="16" SnapsToDevicePixels="True" ToolTip="Copy Selected"/>
</Button>
<Button Command="Paste">
<Image Source="Images/Paste.png" Height="16" SnapsToDevicePixels="True" ToolTip="Paste Into Script Editor"/>
</Button>
<Button Command="Delete">
<Image Source="Images/Delete.png" Height="16" SnapsToDevicePixels="True" ToolTip="Delete Selected"/>
</Button>
<Separator/>
<Button Command="Undo">
<Image Source="Images/Undo.png" Height="16" SnapsToDevicePixels="True" ToolTip="Undo"/>
</Button>
<Button Command="Redo">
<Image Source="Images/Redo.png" Height="16" SnapsToDevicePixels="True" ToolTip="Redo"/>
</Button>
<Separator/>
<CheckBox IsChecked="{Binding ElementName=textEditor,Path=WordWrap}">
<Image Source="Images/WordWrap.png" Height="16" SnapsToDevicePixels="True" ToolTip="Toggle Word Wrap"/>
</CheckBox>
<CheckBox IsChecked="{Binding ElementName=textEditor,Path=ShowLineNumbers}">
<Image Source="Images/Number.png" Height="16" SnapsToDevicePixels="True" ToolTip="Toggle Line Numbers"/>
</CheckBox>
<CheckBox IsChecked="{Binding ElementName=textEditor,Path=Options.ShowEndOfLine}">
<Image Source="Images/Paragraph.png" Height="16" SnapsToDevicePixels="True" ToolTip="Toggle Show End of Line"/>
</CheckBox>
<Separator/>
<Button Click="runClick">
<Image Source="Images/Run.png" Height="16" SnapsToDevicePixels="True" ToolTip="Run Script. Results will be displayed in the IronPython prompt."/>
</Button>
</ToolBar>
<Grid DockPanel.Dock="Bottom">
<avalonEdit:TextEditor
Name="textEditor"
FontFamily="Consolas"
FontSize="10pt" GotFocus="textEditor_GotFocus"
># IronPython Pad. Write code snippets here and F5 to run.
</avalonEdit:TextEditor>
</Grid>
</DockPanel>
</Grid>
</Window>