blob: 43d7b9c1cbaad9fec8fcbc984e08910cd124bf79 (
plain)
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
|
<mahapps:MetroWindow x:Class="Tango.RemoteRunner.UI.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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:local="clr-namespace:Tango.RemoteRunner.UI"
mc:Ignorable="d"
Title="Tango Remote Process Runner" Height="500" Width="800" ResizeMode="NoResize" TitlebarHeight="40" TitleCaps="False" BorderBrush="Gray" BorderThickness="1" WindowStartupLocation="CenterScreen" Background="#202020" Foreground="Gainsboro" DataContext="{StaticResource MainWindowVM}" d:DataContext="{d:DesignInstance Type=local:MainWindowVM, IsDesignTimeCreatable=False}">
<mahapps:MetroWindow.TitleTemplate>
<DataTemplate>
<TextBlock Foreground="Gray" Text="{Binding}" VerticalAlignment="Center"></TextBlock>
</DataTemplate>
</mahapps:MetroWindow.TitleTemplate>
<mahapps:MetroWindow.IconTemplate>
<DataTemplate>
<Image Source="/process.ico" Width="16" Height="16"></Image>
</DataTemplate>
</mahapps:MetroWindow.IconTemplate>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="80"/>
</Grid.RowDefinitions>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="456*"/>
<ColumnDefinition Width="5"/>
<ColumnDefinition Width="329*"/>
</Grid.ColumnDefinitions>
<GridSplitter Grid.Column="1" Width="5" Background="#383838" HorizontalAlignment="Center" VerticalAlignment="Stretch" />
<Rectangle VerticalAlignment="Bottom" Stroke="#383838" StrokeThickness="5" Grid.ColumnSpan="3" />
<DockPanel Margin="20">
<TextBlock DockPanel.Dock="Top">Running Processes</TextBlock>
<DataGrid Margin="0 10 0 0" CanUserAddRows="False" RowHeight="40" CanUserDeleteRows="False" CanUserReorderColumns="False" ItemsSource="{Binding RunningProcesses}" AutoGenerateColumns="False">
<DataGrid.Columns>
<DataGridTemplateColumn Width="40">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Image Source="/Images/cogwheel.png" Width="24" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn Header="ID" Binding="{Binding ProcessID}" />
<DataGridTextColumn Header="Name" Width="1*" Binding="{Binding ProcessName}" />
<DataGridTemplateColumn>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Button Width="70">Kill</Button>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</DockPanel>
<Grid Grid.Column="2">
<DockPanel Margin="20">
<TextBlock DockPanel.Dock="Top">Log</TextBlock>
<TextBox Text="{Binding Log,Mode=OneWay}" IsReadOnly="True" Padding="5" Margin="0 10 0 0" Background="#151515" Foreground="Gainsboro" BorderThickness="0" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" AcceptsReturn="True" />
</DockPanel>
</Grid>
</Grid>
</Grid>
</mahapps:MetroWindow>
|