123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- using System.Windows.Media;
- namespace AIPractice.LabellerServer.ViewModels
- {
- class VirtualCaseViewModel:ViewModel
- {
- public string Id { get; }
- public string Name { get; }
- public string Description { get; }
- public int TotalCount { get; }
- public int LeftCount { get; }
- public Brush Color { get; }
- public bool NotStarted => LeftCount == TotalCount;
- public VirtualCaseAccountViewModel Account { get; }
- public VirtualCaseViewModel(string id, string name,string description, int totalCount, int leftCount, VirtualCaseAccountViewModel account)
- {
- Id = id;
- Name = name;
- Description = description;
- TotalCount = totalCount;
- LeftCount = leftCount;
- Account = account;
- if (leftCount == 0)
- {
- Color = Brushes.Green;
- }
- else if (leftCount == totalCount)
- {
- Color = Brushes.Red;
- }
- else if (LeftCount < totalCount)
- {
- Color = Brushes.Orange;
- }
- }
- }
- }
|