コード例 #1
0
ファイル: MainWindow.xaml.cs プロジェクト: SQL617/Tracking
 private void image_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
 {
     System.Windows.Point p = e.GetPosition(this.Cnv);
     p.X = Math.Round(p.X);
     p.Y = Math.Round(p.Y);
     Neutrophil.addPointToList(p);
     paintLines(Neutrophil);
     updateTotals();
 }
コード例 #2
0
ファイル: MainWindow.xaml.cs プロジェクト: SQL617/Tracking
        private void image_MouseRightButtonDown(object sender, MouseButtonEventArgs e)
        {
            System.Windows.Point p = e.GetPosition(this.Cnv);
            p.X = Math.Round(p.X);
            p.Y = Math.Round(p.Y);
            IDN neutrophil = new IDN();

            neutrophil.scaleX      = (image.Source.Width / image.Width);
            neutrophil.scaleY      = (image.Source.Height / image.Height);
            neutrophil.timeChannel = tcList.ElementAt(tcIndex).fileName;
            neutrophil.name        = "LineSegment" + lineSegmentIndex.ToString();
            neutrophil.timeChannel = image.Source.ToString().Substring(image.Source.ToString().LastIndexOf('/') + 1);
            neutrophil.timeChannel = neutrophil.timeChannel.Substring(0, neutrophil.timeChannel.Length - 4);
            Neutrophil             = neutrophil;
            nList.Add(Neutrophil);
            Neutrophil.addPointToList(p);
            lineSegmentIndex++;
            var v = Neutrophil;

            listBox1.Items.Add(v);
        }