コード例 #1
0
        private void SaveButton_Click(object sender, RoutedEventArgs e)
        {
            DialogResult = true;
            _selectAlpha = byte.Parse(AlphaTextBox.Text);
            _selectSize  = int.Parse(SizeTextBox.Text);
            _selectIndex = int.Parse(IndexTextBox.Text);

            _selectPoint   = PointTypeComboBox.SelectedIndex;
            _selectAxis    = (CA_Model.Axis)AxisMeshComboBox.SelectedIndex;
            _selectPoint2D = Point2DComboBox.SelectedIndex;

            Close();
        }
コード例 #2
0
        private void ChartTypButton_Click(object sender, RoutedEventArgs e)
        {
            TypeChartWindow chartWindow = new TypeChartWindow(_styleType)
            {
                Length        = CA.Length,
                SelectAlpha   = _selectAlpha,
                SelectAxis    = _selectAxis,
                SelectColor   = _selectColor,
                SelectPoint   = GetIndexPointType(_selectPointMarker),
                SelectSize    = (int)_selectPointMarker.Size,
                SelectIndex   = _selectIndex,
                SelectChart   = _selectChart,
                SelectPoint2D = GetIndexPoint2DType(_selectPointMarker2D)
            };

            if (chartWindow.ShowDialog() == true)
            {
                _selectAlpha = chartWindow.SelectAlpha;
                if (((_selectChart == Chart.PointChart2D) && (chartWindow.SelectChart < Chart.PointChart2D)) || ((chartWindow.SelectChart == Chart.PointChart2D) && (_selectChart < Chart.PointChart2D)))
                {
                    _selectChart = chartWindow.SelectChart;
                    AddCharting();
                }
                else
                {
                    _selectChart = chartWindow.SelectChart;
                }
                _selectColor         = chartWindow.SelectColor;
                _selectIndex         = chartWindow.SelectIndex;
                _selectAxis          = chartWindow.SelectAxis;
                _selectPointMarker   = GetPoint(chartWindow.SelectPoint, chartWindow.SelectSize);
                _selectPointMarker2D = GetPoint2D(chartWindow.SelectPoint2D);

                SetAxis();
                Paint();
            }
        }