Skip to content

Commit 07e6a5f

Browse files
Print the estimated remaining time and speed in the sidebar
1 parent 221ac33 commit 07e6a5f

File tree

1 file changed

+32
-6
lines changed

1 file changed

+32
-6
lines changed

Src/FinderOuter/Views/MainWindow.axaml

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Window xmlns="https://github.com/avaloniaui"
22
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3-
xmlns:vm="clr-namespace:FinderOuter.ViewModels;assembly=FinderOuter"
43
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
54
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
5+
xmlns:vm="clr-namespace:FinderOuter.ViewModels;assembly=FinderOuter"
66
xmlns:mvvm="clr-namespace:FinderOuter.Backend.Mvvm.Converters;assembly=FinderOuter"
77
mc:Ignorable="d" d:DesignHeight="750" d:DesignWidth="1000"
88
x:Class="FinderOuter.Views.MainWindow"
@@ -26,8 +26,8 @@
2626

2727
<Grid ColumnDefinitions="200,*" RowDefinitions="*,40">
2828

29-
<!--Left side collumn (containing option list, warning, version, about button)-->
30-
<Grid RowDefinitions="*,auto,auto,auto" Grid.Column="0" Grid.Row="0">
29+
<!--Left side collumn (containing option list, warnings, speeds, version, about button)-->
30+
<Grid RowDefinitions="*,auto,auto,auto,auto" Grid.Column="0" Grid.Row="0">
3131
<ListBox Items="{Binding OptionList}"
3232
SelectedItem="{Binding SelectedOption}"
3333
SelectionMode="Toggle"
@@ -76,7 +76,33 @@
7676
Margin="3"
7777
Grid.Row="2"/>
7878

79-
<Grid ColumnDefinitions="auto,*" Grid.Column="0" Grid.Row="3" Background="#e5e5e5">
79+
<Grid ColumnDefinitions="auto,*" RowDefinitions="auto,auto,auto" Grid.Column="0" Grid.Row="3" Background="#e5e5e5">
80+
<TextBlock Text="Checked:"
81+
Margin="0,0,5,0"
82+
Grid.Column="0" Grid.Row="0"/>
83+
<TextBlock Text="{Binding SelectedOption.Result.TotalChecked, StringFormat=\{0:N0\}}"
84+
ToolTip.Tip="Total keys checked"
85+
MinWidth="20"
86+
Grid.Column="1" Grid.Row="0"/>
87+
88+
<TextBlock Text="Speed:"
89+
Margin="0,0,5,0"
90+
Grid.Column="0" Grid.Row="1"/>
91+
<TextBlock Text="{Binding SelectedOption.Result.Speed, StringFormat=\{0:N0\}}"
92+
ToolTip.Tip="Estimated speed (keys/second)"
93+
MinWidth="20"
94+
Grid.Column="1" Grid.Row="1"/>
95+
96+
<TextBlock Text="Time left:"
97+
Margin="0,0,5,0"
98+
Grid.Column="0" Grid.Row="2"/>
99+
<TextBlock Text="{Binding SelectedOption.Result.Remaining, StringFormat=\{0:hh\\:mm\\:ss\}}"
100+
ToolTip.Tip="Estimated time remaining"
101+
MinWidth="30"
102+
Grid.Column="1" Grid.Row="2"/>
103+
</Grid>
104+
105+
<Grid ColumnDefinitions="auto,*" Grid.Column="0" Grid.Row="4" Background="#e5e5e5">
80106
<Button Command="{Binding OpenAbout}"
81107
ToolTip.Tip="About and Donate"
82108
BorderThickness="0"
@@ -151,7 +177,7 @@
151177
ShowProgressText="True"
152178
Margin="3,0,3,3"
153179
Grid.Column="1"
154-
Grid.Row="2">
180+
Grid.Row="2">
155181
<ProgressBar.Styles>
156182
<Style Selector="ProgressBar /template/ Border">
157183
<Setter Property="CornerRadius" Value="0,20,20,0"/>
@@ -160,4 +186,4 @@
160186
</ProgressBar>
161187

162188
</Grid>
163-
</Window>
189+
</Window>

0 commit comments

Comments
 (0)