aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/EmbeddedLogItemDetailsViewVM.cs
blob: 8dc745263f91b7bca141eadd0f9b4f0620cb25c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.Integration.Logging;
using Tango.Logging;
using Tango.SharedUI;

namespace Tango.PPC.Technician.Dialogs
{
    public class EmbeddedLogItemDetailsViewVM : DialogViewVM
    {
        private EmbeddedLogItem _log;
        public EmbeddedLogItem Log
        {
            get { return _log; }
            set { _log = value; RaisePropertyChangedAuto(); }
        }
    }
}
"> public override double CalculateNanoliterPerCentimeter(LiquidVolume liquidVolume) { if (liquidVolume.Configuration != null && liquidVolume.RML != null && liquidVolume.ProcessParametersTable != null) { double nlPcmSum = liquidVolume.BrushStop.LiquidVolumes.Where(x => (IdsPackFormulas)x.IdsPack.IdsPackFormula.Code == IdsPackFormulas.StandardColor).Sum(x => x.NanoliterPerCentimeter); double minInkUptake = liquidVolume.ProcessParametersTable.MinInkUptake; double virtual_volume = Math.Max(0, minInkUptake - nlPcmSum); return virtual_volume; //(liquidVolume.Volume / 100d) * (Math.Min(liquidVolume.LiquidMaxNanoliterPerCentimeter, liquidVolume.ProcessParametersTable.MinInkUptake)); } else { return 0d; } } /// <summary> /// Coerces the specified liquid volume. /// </summary> /// <param name="liquidVolume">The liquid volume.</param> /// <returns></returns> public override double CoerceVolume(LiquidVolume liquidVolume) { if (liquidVolume.ProcessParametersTable != null) { //double nlPcmSum = liquidVolume.BrushStop.LiquidVolumes.Where(x => (IdsPackFormulas)x.IdsPack.IdsPackFormula.Code == IdsPackFormulas.StandardColor).Sum(x => x.NanoliterPerCentimeter); //double minInkUptake = liquidVolume.ProcessParametersTable.MinInkUptake; //double volume = ((liquidVolume.LiquidMaxNanoliterPerCentimeter - nlPcmSum) / liquidVolume.LiquidMaxNanoliterPerCentimeter) * 100d; return Math.Max(100d - liquidVolume.BrushStop.LiquidVolumes.Where(x => (IdsPackFormulas)x.IdsPack.IdsPackFormula.Code == IdsPackFormulas.StandardColor).Sum(x => x.Volume), 0); } else { return liquidVolume.Volume; } } } }