コード例 #1
0
        /// <summary>
        /// Button to change the starting point.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonChangeStartingPoint_Click(object sender, EventArgs e)
        {
            // create an instance of a dialog to generate new point
            FormPoint formPoint = new FormPoint(Properties.Resources.TitleChangeStartingPoint, decimal.ToInt32(numericUpDownDimension.Value));

            // generate new point or null (if canceled)
            float[] newPoint = formPoint.CreateNewPoint();

            // if the generated point is not null, swap it with current starting point
            if (newPoint != null)
            {
                ChangeStartingPoint(newPoint);
            }
        }
コード例 #2
0
        /// <summary>
        /// After first successful algorithm carryout, one can view the consecutive steps.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonShowSteps_Click(object sender, EventArgs e)
        {
            FormPoint formPoint = new FormPoint(Properties.Resources.TitleSteps, Steps[0].Count(), new ExpressionExt(Expression, Steps[0].Count()), Steps);

            formPoint.ShowDialog();
        }