Beispiel #1
0
 /// <summary>
 /// Clear alll text boxes
 /// invisiable label results
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void ButtonClear_Click(object sender, EventArgs e)
 {
     //clear everthing
     TextBoxDouble.Clear();
     TextBoxIntegers.Clear();
     TextBoxSeachDouble.Clear();
     TextBoxSeachInteger.Clear();
     labelResultDouble.Visible  = false;
     labelResultInteger.Visible = false;
     labelWarning.Visible       = false;
 }
Beispiel #2
0
        /// <summary>
        /// show 10 random integers numbers
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ButtonRandomIntegers_Click(object sender, EventArgs e)
        {
            TextBoxIntegers.Clear();
            rdnIntegers.Clear();
            Random rdn = new Random();

            for (int i = 0; i <= 9; i++)
            {
                rdnIntegers.Add(rdn.Next(0, 9));
            }

            foreach (var item in rdnIntegers)
            {
                TextBoxIntegers.Text = string.Join("  ", rdnIntegers);
            }
            //TextBoxIntegers.Text = String.Join(",", rdnIntegers);
            //Debug.Write("rdnIntegers" + rdnIntegers);
            //Debug.Write("rdnIntegers" + TextBoxIntegers.Text);
        }