private void lbSession_SelectedIndexChanged(object sender, EventArgs e) { if (lbSession.SelectedItems.Count < 1) { parent.SetSelectedSessionIndex(-1); } else if (lbSession.SelectedItems.Count == 1) { Spectrum s = lbSession.SelectedItem as Spectrum; parent.SetSelectedSessionIndex(s.SessionIndex); } else { Spectrum s1 = lbSession.SelectedItems[lbSession.SelectedIndices.Count - 1] as Spectrum; Spectrum s2 = lbSession.SelectedItems[0] as Spectrum; parent.SetSelectedSessionIndices(s1.SessionIndex, s2.SessionIndex); } }
private void pane_MouseDown(object sender, MouseEventArgs e) { if (session == null || bmpPane == null || WindowState == FormWindowState.Minimized) { return; } if (e.Button == MouseButtons.Left) { if (ModifierKeys.HasFlag(Keys.Shift) && SelectedSessionIndex1 != -1) { parent.SetSelectedSessionIndices(SelectedSessionIndex1, Utils.ToArgb(bmpPane.GetPixel(e.X, bmpPane.Height - 1))); } else { parent.SetSelectedSessionIndex(Utils.ToArgb(bmpPane.GetPixel(e.X, bmpPane.Height - 1))); } } }
private void gmap_OnMarkerClick(GMapMarker item, MouseEventArgs e) { Spectrum s = item.Tag as Spectrum; parent.SetSelectedSessionIndex(s.SessionIndex); }