diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-02-20 13:41:07 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-02-20 13:41:07 +0200 |
| commit | 98507ffd2075fcd7ae69d97d4f4795ca8c85c646 (patch) | |
| tree | 999c447b61eff83d281be889d2cce3e36c1c3e23 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters | |
| parent | 51c59649e78ea81d88c52ca7a0f61d53e9ac83fe (diff) | |
| download | Tango-98507ffd2075fcd7ae69d97d4f4795ca8c85c646.tar.gz Tango-98507ffd2075fcd7ae69d97d4f4795ca8c85c646.zip | |
Added duration to jobs table.
Added color catalogs table.
Added +n segments to jobs table.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/MillisecondsToTimeSpanConverter.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/MillisecondsToTimeSpanConverter.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/MillisecondsToTimeSpanConverter.cs new file mode 100644 index 000000000..70b7ce191 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/MillisecondsToTimeSpanConverter.cs @@ -0,0 +1,30 @@ +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.MachineStudio.Developer.Converters +{ + public class MillisecondsToTimeSpanConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value != null) + { + return TimeSpan.FromMilliseconds(System.Convert.ToInt32(value)); + } + else + { + return null; + } + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} |
