Esempio n. 1
0
        private void timeLineViewPort_TimeSpanChanged(object sender, TimeLineViewPort.ViewTimeSpan timeSpan)
        {
            string[] list = db.ActiveHandlers();
            multiSelectComboBox1.Items.Clear();
            multiSelectComboBox1.Items.AddRange(list);

            dateTimePickerBegin.Value   = timeSpan.FirstTimeStamp();
            dateTimePickerBegin.MaxDate = timeSpan.LastTimeStamp();
            dateTimePickerEnd.Value     = timeSpan.LastTimeStamp();
            dateTimePickerEnd.MinDate   = timeSpan.FirstTimeStamp();
            toolButtonResetZoom.Enabled = true;

            try
            {
                listView1.SelectedIndices.Clear();
                timestampList             = db.GetTimestampsBetween(db.FirstTimeStamp(), db.LastTimeStamp());
                listView1.VirtualListSize = timestampList.Count;
                listView1.SelectedIndices.Clear();
                if (timestampList.Count > 0)
                {
                    listView1.SelectedIndices.Add(0);
                }
            }
            catch (Exception) { }
        }
Esempio n. 2
0
 private void timeLineViewPort_SelectionChanged(object sender, TimeLineViewPort.ViewTimeSpan timeSpan)
 {
     toolButtonZoomSelection.Enabled = timeSpan.FirstTimeStamp() != timeSpan.LastTimeStamp();
     toolButtonZoomLeft.Enabled      = !toolButtonZoomSelection.Enabled;
     toolButtonZoomRight.Enabled     = !toolButtonZoomSelection.Enabled;
 }