feature<Statistics>: add simple statistic page

This commit is contained in:
leo 2022-01-11 20:18:35 +08:00
parent f04c01b878
commit c52ed4a711
10 changed files with 512 additions and 0 deletions

View file

@ -108,6 +108,13 @@
IsChecked="{Binding Source={x:Static models:Preference.Instance}, Path=Window.MoveCommitInfoRight, Mode=TwoWay, Converter={StaticResource InverseBool}}"
Checked="ChangeOrientation" Unchecked="ChangeOrientation"/>
<controls:IconButton
Margin="8,0"
Padding="0,8"
Icon="{DynamicResource Icon.Statistics}"
ToolTip="{DynamicResource Text.Dashboard.Statistics}"
Click="OpenStatistics"/>
<controls:IconButton
Margin="8,0"
Padding="0,9,0,8"

View file

@ -408,6 +408,11 @@ namespace SourceGit.Views.Widgets {
(pages.Get("histories") as Histories)?.ChangeOrientation();
}
private void OpenStatistics(object sender, RoutedEventArgs e) {
var dialog = new Statistics(repo.Path) { Owner = App.Current.MainWindow };
dialog.ShowDialog();
}
private void OpenConfigure(object sender, RoutedEventArgs e) {
new Popups.Configure(repo.Path).Show();
e.Handled = true;