Exemplo n.º 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;
 }
Exemplo n.º 2
0
        /// <summary>
        /// show 10 random double numbers
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ButtonRandomDoubles_Click(object sender, EventArgs e)
        {
            TextBoxDouble.Clear();
            rdnDoubles.Clear();

            Random rdn = new Random();

            for (int i = 0; i <= 9; i++)
            {
                rdnDoubles.Add(Math.Round((rdn.NextDouble() * 10.0), 1));
            }
            foreach (var item in rdnDoubles)
            {
                TextBoxDouble.AppendText("  " + item.ToString());
            }

            // Debug.Write("rdnDoubles" + rdnDoubles);
            // Debug.Write("rdnDoubles" + TextBoxIntegers.Text);
        }