コード例 #1
0
        private void pointsList_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            try
            {
                currentPointIndex = (sender as ListView).SelectedIndex;
                sortControlPoints[currentPointIndex].name = ((sender as ListView).SelectedItem as Label).Content.ToString();

                if (sortControlPoints[currentPointIndex] != null)
                {
                    currentPointEdit = new currentPointEdit(sortControlPoints[currentPointIndex], this);
                    inputTable.Navigate(currentPointEdit);
                    resultPanel.Visibility = Visibility.Visible;
                }
            }
            catch { }
        }
コード例 #2
0
        private void AddNewPoint(object sender, RoutedEventArgs e)
        {
            Label l = new Label();

            l.Content = textBox.Text;
            pointsList.Items.Add(l);
            ControlPoints points = new ControlPoints();

            points.Point            = new Point();
            points.Point.CleanValue = new CleanValue();
            points.Point.NoiseValue = new NoiseValue();
            sortControlPoints.Add(points);
            pointsList.SelectedItem = pointsList.Items.Count - 1;
            currentPointIndex       = pointsList.Items.Count - 1;
            currentPointEdit        = new currentPointEdit(points, this);

            inputTable.Navigate(new Page());
            resultPanel.Visibility  = Visibility.Hidden;
            reportButton.Visibility = Visibility.Visible;
            page.Close();
        }