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
|
<uc:WindowEx xmlns="https://github.com/avaloniaui"
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"
xmlns:uc="clr-namespace:UVtools.WPF.Controls"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="500"
MinWidth="500"
MinHeight="300"
Width="800"
Height="500"
Padding="10"
WindowStartupLocation="CenterOwner"
DragDrop.AllowDrop="True"
Icon="/Assets/Icons/UVtools.ico"
x:Class="UVtools.WPF.Windows.TerminalWindow"
Title="UVtools interactive terminal">
<Grid RowDefinitions="4*,5,*,5,Auto">
<TextBox Grid.Row="0"
Name="TerminalTextBox"
AcceptsReturn="True"
IsReadOnly="True"
Watermark="Terminal"
UseFloatingWatermark="True"
Text="{Binding TerminalText}"/>
<GridSplitter Grid.Row="1"
ResizeDirection="Rows"
ResizeBehavior="PreviousAndNext"/>
<TextBox Grid.Row="2"
AcceptsReturn="{Binding MultiLine}"
Watermark="> Type in the command or text to send

Alt + enter: Shortcut to send the command"
Text="{Binding CommandText}"/>
<WrapPanel Grid.Row="4" Orientation="Horizontal" HorizontalAlignment="Right">
<!--
<ToggleSwitch VerticalAlignment="Center"
IsChecked="{Binding MultiLine}"
OnContent="Multi line"
OffContent="Single line"/>
-->
<ToggleButton Margin="0,0,0,0"
VerticalAlignment="Center"
IsChecked="{Binding Verbose}"
ToolTip.Tip="Sent command appears on the terminal text"
Content="Verbose"/>
<ToggleButton Margin="2,0,0,0"
VerticalAlignment="Center"
IsChecked="{Binding ClearCommandAfterSend}"
ToolTip.Tip="Clears the sent command on the input box"
Content="Clear"/>
<ToggleButton Margin="2,0,0,0"
VerticalAlignment="Center"
IsChecked="{Binding AutoScroll}"
Content="Auto scroll"/>
<Button Margin="15,0,0,0"
Content="Clear"
VerticalAlignment="Center"
Command="{Binding Clear}"
ToolTip.Tip="Clears the terminal text (cls)

Alt + delete"
HotKey="Alt+Delete"/>
<Button Margin="5,0,0,0"
Content="Send"
Padding="40,6"
VerticalAlignment="Center"
Command="{Binding SendCommand}"
IsDefault="True"
HotKey="Alt+Enter"/>
</WrapPanel>
</Grid>
</uc:WindowEx>
|