-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathScriptEditorPage.xaml
More file actions
67 lines (62 loc) · 3.11 KB
/
ScriptEditorPage.xaml
File metadata and controls
67 lines (62 loc) · 3.11 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
<Page
x:Class="FluentTaskScheduler.ScriptEditorPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="Transparent"
Loaded="Page_Loaded">
<Grid Padding="24">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="150"/>
</Grid.RowDefinitions>
<!-- Toolbar -->
<CommandBar Background="Transparent" DefaultLabelPosition="Right" HorizontalAlignment="Left">
<AppBarButton x:Name="RunButton" x:Uid="ScriptEditor_RunBtn" Icon="Play" Click="RunButton_Click">
<ToolTipService.ToolTip>
<ToolTip Content="Run Script (Ctrl+R)"/>
</ToolTipService.ToolTip>
</AppBarButton>
<AppBarButton x:Name="StopButton" x:Uid="ScriptEditor_StopBtn" Icon="Stop" Click="StopButton_Click" IsEnabled="False"/>
<AppBarSeparator/>
<AppBarButton x:Name="SaveButton" x:Uid="ScriptEditor_SaveBtn" Icon="Save" Click="SaveButton_Click"/>
<AppBarSeparator/>
<AppBarButton x:Name="ClearButton" x:Uid="ScriptEditor_ClearBtn" Icon="Clear" Click="ClearButton_Click"/>
</CommandBar>
<!-- Editor Area -->
<RichEditBox x:Name="CodeEditor"
x:Uid="ScriptEditor_CodeEditor"
Grid.Row="1"
Margin="0,12,0,0"
FontFamily="Consolas, 'Courier New', monospace"
FontSize="14"
AcceptsReturn="True"
IsSpellCheckEnabled="False"
VerticalAlignment="Stretch"
HorizontalAlignment="Stretch"
TextChanged="CodeEditor_TextChanged"
SelectionFlyout="{x:Null}"/>
<!-- Console Divider -->
<Rectangle Grid.Row="2" Height="1" HorizontalAlignment="Stretch" Fill="{ThemeResource SystemControlBackgroundAccentBrush}" Opacity="0.3" Margin="0,12"/>
<!-- Output Console -->
<Grid Grid.Row="3">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TextBlock x:Uid="ScriptEditor_OutputHeader" Text="Output Console" Style="{StaticResource CaptionTextBlockStyle}" Opacity="0.7" Margin="0,0,0,4"/>
<ScrollViewer Grid.Row="1" Background="{ThemeResource SolidBackgroundFillColorBaseBrush}" CornerRadius="4">
<TextBlock x:Name="OutputConsole"
Margin="12"
FontFamily="Consolas, 'Courier New', monospace"
FontSize="12"
TextWrapping="Wrap"
IsTextSelectionEnabled="True"/>
</ScrollViewer>
</Grid>
</Grid>
</Page>