Пример #1
0
        /// <summary>
        /// This function opens the first 50 fibonacci numbers and shows on the notepad.
        /// </summary>
        /// <param name="sender">
        /// sender contains a reference to the control/object that raised the event.
        /// </param>
        /// <param name="e">
        ///  e containts the event data.
        /// </param>
        private void loadFibonacciNumbersfirst50ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FibonacciTextReader fib = new FibonacciTextReader(50);

            this.Load(fib);
        }
Пример #2
0
        /// <summary>
        /// Generates the first 100 numbers of the Fibonacci series and places them in the textbox.
        /// </summary>
        /// <param name="sender">The sending object.</param>
        /// <param name="e">The function pointer delegates.</param>
        private void Button3_Click(object sender, EventArgs e)
        {
            FibonacciTextReader ftr = new FibonacciTextReader(100); // Generate a Fibonacci series of 100 numbers.

            this.textBox1.Text = ftr.ReadToEnd();                   // Replace text box text with the result of the Fibonacci series.
        }