private void Drop(ChannelNode channelNode, Point point)
        {
            var channel         = channelNode.Parents.FirstOrDefault(x => x.IsRgbNode()) ?? channelNode;
            var channelLocation = new ChannelLocation {
                LeftOffset = point.X, TopOffset = point.Y, ChannelId = channel.Id
            };

            ChannelLocations.Add(channelLocation);
        }
 public void UpdateChannelColors(Dictionary <ChannelNode, Color> colorsByChannel)
 {
     foreach (var colorByChannel in colorsByChannel)
     {
         var channelId       = colorByChannel.Key.Id;
         var channelLocation = ChannelLocations.FirstOrDefault(x => x.ChannelId == channelId);
         if (channelLocation != null)
         {
             var color = colorByChannel.Value;
             channelLocation.ChannelColor = color == Colors.Black ? Colors.Transparent : color;
         }
     }
 }
        public DisplayItem Clone()
        {
            var item = new DisplayItem
            {
                Width            = Width,
                Height           = Height,
                LeftOffset       = LeftOffset,
                TopOffset        = TopOffset,
                ChannelLocations =
                    new ObservableCollection <ChannelLocation>(
                        ChannelLocations.Select(channelLocation => channelLocation.Clone()).ToList()),
                IsUnlocked = IsUnlocked
            };

            return(item);
        }
 private void RemoveChannel()
 {
     ChannelLocations.Remove(SelectedChannelLocation);
 }