-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMainWindow.xaml
101 lines (101 loc) · 3.55 KB
/
MainWindow.xaml
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
<Window
x:Class="ScriptVsNewWindow.MainWindow"
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:local="clr-namespace:ScriptVsNewWindow"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:wv2="clr-namespace:Microsoft.Web.WebView2.Wpf;assembly=Microsoft.Web.WebView2.Wpf"
x:Name="Root"
Title="MainWindow"
Width="800"
Height="450"
mc:Ignorable="d">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="0.7*" />
<RowDefinition Height="0.3*" />
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal">
<CheckBox
x:Name="SetNewWindow"
Margin="4"
VerticalAlignment="Center"
Content="Set NewWindow"
IsChecked="False" />
<StackPanel Orientation="Horizontal">
<TextBlock
Margin="4"
VerticalAlignment="Center"
Text="Add Scripts:" />
<ComboBox
x:Name="SetScripts"
Margin="0,4,4,4"
VerticalAlignment="Center"
SelectedIndex="0">
<ComboBoxItem>After</ComboBoxItem>
<ComboBoxItem>Before</ComboBoxItem>
<ComboBoxItem>None</ComboBoxItem>
</ComboBox>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock
Margin="4"
VerticalAlignment="Center"
Text="Delay:" />
<ComboBox
x:Name="Delay"
Margin="0,4,4,4"
VerticalAlignment="Center"
SelectedIndex="0">
<ComboBoxItem>None</ComboBoxItem>
<ComboBoxItem>1000</ComboBoxItem>
<ComboBoxItem>2000</ComboBoxItem>
<ComboBoxItem>3000</ComboBoxItem>
</ComboBox>
</StackPanel>
<CheckBox
x:Name="SetSource"
Margin="4"
VerticalAlignment="Center"
Content="Set Source"
IsChecked="True" />
<CheckBox
x:Name="ScheduleNewWindow"
Margin="4"
VerticalAlignment="Center"
Content="Schedule New Window"
IsChecked="False" />
<Button
x:Name="CopyLog"
Margin="4"
Padding="8,2"
Click="CopyLog_Click">
Copy Log
</Button>
<Button
x:Name="ClearLog"
Margin="4"
Padding="8,2"
Click="ClearLog_Click">
Clear Log
</Button>
</StackPanel>
<wv2:WebView2
x:Name="WebView"
Grid.Row="1"
Grid.Column="0"
Grid.ColumnSpan="1" />
<Border
Grid.Row="2"
Margin="2"
HorizontalAlignment="Stretch"
VerticalAlignment="Top"
BorderBrush="Black"
BorderThickness="0,1,0,0" />
<ScrollViewer Grid.Row="2" Margin="0,4,0,0">
<ItemsControl ItemsSource="{Binding ElementName=Root, Path=Log}" />
</ScrollViewer>
</Grid>
</Window>