aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/RmlsViewVM.cs
blob: a82624c8a3162b7477bd5f2f4e775dd6fff46fb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.BL.Entities;
using Tango.MachineStudio.Common.Notifications;

namespace Tango.MachineStudio.DB.ViewModels
{
    public class RmlsViewVM : DbTableViewModel<Rml>
    {
        public RmlsViewVM(INotificationProvider notification) : base(notification)
        {
        }
    }
}
>public class JobToColumnDefinitionsConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { Job job = value as Job; List<ColumnDefinition> columns = new List<ColumnDefinition>(); double totalLength = job.Segments.Sum(x => x.Length); foreach (var segment in job.Segments) { columns.Add(new ColumnDefinition() { Width = new GridLength(segment.Length / totalLength, GridUnitType.Star) }); } return columns; } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { throw new NotImplementedException(); } } }