public RestoreItemsSelectionViewModel() { TargetFolderGaugeList.Add(new ChartGaugeView(System.Windows.Media.Brushes.Red, System.Windows.Media.Brushes.Green, System.Windows.Media.Brushes.Yellow) { PumpNumber = null, GaugeValue = 0.0F }); }
public BackupItemsSelectionViewModel() { float ratioTotal = 0; if (ProjectData.CurrentBackupProfile?.BackupTargetDiskSizeNumber != null && (float)ProjectData.CurrentBackupProfile?.BackupTargetDiskSizeNumber > 0) { ratioTotal = (float)ProjectData.CurrentBackupProfile?.BackupTargetFreeSizeNumber / (float)ProjectData.CurrentBackupProfile?.BackupTargetDiskSizeNumber; } TargetFolderGaugeList.Add(new ChartGaugeView(System.Windows.Media.Brushes.Red, System.Windows.Media.Brushes.Green, System.Windows.Media.Brushes.Yellow) { PumpNumber = "Storage", GaugeValue = ratioTotal }); float ratiobackup = 0; if (ProjectData.CurrentBackupProfile?.BackupTargetDiskSizeNumber != null && (float)ProjectData.CurrentBackupProfile?.BackupTargetDiskSizeNumber > 0) { ratiobackup = (float)ProjectData.CurrentBackupProfile?.BackupTargetUsedSizeNumber / (float)ProjectData.CurrentBackupProfile?.BackupTargetDiskSizeNumber; } TargetFolderGaugeList.Add(new ChartGaugeView(System.Windows.Media.Brushes.Red, System.Windows.Media.Brushes.Green, System.Windows.Media.Brushes.Yellow) { PumpNumber = "Backup", GaugeValue = ratiobackup }); }