Beispiel #1
0
 public static void RemoveMarker(Marker m)
 {
     Markers.Remove(m);
     MarkerUpdated = true;
 }
Beispiel #2
0
 public static void InsertMarker(int index, Marker m)
 {
     Markers.Insert(index, m);
     MarkerUpdated = true;
 }
        private void toolStripButtonDelete_Click(object sender, EventArgs e)
        {
            if (SelectedMarker != null)
            {
                Controller.RemoveMarker(SelectedMarker);
                
                UpdateProcessChartForeground();
                UpdateProcessChart();

                SelectedMarker = null;                
            }
        }
        private void listBoxMarkers_DoubleClick(object sender, EventArgs e)
        {
            var Markers = Controller.GetMarkers();

            SelectedMarker = Markers[listBoxMarkers.SelectedIndex];
            
            UpdateProcessChartForeground();
            UpdateProcessChart();

            Controller.Goto(SelectedMarker.Axis1, SelectedMarker.Axis2);
        }
        private void listBoxMarkers_SelectedValueChanged(object sender, EventArgs e)
        {
            
            if (listBoxMarkers.SelectedIndex >= 0)
            {
                var Markers = Controller.GetMarkers();
                SelectedMarker = Markers[listBoxMarkers.SelectedIndex];

                UpdateProcessChartForeground();
                UpdateProcessChart();
            }
        }
        private void pictureBoxPreview_MouseDoubleClick(object sender, MouseEventArgs e)
        {            
            var NearByMarker = FindMarker(e.X, e.Y);
            if (NearByMarker != null)
            {
                // Goto a marker
                SelectedMarker = NearByMarker;
                UpdateProcessChartForeground();
                UpdateProcessChart();

                Controller.Goto(NearByMarker.Axis1, NearByMarker.Axis2);
            }
            else
            {
                // Add a new marker
                var pt = ConvertAxis(e.X, e.Y);
                if (pt != null)
                {
                    Controller.AddMarker(pt[0], pt[1]);
                    UpdateProcessChartForeground();
                    UpdateProcessChart();
                }
            }
        }