From 9e1ac9f9e27c49e8a977f96f797907c945f9d8c2 Mon Sep 17 00:00:00 2001 From: Shuai Zhang Date: Tue, 17 Dec 2019 17:31:33 +0800 Subject: [PATCH] Bugfix in ExportViewModel. --- .../ViewModels/DeviceMetricHistoryExportViewModel.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/GeothermalResearchInstitute/GeothermalResearchInstitute.Wpf/ViewModels/DeviceMetricHistoryExportViewModel.cs b/GeothermalResearchInstitute/GeothermalResearchInstitute.Wpf/ViewModels/DeviceMetricHistoryExportViewModel.cs index ee10abc8..d9c80741 100644 --- a/GeothermalResearchInstitute/GeothermalResearchInstitute.Wpf/ViewModels/DeviceMetricHistoryExportViewModel.cs +++ b/GeothermalResearchInstitute/GeothermalResearchInstitute.Wpf/ViewModels/DeviceMetricHistoryExportViewModel.cs @@ -61,13 +61,21 @@ public ViewModelContext ViewModelContext public DateTime StartDateTime { get => this.startDateTime; - set => this.SetProperty(ref this.startDateTime, value); + set + { + this.SetProperty(ref this.startDateTime, value); + this.ExportCommand.RaiseCanExecuteChanged(); + } } public DateTime EndDateTime { get => this.endDateTime; - set => this.SetProperty(ref this.endDateTime, value); + set + { + this.SetProperty(ref this.endDateTime, value); + this.ExportCommand.RaiseCanExecuteChanged(); + } } public TimeSpan SelectedTimeSpan