コード例 #1
0
        private void UpButton_Click(object sender, RoutedEventArgs e)
        {
            Button       btn  = (Button)sender;
            AixParameter para = (AixParameter)btn.DataContext;

            if (para.TitleName.Length < 1)
            {
                return;
            }
            int aixIndex = Convert.ToInt32(para.TitleName.Substring(0, 1));

            //ComboBox box = FindVisualChildList<ComboBox>(AixListBox, "SpeedList")[aixIndex - 1];
            //localSpeedList[aixIndex - 1] = Convert.ToSingle(box.SelectedItem);
            AixsToMove(aixIndex - 1, true);
        }
コード例 #2
0
        private void StepListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ComboBox     box  = sender as ComboBox;
            AixParameter para = (AixParameter)box.DataContext;

            if (para.TitleName.Length < 1)
            {
                return;
            }
            int selectIndex = Convert.ToInt32(para.TitleName.Substring(0, 1));

            if (StepListIndex.Count < selectIndex)
            {
                MessageBox.Show("轴数目不匹配"); return;
            }
            StepListIndex[selectIndex - 1] = box.SelectedIndex;
            localStepList[selectIndex - 1] = Convert.ToInt32(box.SelectedItem);
        }
コード例 #3
0
        private void DownButton_Click(object sender, RoutedEventArgs e)
        {
            Button       btn  = (Button)sender;
            AixParameter para = (AixParameter)btn.DataContext;

            if (para.TitleName.Length < 1)
            {
                return;
            }
            int aixIndex = Convert.ToInt32(para.TitleName.Substring(0, 1));

            if (aixIndex < 1)
            {
                return;
            }

            AixsToMove(aixIndex - 1, false);
        }