aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.CodeGeneration/EntityDTOCodeFile.cs
blob: eb97dcd9097c4531c457d5c192ca4326ea85d4ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Tango.CodeGeneration
{
    /// <summary>
    /// Represents a database entity DTO code file.
    /// </summary>
    /// <seealso cref="Tango.CodeGeneration.Class" />
    public class EntityDTOCodeFile : Class
    {
        public String ObservableType { get; set; }

        public String InheritedType { get; set; }
    }
}
an class="p">; using Tango.Core; namespace Tango.PPC.UI.Models { public class MachineOverviewErrorStates : ExtendedObject { public ObservableCollection<MachineOverviewErrorItem> Winders { get; set; } public ObservableCollection<MachineOverviewErrorItem> Dancers { get; set; } public ObservableCollection<MachineOverviewErrorItem> BTSRs { get; set; } public MachineOverviewErrorStates() { Winders = new ObservableCollection<MachineOverviewErrorItem>(); Dancers = new ObservableCollection<MachineOverviewErrorItem>(); BTSRs = new ObservableCollection<MachineOverviewErrorItem>(); for ( int i = 0; i < 4 ; i++) { Winders.Add( new MachineOverviewErrorItem()); Dancers.Add(new MachineOverviewErrorItem()); BTSRs.Add(new MachineOverviewErrorItem()); } } public void UpdateWinders(List<bool> updates) { if(!UpdateCollection(Winders, updates)) { LogManager.Log("Error in display Winders Errors. Number of Winders In Error is less then 4!"); } } public void UpdateDancers(List<bool> updates) { if(!UpdateCollection(Dancers, updates)) { LogManager.Log("Error in display Dancers Errors. Number of Dancers In Error is less then 4!"); } } public void UpdateBTSRs(List<bool> updates) { if(!UpdateCollection(BTSRs, updates)) { LogManager.Log("Error in display BTSRs Errors. Number of BTSRs In Error is less then 4!"); } } private bool UpdateCollection(ObservableCollection<MachineOverviewErrorItem> collection, List<bool> updates ) { if (collection.Count == updates.Count) { for (int i = 0; i < collection.Count; i++) { collection[i].IsErrorState = updates[i]; } return true; } return false; } } }