コード例 #1
0
 private void timeline_ChannelStateChanged(Timeline.EventArgs e)
 {
     foreach (Control control in Controls)
     {
         if (PixelYToBeatY(control.Top) == e.Channel.Y)
         {
             if (e.Channel.IsSelected)
                 control.BackColor = Color.FromArgb(200, 200, 200);
             else
                 control.BackColor = Color.FromArgb(130, 130, 130);
             break;
         }
     }
 }
コード例 #2
0
 private void timeline_ChannelAdded(Timeline.EventArgs e)
 {
     AddChannel(e.Channel);
 }
コード例 #3
0
        private void timeline_ChannelRemoved(Timeline.EventArgs e)
        {
            foreach (Control control in Controls)
            {
                if (PixelYToBeatY(control.Top) == e.Channel.Y)
                {
                    Controls.Remove(control);
                    break;
                }
            }

            int i = 0;
            foreach (Channel channel in timeline.Channels)
            {
                if (channel.Y >= e.Channel.Y)
                    Controls[i].Top = channel.Y * (channelPadding * 2 + channelHeight) + channelPadding;
                i++;
            }
            UpdateSize();
        }
コード例 #4
0
 private void timeline_ClipStateChanged(Timeline.EventArgs e)
 {
     foreach (Clip clip in e.Clips)
         Invalidate(ClipDimensionToPixelDimension(clip));
 }
コード例 #5
0
ファイル: CoreOperator.cs プロジェクト: olofn/db_public
        public override void FromXmlElement(XmlElement root)
        {
            PopulateOperatorWithBasicXmlElementInformation(root);

            foreach (XmlNode node in root.ChildNodes)
            {
                if (node.Name == "properties")
                {
                    for (int i = 0; i < node.ChildNodes.Count; i++)
                    {
                        XmlElement element = (XmlElement)node.ChildNodes[i];
                        if (element.Name == "byte")
                            FromXmlElementToByteProperty(element, i);
                        else if (element.Name == "color")
                            FromXmlElementToColorProperty(element, i);
                        else if (element.Name == "enum")
                            FromXmlElementToEnumProperty(element, i);
                        else if (element.Name == "float")
                            FromXmlElementToFloatProperty(element, i);
                        else if (element.Name == "int")
                            FromXmlElementToIntProperty(element, i);
                        else if (element.Name == "string")
                            FromXmlElementToStringProperty(element, i);
                        else if (element.Name == "text")
                            FromXmlElementToTextProperty(element, i);
                        else if (element.Name == "vector")
                            FromXmlElementToVectorProperty(element, i);
                    }
                }

                if (node.Name == "timeline")
                {
                    if (Timeline != null)
                        Timeline.Dispose();

                    Timeline timeline = new Timeline(this);
                    timeline.FromXmlElement((XmlElement)node);
                    Timeline = timeline;
                }
            }
        }
コード例 #6
0
        private void timeline_ClipResized(Timeline.EventArgs e)
        {
            foreach (Clip clip in e.Clips)
            {
                Invalidate(BeatDimensionToPixelDimension(clip.LastDimension));
                Invalidate(BeatDimensionToPixelDimension(clip.Dimension));
            }

            UpdateSize();
        }
コード例 #7
0
        private void timeline_ClipAdded(Timeline.EventArgs e)
        {
            foreach (Clip clip in e.Clips)
                Invalidate(BeatDimensionToPixelDimension(clip.Dimension));

            UpdateSize();
        }
コード例 #8
0
 private void timeline_ChannelStateChanged(Timeline.EventArgs e)
 {
     Invalidate(ChannelDimensionToPixelDimension(e.Channel));
     UpdateSize();
 }
コード例 #9
0
        private void timeline_ChannelRemoved(Timeline.EventArgs e)
        {
            Rectangle result = new Rectangle();

            foreach (Channel channel in timeline.Channels)
            {
                if (channel.Y >= e.Channel.Y)
                {
                    Point p = new Point(0, e.Channel.Y);
                    p = BeatPointToPixelPoint(p);
                    Rectangle dimension = new Rectangle(p.X, p.Y, Width, channelHeight);
                    result = Rectangle.Union(result, dimension);
                }
            }

            Invalidate(result);
            UpdateSize();
        }
コード例 #10
0
 private void timeline_ChannelAdded(Timeline.EventArgs e)
 {
     Point p = new Point(0, e.Channel.Y);
     p = BeatPointToPixelPoint(p);
     Rectangle rectangle = new Rectangle(p.X, p.Y, Width, channelHeight);
     Invalidate(rectangle);
     UpdateSize();
 }