-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainWindow.xaml
102 lines (96 loc) · 6.1 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
102
<Window x:Class="FrpGui.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:FrpGui"
mc:Ignorable="d"
Title="Frp Gui" Height="800" Width="800" Closing="Window_Closing" Initialized="Window_Initialized" WindowStartupLocation="CenterScreen">
<DockPanel>
<StatusBar DockPanel.Dock="Bottom">
<StatusBarItem>Frp GUI 0.0.1</StatusBarItem>
<StatusBarItem HorizontalAlignment="Right">
<TextBlock><Run Name="run_frpversion" Foreground="#FF2F4FFF" d:Text="frp最新版本" Cursor="Hand" ToolTip="点击下载"></Run> <Run>运行状态</Run> <Run>运行中</Run></TextBlock>
</StatusBarItem>
</StatusBar>
<Menu DockPanel.Dock="Top" Height="20">
<Menu.ItemsPanel>
<ItemsPanelTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="20" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
</Grid>
</ItemsPanelTemplate>
</Menu.ItemsPanel>
<MenuItem Grid.Column="0" Header="{Binding path_exe}" HeaderStringFormat="当前EXE:{0}" Name="menuItem_exe" Width="200" ItemsSource="{Binding EXEList}">
<MenuItem.ItemContainerStyle>
<Style TargetType="{x:Type MenuItem}">
<Setter Property="IsCheckable" Value="false" />
<Setter Property="IsChecked" Value="{Binding Path=Checked}" />
<Setter Property="Header" Value="{Binding Path=Text}" />
<EventSetter Event="Click" Handler="MenuItem_EXE_Click" />
</Style>
</MenuItem.ItemContainerStyle>
</MenuItem>
<MenuItem Grid.Column="1" Header="{Binding path_config}" HeaderStringFormat="当前Config:{0}" Name="menuItem_config" Width="200" ItemsSource="{Binding ConfigList}">
<MenuItem.ItemContainerStyle>
<Style TargetType="{x:Type MenuItem}">
<Setter Property="IsCheckable" Value="false" />
<Setter Property="IsChecked" Value="{Binding Path=Checked}" />
<Setter Property="Header" Value="{Binding Path=Text}" />
<EventSetter Event="Click" Handler="MenuItem_Config_Click" />
</Style>
</MenuItem.ItemContainerStyle>
</MenuItem>
<!--<Separator Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" Grid.Column="5" Margin="0,10" BorderBrush="#FFBDBDBD" BorderThickness="1" Background="{x:Null}"></Separator>-->
<MenuItem Grid.Column="6" Header="启动" Name="menuItem_start" Click="menuItem_start_Click" IsChecked="True"></MenuItem>
<Separator Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" Grid.Column="7" Margin="0,3" BorderBrush="#FFBDBDBD" BorderThickness="1" Background="{x:Null}"></Separator>
<MenuItem Grid.Column="8" Header="停止" Name="menuItem_stop" Click="menuItem_stop_Click" IsCheckable="True" IsEnabled="False"></MenuItem>
<Separator Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" Grid.Column="9" Margin="0,3" BorderBrush="#FFBDBDBD" BorderThickness="1" Background="{x:Null}"></Separator>
<MenuItem Grid.Column="10" Header="重启" Name="menuItem_restart" Click="menuItem_restart_Click" IsEnabled="False"></MenuItem>
</Menu>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1.5*" />
<ColumnDefinition Width="1*" MaxWidth="400" MinWidth="200"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="3*"></RowDefinition>
<RowDefinition Height="1*"></RowDefinition>
</Grid.RowDefinitions>
<ScrollViewer Grid.Column="0">
<ItemsControl Margin="10" ItemsSource="{Binding SectionList}" d:ItemsSource="{Binding DSampleData}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<!--<Label Content="{Binding .}"></Label>-->
<local:IniSectionControl Section="{Binding .}" ClickDel="IniSectionControl_ClickDel" ClickEditor="IniSectionControl_ClickEditor"></local:IniSectionControl>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
<StackPanel Grid.Column="1">
<ItemsControl Margin="10,0">
<GroupBox Header="操作">
<Button Click="menuItem_add_Click" Padding="0,4,0,4">添加新配置项</Button>
</GroupBox>
</ItemsControl>
</StackPanel>
<TextBox d:Text="日志输出.........." TextWrapping="Wrap"
VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Auto"
x:Name="textBox_log" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" DockPanel.Dock="Right" Background="Black"
SelectionTextBrush="#FF005D0A" Foreground="#FF11DC00">
</TextBox>
</Grid>
</DockPanel>
</Window>