diff --git a/src/Modules/SmartThermo.Modules.Analytics/Dialogs/ViewModels/SessionDialogViewModel.cs b/src/Modules/SmartThermo.Modules.Analytics/Dialogs/ViewModels/SessionDialogViewModel.cs index 596324e..eeb8523 100644 --- a/src/Modules/SmartThermo.Modules.Analytics/Dialogs/ViewModels/SessionDialogViewModel.cs +++ b/src/Modules/SmartThermo.Modules.Analytics/Dialogs/ViewModels/SessionDialogViewModel.cs @@ -14,7 +14,7 @@ public class SessionDialogViewModel : DialogViewModelBase { private readonly INotifications _notifications; private ObservableCollection _sessionItems = new ObservableCollection(); - private bool _checkCurrentSession = true; + private bool _checkCurrentSession; private int _sessionItemsSelected; public bool CheckCurrentSession @@ -116,6 +116,7 @@ private bool CheckSessionItemsForZero() { if (SessionItems.Count != 0) return false; + _notifications.ShowInformation("Отсутствуют записи для удаления."); return true; } @@ -136,7 +137,7 @@ private async void GetSessionInfo() DateCreate = x.DateCreate, CountRecord = context.SensorInformations .Count(y => y.SensorGroup.SessionId == x.Id - && y.SensorGroup.Name == "Первая группа") + && y.SensorGroup.Name == "Первая группа") }) .Skip(1) .ToList(); diff --git a/src/Modules/SmartThermo.Modules.DataViewer/ViewModels/Represent/LoadDataViewerWindowViewModel.cs b/src/Modules/SmartThermo.Modules.DataViewer/ViewModels/Represent/LoadDataViewerWindowViewModel.cs index a98b335..39eb386 100644 --- a/src/Modules/SmartThermo.Modules.DataViewer/ViewModels/Represent/LoadDataViewerWindowViewModel.cs +++ b/src/Modules/SmartThermo.Modules.DataViewer/ViewModels/Represent/LoadDataViewerWindowViewModel.cs @@ -154,8 +154,7 @@ public LoadDataViewerWindowViewModel(IDeviceConnector deviceConnector, INotifica using var context = new Context(); var selectMode = context.SelectModes - .Where(x => x.Id == i) - .FirstOrDefault(); + .FirstOrDefault(x => x.Id == i); selectMode.Stage = _selectMode[(int)i - 1]; context.SaveChanges(); }); diff --git a/src/Modules/SmartThermo.Modules.DataViewer/Views/Charts/CustomersTooltip.xaml.cs b/src/Modules/SmartThermo.Modules.DataViewer/Views/Charts/CustomersTooltip.xaml.cs index 9e44565..6b07473 100644 --- a/src/Modules/SmartThermo.Modules.DataViewer/Views/Charts/CustomersTooltip.xaml.cs +++ b/src/Modules/SmartThermo.Modules.DataViewer/Views/Charts/CustomersTooltip.xaml.cs @@ -21,7 +21,7 @@ public CustomersTooltip() public TooltipData Data { - get { return _data; } + get => _data; set { _data = value; @@ -33,8 +33,7 @@ public TooltipData Data protected virtual void OnPropertyChanged(string propertyName = null) { - if (PropertyChanged != null) - PropertyChanged.Invoke(this, new PropertyChangedEventArgs(propertyName)); + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); } } } diff --git a/src/Modules/SmartThermo.Modules.DataViewer/Views/Represent/LoadDataViewerWindow.xaml b/src/Modules/SmartThermo.Modules.DataViewer/Views/Represent/LoadDataViewerWindow.xaml index b99e5a3..604d9b9 100644 --- a/src/Modules/SmartThermo.Modules.DataViewer/Views/Represent/LoadDataViewerWindow.xaml +++ b/src/Modules/SmartThermo.Modules.DataViewer/Views/Represent/LoadDataViewerWindow.xaml @@ -18,11 +18,7 @@ - + @@ -225,7 +219,7 @@ - - + + + Values="{Binding ChartValues[6]}" /> + Values="{Binding ChartValues[7]}" /> + Values="{Binding ChartValues[8]}" /> + Values="{Binding ChartValues[9]}" /> + Values="{Binding ChartValues[10]}" /> + Values="{Binding ChartValues[11]}" /> - + - + @@ -408,13 +398,13 @@ - 4 + 2 - 4 + 2 @@ -423,16 +413,14 @@ - + - + @@ -459,51 +447,51 @@ + Margin="8,8,4,8" + Background="{DynamicResource SystemControlBackgroundChromeMediumLowBrush}" + CornerRadius="2"> + Margin="4,8,4,8" + Background="{DynamicResource SystemControlBackgroundChromeMediumLowBrush}" + CornerRadius="2"> + Margin="4,8,8,8" + Background="{DynamicResource SystemControlBackgroundChromeMediumLowBrush}" + CornerRadius="2"> + Margin="8,8,4,8" + Background="{DynamicResource SystemControlBackgroundChromeMediumLowBrush}" + CornerRadius="2"> + Margin="4,8,4,8" + Background="{DynamicResource SystemControlBackgroundChromeMediumLowBrush}" + CornerRadius="2"> + Margin="4,8,8,8" + Background="{DynamicResource SystemControlBackgroundChromeMediumLowBrush}" + CornerRadius="2"> @@ -562,7 +550,7 @@ - 4 + 2 @@ -570,173 +558,11 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + 3 + + + 3 @@ -853,152 +685,15 @@ - + - - - - - - + + - @@ -1025,12 +720,16 @@ Grid.Row="2" Grid.Column="0" Margin="8,8,4,8" - Background="{DynamicResource SystemControlBackgroundChromeMediumLowBrush}"> - + Background="{DynamicResource SystemControlBackgroundChromeMediumLowBrush}" + CornerRadius="2"> + + + - + + + - + Margin="4,8,8,8" + Background="{DynamicResource SystemControlBackgroundChromeMediumLowBrush}" + CornerRadius="2"> + + + - + Margin="8,8,4,8" + Background="{DynamicResource SystemControlBackgroundChromeMediumLowBrush}" + CornerRadius="2"> + + + + Margin="4,8,4,8" + Background="{DynamicResource SystemControlBackgroundChromeMediumLowBrush}" + CornerRadius="2"> + Margin="4,8,8,8" + Background="{DynamicResource SystemControlBackgroundChromeMediumLowBrush}" + CornerRadius="2"> + + + + - + + + + + Values="{Binding ChartValues[18]}" /> + Values="{Binding ChartValues[19]}" /> + Values="{Binding ChartValues[20]}" /> + Values="{Binding ChartValues[21]}" /> + Values="{Binding ChartValues[22]}" /> + Values="{Binding ChartValues[23]}" /> - + - + @@ -1213,9 +940,15 @@ + + + 4 + + + - 6 + 4 @@ -1224,10 +957,811 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +