示例#1
0
        private void okBtn_Click(object sender, EventArgs e)
        {
            // verify input.
            try
            {
                Convert.ToInt32(countTextBox.Text);
            }
            catch (FormatException exception)
            {
                MessageBox.Show("Incorrect input: " + exception.Message, "NestProfessor DEMO");
                return;
            }

            m_nestPart.SetPriority(new NestPriorityEx(priorComboBox.SelectedIndex + 1));
            m_nestPart.SetNestCount(Convert.ToInt32(countTextBox.Text));
            m_nestPart.SetRotStyle((PART_ROT_STYLE_EX)angleComboBox.SelectedIndex);

            this.DialogResult = DialogResult.OK;
        }