-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
139 lines (128 loc) · 9.63 KB
/
Copy pathMainWindow.xaml
File metadata and controls
139 lines (128 loc) · 9.63 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<!--
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.3.2"
Height="450"
Width="800">
<Window.Resources>
<BooleanToVisibilityConverter x:Key="BoolToVis" />
</Window.Resources>
<Grid>
<!-- Background images layer -->
<Grid x:Name="BackgroundImagesGrid" Panel.ZIndex="-1" IsHitTestVisible="False">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- BOINC logo on the left -->
<Viewbox Grid.Column="0" Stretch="Uniform" Margin="20">
<Canvas Width="718" Height="718">
<Path Fill="#245c86" Data="M567.1,103.1c-51.2,49.6 -93.1,90.5 -93.1,90.8 0,0.4 4.5,4.2 10,8.4 46.9,36.1 73.6,83.1 79.1,139.1 1.1,11.1 0.9,19 -0.7,47.2 -1.3,22.3 1.9,27.1 39.1,58.4 9.4,7.9 18,15.2 19.1,16.2l2.2,1.9 3.5,-9.3c2,-5.1 4.6,-12.7 5.7,-16.8 1.2,-4.1 2.8,-8.9 3.5,-10.5 1.4,-3.3 4.7,-19.4 6.6,-32 2.9,-20.1 2.6,-57.3 -0.6,-77.5 -6.6,-41.2 -21.2,-78.3 -43.9,-111.5l-5.4,-8 63.1,-63.2 63,-63.1 -7.4,-8.9c-8.7,-10.3 -34.5,-36.9 -44,-45.4l-6.7,-5.9 -93.1,90.1zM45.4,30.2C31.2,44 11,66 6,73.1l-2,2.7 28.8,26.9c165.5,155 157.5,147.8 159.2,145.2 11.4,-17.6 31.7,-37.2 53.9,-52.2 7.8,-5.2 28.1,-15.3 41.8,-20.8 11.4,-4.5 31.9,-9.5 47.3,-11.5 10.5,-1.3 17.8,-1.5 33,-1.1 10.7,0.3 21.1,1.1 23,1.7 1.9,0.6 7.8,1.1 13.1,1.2 14.2,0.2 15,-0.4 45.1,-31.3 13.7,-14.2 24.9,-26.1 24.8,-26.6 -0.2,-1.1 -17.6,-7.8 -29.6,-11.3 -65.3,-19.1 -133.8,-15.7 -195.4,9.7 -17.9,7.4 -32.2,14.7 -45.1,23.2l-10.7,6.9 -63.3,-58C95,45.9 65.3,18.7 63.8,17.3l-2.6,-2.5 -15.8,15.4zM95.2,253.8c-0.5,0.9 -1.5,3.5 -2.2,5.7 -0.7,2.2 -2.1,5.3 -3,7 -4.5,7.3 -12.4,39.4 -15.1,61 -1.6,12.9 -1.6,47.1 0,60 5.7,45 20.2,84.5 44.6,121l6.4,9.5 -61.5,60.7L3,639.5l8.7,10.5c9.2,11 39.2,42.1 45.5,47.1l3.7,3 87.8,-84.2c48.3,-46.3 89.8,-86.1 92.3,-88.6l4.5,-4.5 -2.5,-1.6c-16.3,-11 -39.3,-32.7 -49.9,-47.1 -18.9,-25.6 -30.8,-53.7 -36.1,-84.6 -1.9,-11 -2.2,-15.9 -1.9,-32 0.1,-10.5 0.3,-25.1 0.3,-32.5 0.1,-20.6 0.3,-20.3 -38.1,-54.3 -18,-15.9 -21.4,-18.4 -22.1,-16.9zM526,473.3c-5,7.6 -30.9,33 -42.5,41.8 -9.1,7 -32.9,20.7 -34.8,20.1 -0.4,-0.1 -2.9,0.9 -5.5,2.2 -11.9,5.9 -30.8,11.6 -48.7,14.7 -15.6,2.6 -44.6,3.6 -57.5,1.9 -5.2,-0.7 -14.1,-1.5 -19.7,-1.7 -8.9,-0.4 -10.9,-0.2 -14.5,1.6 -2.8,1.3 -13.7,11.4 -31.2,29l-27,27 5,2.1c9.4,4.1 27.5,9.9 39.7,12.9 25,6 43.4,8.2 69.8,8.2 35.3,0 61.5,-4.1 93.4,-14.7 22.2,-7.3 47.4,-19.2 64.8,-30.8l9.8,-6.4 66.1,60.9c36.3,33.5 66.4,60.9 66.9,60.9 1.6,0 34.6,-32.9 46.1,-46l11.9,-13.5 -5.4,-5c-3,-2.8 -45.1,-42.1 -93.6,-87.5 -48.5,-45.4 -88.5,-82.6 -88.9,-82.7 -0.4,-0.1 -2.3,2.1 -4.2,5z" Opacity="0.12"/>
<Ellipse Fill="#fac134" Canvas.Left="224.25" Canvas.Top="224.25" Width="270" Height="270" Opacity="0.12"/>
</Canvas>
</Viewbox>
<!-- Docker logo on the right -->
<Viewbox Grid.Column="1" Stretch="Uniform" Margin="20">
<Canvas Width="340" Height="268">
<Path Fill="#2560ff" Data="M334,110.1c-8.3-5.6-30.2-8-46.1-3.7-.9-15.8-9-29.2-24-40.8l-5.5-3.7-3.7,5.6c-7.2,11-10.3,25.7-9.2,39,.8,8.2,3.7,17.4,9.2,24.1-20.7,12-39.8,9.3-124.3,9.3H0c-.4,19.1,2.7,55.8,26,85.6,2.6,3.3,5.4,6.5,8.5,9.6,19,19,47.6,32.9,90.5,33,65.4,0,121.4-35.3,155.5-120.8,11.2.2,40.8,2,55.3-26,.4-.5,3.7-7.4,3.7-7.4l-5.5-3.7h0ZM85.2,92.7h-36.7v36.7h36.7v-36.7ZM132.6,92.7h-36.7v36.7h36.7v-36.7ZM179.9,92.7h-36.7v36.7h36.7v-36.7ZM227.3,92.7h-36.7v36.7h36.7v-36.7ZM37.8,92.7H1.1v36.7h36.7v-36.7ZM85.2,46.3h-36.7v36.7h36.7v-36.7ZM132.6,46.3h-36.7v36.7h36.7v-36.7ZM179.9,46.3h-36.7v36.7h36.7v-36.7ZM179.9,0h-36.7v36.7h36.7V0Z" Opacity="0.12"/>
</Canvas>
</Viewbox>
</Grid>
<!-- Content layer (on top of background images) -->
<Grid Panel.ZIndex="1">
<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/Uninstall/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="UninstallButton" Content="Uninstall" Width="80" Height="30" Margin="5" Click="UninstallButton_Click"/>
<Button Name="ExitButton" Content="Exit" Width="80" Height="30" Margin="5" Click="ExitButton_Click"/>
</StackPanel>
</Grid>
</Grid>
</Grid>
</Window>