public MapTimelineControl() { this.m_mtsSeek = new MapTimelineSeekButton(); this.TimelineButtons = new List <MapObject>(); GraphicsPath gpButtonPath = new GraphicsPath(); gpButtonPath.AddLines(new Point[] { new Point(0, 6), new Point(6, 12), new Point(6, 6), new Point(12, 12), new Point(12, 0), new Point(6, 6), new Point(6, 0), new Point(0, 6) }); gpButtonPath.CloseFigure(); MapTimelineControlButton mtbButton = new MapTimelineControlButton(gpButtonPath, MapTimelineControlButtonType.Rewind); mtbButton.TimelineControlButtonClicked += new MapTimelineControlButton.TimelineControlButtonClickedHandler(mtbButton_TimelineControlButtonClicked); this.TimelineButtons.Add(mtbButton); gpButtonPath = new GraphicsPath(); gpButtonPath.AddRectangles(new Rectangle[] { new Rectangle(0, 0, 4, 12), new Rectangle(8, 0, 4, 12) }); mtbButton = new MapTimelineControlButton(gpButtonPath, MapTimelineControlButtonType.Pause); mtbButton.TimelineControlButtonClicked += new MapTimelineControlButton.TimelineControlButtonClickedHandler(mtbButton_TimelineControlButtonClicked); this.TimelineButtons.Add(mtbButton); gpButtonPath = new GraphicsPath(); gpButtonPath.AddLines(new Point[] { new Point(1, 0), new Point(1, 12), new Point(9, 6), new Point(1, 0) }); gpButtonPath.CloseFigure(); mtbButton = new MapTimelineControlButton(gpButtonPath, MapTimelineControlButtonType.Play); mtbButton.ForegroundColour = Color.LightSeaGreen; mtbButton.TimelineControlButtonClicked += new MapTimelineControlButton.TimelineControlButtonClickedHandler(mtbButton_TimelineControlButtonClicked); this.TimelineButtons.Add(mtbButton); gpButtonPath = new GraphicsPath(); gpButtonPath.AddLines(new Point[] { new Point(0, 0), new Point(0, 12), new Point(6, 6), new Point(6, 12), new Point(12, 6), new Point(6, 0), new Point(6, 6), new Point(0, 0) }); gpButtonPath.CloseFigure(); mtbButton = new MapTimelineControlButton(gpButtonPath, MapTimelineControlButtonType.FastForward); mtbButton.TimelineControlButtonClicked += new MapTimelineControlButton.TimelineControlButtonClickedHandler(mtbButton_TimelineControlButtonClicked); this.TimelineButtons.Add(mtbButton); this.SelectedButtonType = MapTimelineControlButtonType.Play; this.m_flControlChangeSpeed = 2.0F; }
public MapTimelineControl() { this.m_mtsSeek = new MapTimelineSeekButton(); this.TimelineButtons = new List<MapObject>(); GraphicsPath gpButtonPath = new GraphicsPath(); gpButtonPath.AddLines(new Point[] { new Point(0, 6), new Point(6, 12), new Point(6, 6), new Point(12, 12), new Point(12, 0), new Point(6, 6), new Point(6, 0), new Point(0, 6) }); gpButtonPath.CloseFigure(); MapTimelineControlButton mtbButton = new MapTimelineControlButton(gpButtonPath, MapTimelineControlButtonType.Rewind); mtbButton.TimelineControlButtonClicked += new MapTimelineControlButton.TimelineControlButtonClickedHandler(mtbButton_TimelineControlButtonClicked); this.TimelineButtons.Add(mtbButton); gpButtonPath = new GraphicsPath(); gpButtonPath.AddRectangles(new Rectangle[] { new Rectangle(0, 0, 4, 12), new Rectangle(8, 0, 4, 12) }); mtbButton = new MapTimelineControlButton(gpButtonPath, MapTimelineControlButtonType.Pause); mtbButton.TimelineControlButtonClicked += new MapTimelineControlButton.TimelineControlButtonClickedHandler(mtbButton_TimelineControlButtonClicked); this.TimelineButtons.Add(mtbButton); gpButtonPath = new GraphicsPath(); gpButtonPath.AddLines(new Point[] { new Point(1, 0), new Point(1, 12), new Point(9, 6), new Point(1, 0) }); gpButtonPath.CloseFigure(); mtbButton = new MapTimelineControlButton(gpButtonPath, MapTimelineControlButtonType.Play); mtbButton.ForegroundColour = Color.LightSeaGreen; mtbButton.TimelineControlButtonClicked += new MapTimelineControlButton.TimelineControlButtonClickedHandler(mtbButton_TimelineControlButtonClicked); this.TimelineButtons.Add(mtbButton); gpButtonPath = new GraphicsPath(); gpButtonPath.AddLines(new Point[] { new Point(0, 0), new Point(0, 12), new Point(6, 6), new Point(6, 12), new Point(12, 6), new Point(6, 0), new Point(6, 6), new Point(0, 0) }); gpButtonPath.CloseFigure(); mtbButton = new MapTimelineControlButton(gpButtonPath, MapTimelineControlButtonType.FastForward); mtbButton.TimelineControlButtonClicked += new MapTimelineControlButton.TimelineControlButtonClickedHandler(mtbButton_TimelineControlButtonClicked); this.TimelineButtons.Add(mtbButton); this.SelectedButtonType = MapTimelineControlButtonType.Play; this.m_flControlChangeSpeed = 2.0F; }