-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathIronPythonConsole.xaml
More file actions
158 lines (158 loc) · 6.44 KB
/
IronPythonConsole.xaml
File metadata and controls
158 lines (158 loc) · 6.44 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<Window
x:Class="CADPythonShell.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"
Title="IronPython Console"
Width="850"
Height="600"
MinWidth="500"
MinHeight="350">
<!--
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" />
</Grid>
<GridSplitter
Grid.Row="1"
Height="10"
HorizontalAlignment="Stretch"
VerticalAlignment="Center" />
<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="newFileClick">
<Image
Height="16"
SnapsToDevicePixels="True"
Source="Images/New.png"
ToolTip="Create A New File Python Script" />
</Button>
<Button Click="openFileClick">
<Image
Height="16"
SnapsToDevicePixels="True"
Source="Images/Open.png"
ToolTip="Open Python Script" />
</Button>
<Button Click="saveFileClick">
<Image
Height="16"
SnapsToDevicePixels="True"
Source="Images/Save.png"
ToolTip="Save This Script Into File" />
</Button>
<Button Click="saveAsFileClick">
<Image
Height="16"
SnapsToDevicePixels="True"
Source="Images/SaveAs.png"
ToolTip="Save This Script Into New File" />
</Button>
<Separator />
<Button Command="Cut">
<Image
Height="16"
SnapsToDevicePixels="True"
Source="Images/Cut.png"
ToolTip="Cut Selected" />
</Button>
<Button Command="Copy">
<Image
Height="16"
SnapsToDevicePixels="True"
Source="Images/Copy.png"
ToolTip="Copy Selected" />
</Button>
<Button Command="Paste">
<Image
Height="16"
SnapsToDevicePixels="True"
Source="Images/Paste.png"
ToolTip="Paste Into Script Editor" />
</Button>
<Button Command="Delete">
<Image
Height="16"
SnapsToDevicePixels="True"
Source="Images/Delete.png"
ToolTip="Delete Selected" />
</Button>
<Separator />
<Button Command="Undo">
<Image
Height="16"
SnapsToDevicePixels="True"
Source="Images/Undo.png"
ToolTip="Undo" />
</Button>
<Button Command="Redo">
<Image
Height="16"
SnapsToDevicePixels="True"
Source="Images/Redo.png"
ToolTip="Redo" />
</Button>
<Separator />
<CheckBox IsChecked="{Binding ElementName=textEditor, Path=WordWrap}">
<Image
Height="16"
SnapsToDevicePixels="True"
Source="Images/WordWrap.png"
ToolTip="Toggle Word Wrap" />
</CheckBox>
<CheckBox IsChecked="{Binding ElementName=textEditor, Path=ShowLineNumbers}">
<Image
Height="16"
SnapsToDevicePixels="True"
Source="Images/Number.png"
ToolTip="Toggle Line Numbers" />
</CheckBox>
<CheckBox IsChecked="{Binding ElementName=textEditor, Path=Options.ShowEndOfLine}">
<Image
Height="16"
SnapsToDevicePixels="True"
Source="Images/Paragraph.png"
ToolTip="Toggle Show End of Line" />
</CheckBox>
<Separator />
<Button Click="runClick">
<Image
Height="16"
SnapsToDevicePixels="True"
Source="Images/Run.png"
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>