diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2023-05-18 12:02:21 +0300 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2023-05-18 12:02:21 +0300 |
| commit | ead5472228247e3a3f3da2ba213815ee4d8e2e26 (patch) | |
| tree | de0bd04eece09fa895a21cf394efdbe26ba91692 /Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ProgressUnitSpoolConverter.cs | |
| parent | 8e77a83a73410f388b3a879c3082eb7bf6064657 (diff) | |
| download | Tango-ead5472228247e3a3f3da2ba213815ee4d8e2e26.tar.gz Tango-ead5472228247e3a3f3da2ba213815ee4d8e2e26.zip | |
Bugs in Overview: Copies in Progress run (*4) and if job completed - length ( was 0).
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ProgressUnitSpoolConverter.cs')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ProgressUnitSpoolConverter.cs | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ProgressUnitSpoolConverter.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ProgressUnitSpoolConverter.cs new file mode 100644 index 000000000..054ccd3df --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ProgressUnitSpoolConverter.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Data; + +namespace Tango.PPC.UI.Converters +{ + public class ProgressUnitSpoolConverter : IMultiValueConverter + { + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + try + { + if (values.Count() == 1)//may be added count of spools + { + int CurrentUnit = System.Convert.ToInt16(values[0]); + CurrentUnit +=1; + var totalBy4Spools = (double)CurrentUnit * 4;// spools ; + + return totalBy4Spools.ToString(); + + } + + return "-"; + } + catch + { + return "-"; + } + } + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} |
