Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions CPAP-Exporter.UI/Pages/SelectNights/SelectNightsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
using System.ComponentModel;
using System.IO;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Threading;

Expand Down Expand Up @@ -33,6 +31,7 @@ public class SelectNightsViewModel : PageViewModel
/// </summary>
public SelectNightsViewModel() : base(Resources.PageTitle_SelectNights, Resources.PageDesc_SelectNights)
{
this.ReservedNotificationHeight = 50;
}

public SelectNightsViewModel(ExportParameters exportParameters) : this()
Expand Down Expand Up @@ -158,7 +157,6 @@ public void LoadFromFolder(string folder, bool replaceExisting)
this.IsBusy = true;
this.ShowBusyStatus();
this.ExportParameters.SourcePath = folder;
ApplicationComponentProvider.Status.StatusText = string.Format(Resources.ReadingFolder, folder);

// Prepare to load reports
List<DailyReport> reports = null;
Expand All @@ -171,7 +169,7 @@ public void LoadFromFolder(string folder, bool replaceExisting)
}
catch (Exception ex)
{
ApplicationComponentProvider.Status.StatusText += ex.ToString();
Application.Current.Dispatcher.Invoke(() => { this.StatusContent = new ErrorToast(ex.Message); });
}

// And now it's time to process them.
Expand Down Expand Up @@ -260,8 +258,6 @@ public void Work()
return;
}

ApplicationComponentProvider.Status.StatusText = Resources.Working;

Task.Run(() =>
{
this.LoadFromFolder(this.ExportParameters.SourcePath, this.ClearReportsBeforeAdding);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public class SelectSignalsViewModel : PageViewModel

public SelectSignalsViewModel() : base(Resources.PageTitle_SelectSignals, Resources.PageDesc_SelectSignals)
{
this.ReservedNotificationHeight = 50;
}

public SelectSignalsViewModel(ExportParameters exportParameters) : this()
Expand Down
3 changes: 2 additions & 1 deletion CPAP-Exporter.UI/Views/PageView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
<RowDefinition MinHeight="{Binding CurrentView.DataContext.ReservedNotificationHeight}" />
</Grid.RowDefinitions>

<TextBlock
Expand Down Expand Up @@ -50,6 +50,7 @@
<local:AuraPresenter
x:Name="StatusHost"
Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="2"
VerticalAlignment="Top"
Visibility="{Binding CurrentView.DataContext.StatusContent, Converter={StaticResource NullableObjectToVisibilityConverter}}"
Content="{Binding CurrentView.DataContext.StatusContent}">
<local:AuraPresenter.StylingCueProvider>
Expand Down
Loading