Beispiel #1
0
		public Ruler(TimeInfo timeinfo)
			: base(timeinfo)
		{
			BackColor = Color.Gray;
			recalculate();
			StaticSnapPoints = new SortedDictionary<TimeSpan, List<SnapDetails>>();
			SnapStrength = 2;
			//SnapPriorityForElements = 5;
		}
Beispiel #2
0
		public PreviewWaveform(Audio audio)
		{
			InitializeComponent();

			m_info = new TimeInfo();
			m_info.TotalTime = new TimeSpan(0, 0, 0, 1);
			m_waveform = new Waveform(m_info);
			m_waveform.BorderStyle = BorderStyle.FixedSingle;
			m_waveform.Audio = audio;
			m_waveform.BackColor = Color.LightGray;
			m_waveform.Paint += PreviewWaveform_Paint;

			Controls.Add(m_waveform);
		}
        protected TimelineControlBase(TimeInfo timeinfo)
        {
            TimeInfo = timeinfo;
            TimeInfo.TimePerPixelChanged += OnTimePerPixelChanged;
            TimeInfo.VisibleTimeStartChanged += OnVisibleTimeStartChanged;
            TimeInfo.TotalTimeChanged += OnTotalTimeChanged;
            TimeInfo.PlaybackStartTimeChanged += OnPlaybackStartTimeChanged;
            TimeInfo.PlaybackEndTimeChanged += OnPlaybackEndTimeChanged;
            TimeInfo.PlaybackCurrentTimeChanged += OnPlaybackCurrentTimeChanged;

            SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            SetStyle(ControlStyles.DoubleBuffer, true);
            SetStyle(ControlStyles.UserPaint, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            SetStyle(ControlStyles.ResizeRedraw, true);
        }
Beispiel #4
0
        protected TimelineControlBase(TimeInfo timeinfo)
        {
            AutoScaleMode = AutoScaleMode.Font;
            if (timeinfo == null)
            {
                timeinfo = new Timeline.TimeInfo();
            }

            TimeInfo = timeinfo;
            TimeInfo.TimePerPixelChanged        += OnTimePerPixelChanged;
            TimeInfo.VisibleTimeStartChanged    += OnVisibleTimeStartChanged;
            TimeInfo.TotalTimeChanged           += OnTotalTimeChanged;
            TimeInfo.PlaybackStartTimeChanged   += OnPlaybackStartTimeChanged;
            TimeInfo.PlaybackEndTimeChanged     += OnPlaybackEndTimeChanged;
            TimeInfo.PlaybackCurrentTimeChanged += OnPlaybackCurrentTimeChanged;

            SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            SetStyle(ControlStyles.DoubleBuffer, true);
            SetStyle(ControlStyles.UserPaint, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            SetStyle(ControlStyles.ResizeRedraw, true);

            Font = SystemFonts.MessageBoxFont;
        }
Beispiel #5
0
 public Ruler(TimeInfo timeinfo)
     : base(timeinfo)
 {
     AutoScaleMode = AutoScaleMode.Font;
     BackColor = Color.Gray;
     recalculate();
     StaticSnapPoints = new SortedDictionary<TimeSpan, List<SnapDetails>>();
     SnapStrength = 2;
     double factor = ScalingTools.GetScaleFactor();
     _arrowBase = (int) (16 * factor);
     _arrowLength = (int)(10 * factor);
     //SnapPriorityForElements = 5;
 }
Beispiel #6
0
 /// <summary>
 /// Creates a waveform view of the <code>Audio</code> that is associated scaled to the timeinfo.
 /// </summary>
 /// <param name="timeinfo"></param>
 public Waveform(TimeInfo timeinfo)
     : base(timeinfo)
 {
     BackColor = Color.Gray;
     Visible   = false;
 }
Beispiel #7
0
 public Ruler(TimeInfo timeinfo)
     : base(timeinfo)
 {
     BackColor = Color.Gray;
     recalculate();
 }
Beispiel #8
0
 public Ruler(TimeInfo timeinfo)
     : base(timeinfo)
 {
     BackColor = Color.Gray;
     recalculate();
 }