From f37a7846624af226684afaaad2d1053f8ea81f5e Mon Sep 17 00:00:00 2001 From: happlebao Date: Mon, 25 Apr 2016 03:00:55 +0100 Subject: [PATCH] Fix progressbar loading --- Wox/MainWindow.xaml | 9 +++------ Wox/ViewModel/MainViewModel.cs | 21 +++------------------ 2 files changed, 6 insertions(+), 24 deletions(-) diff --git a/Wox/MainWindow.xaml b/Wox/MainWindow.xaml index 9bbb8f996..eca840bea 100644 --- a/Wox/MainWindow.xaml +++ b/Wox/MainWindow.xaml @@ -37,12 +37,9 @@ PreviewDragOver="OnPreviewDragOver" AllowDrop="True" x:Name="QueryTextBox" /> - - - - + diff --git a/Wox/ViewModel/MainViewModel.cs b/Wox/ViewModel/MainViewModel.cs index c298d8c76..0c6d9a21a 100644 --- a/Wox/ViewModel/MainViewModel.cs +++ b/Wox/ViewModel/MainViewModel.cs @@ -15,7 +15,6 @@ using Wox.Infrastructure.Storage; using Wox.Plugin; using Wox.Storage; -using Stopwatch = Wox.Infrastructure.Stopwatch; namespace Wox.ViewModel { @@ -80,7 +79,6 @@ public MainViewModel() InitializeResultListBox(); InitializeContextMenu(); InitializeKeyCommands(); - } ~MainViewModel() @@ -121,19 +119,6 @@ public string QueryText } } - public bool IsProgressBarTooltipVisible - { - get - { - return _isProgressBarTooltipVisible; - } - set - { - _isProgressBarTooltipVisible = value; - OnPropertyChanged(); - } - } - public double Left { get @@ -375,7 +360,7 @@ private void InitializeContextMenu() private void HandleQueryTextUpdated() { - IsProgressBarTooltipVisible = false; + ProgressBarVisibility = Visibility.Hidden; _updateSource?.Cancel(); _updateSource = new CancellationTokenSource(); _updateToken = _updateSource.Token; @@ -553,7 +538,7 @@ private Result GetTopMostContextMenu(Result result) public void UpdateResultView(List list, PluginMetadata metadata, Query originQuery) { _queryHasReturn = true; - IsProgressBarTooltipVisible = false; + ProgressBarVisibility = Visibility.Hidden; list.ForEach(o => { @@ -567,7 +552,7 @@ public void UpdateResultView(List list, PluginMetadata metadata, Query o }); } - if (list.Count > 0 && ! ResultListBoxVisibility.IsVisible()) + if (list.Count > 0 && !ResultListBoxVisibility.IsVisible()) { ResultListBoxVisibility = Visibility.Visible; }