-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
112 lines (104 loc) · 5.66 KB
/
MainWindow.xaml
File metadata and controls
112 lines (104 loc) · 5.66 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
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
103
104
105
106
107
108
109
110
111
112
<!--
This file is part of BOINC.
https://boinc.berkeley.edu
Copyright (C) 2026 University of California
BOINC is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation,
either version 3 of the License, or (at your option) any later version.
BOINC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with BOINC. If not, see <http://www.gnu.org/licenses/>.
-->
<Window x:Class="boinc_buda_runner_wsl_installer.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:local="clr-namespace:boinc_buda_runner_wsl_installer"
mc:Ignorable="d"
Title="BOINC WSL Distro Installer - Version 2.2.2"
Height="450"
Width="800">
<Window.Resources>
<BooleanToVisibilityConverter x:Key="BoolToVis" />
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- Intro text shown before installation starts -->
<TextBlock x:Name="IntroTextBlock"
Grid.Row="0"
Text="This will install the BOINC WSL Distro, allowing BOINC to run jobs based on Docker.
Click Install to continue."
TextAlignment="Center"
VerticalAlignment="Center"
HorizontalAlignment="Center"
FontSize="16"
Foreground="Black"
TextWrapping="Wrap"
Margin="40"/>
<!-- Table area -->
<ItemsControl Grid.Row="0" ItemsSource="{Binding TableItems}" Margin="10">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Vertical"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid Visibility="{Binding IsVisible, Converter={StaticResource BoolToVis}}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Border Grid.Column="0" Width="16" Height="16" Margin="5">
<Border.Style>
<Style TargetType="Border">
<Style.Triggers>
<DataTrigger Binding="{Binding Icon}" Value="BlueInfoIcon">
<Setter Property="Background" Value="{StaticResource BlueInfoIcon}"/>
</DataTrigger>
<DataTrigger Binding="{Binding Icon}" Value="GreenCheckboxIcon">
<Setter Property="Background" Value="{StaticResource GreenCheckboxIcon}"/>
</DataTrigger>
<DataTrigger Binding="{Binding Icon}" Value="RedCancelIcon">
<Setter Property="Background" Value="{StaticResource RedCancelIcon}"/>
</DataTrigger>
<DataTrigger Binding="{Binding Icon}" Value="GreyMinusIcon">
<Setter Property="Background" Value="{StaticResource GreyMinusIcon}"/>
</DataTrigger>
<DataTrigger Binding="{Binding Icon}" Value="YellowExclamationIcon">
<Setter Property="Background" Value="{StaticResource YellowExclamationIcon}"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Border.Style>
</Border>
<TextBlock Text="{Binding Status}" Grid.Column="1" Margin="5" Height="16"/>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<!-- Bottom panel with buttons -->
<Grid Grid.Row="1" Margin="10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<!-- Open Log on the left -->
<StackPanel Grid.Column="0" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center">
<Button Name="OpenLogButton" Content="Open Log" Width="90" Height="30" Margin="5" Click="OpenLogButton_Click"/>
</StackPanel>
<!-- Install/Exit on the right -->
<StackPanel Grid.Column="1" Orientation="Horizontal">
<Button Name="InstallButton" Content="Install" Width="80" Height="30" Margin="5" Click="InstallButton_Click"/>
<Button Name="ExitButton" Content="Exit" Width="80" Height="30" Margin="5" Click="ExitButton_Click"/>
</StackPanel>
</Grid>
</Grid>
</Window>