Exemplo n.º 1
0
        private void Button1_Click(object sender, EventArgs e)
        {
            System_State s = new System_State();

            try {
                from = Convert.ToInt32(textBox1.Text);
                to   = Convert.ToInt32(textBox2.Text);
                len  = Convert.ToInt32(textBox3.Text);
                at   = Convert.ToInt32(textBox4.Text);
                if (at > System_State.time && from != to)
                {
                    System_State.callinqueue = System_State.callinqueue + 1;
                    s.InsertCall(from, to, at, len);
                    this.Close();
                }
                else
                {
                    throw new ArgumentNullException("You cannot add past time or can't call self");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Exemplo n.º 2
0
 public void Button1_Click(object sender, EventArgs e)
 {
     try
     {
         link = Convert.ToInt32(textBox1.Text);
         System_State st = new System_State();
         st.Show();
         this.Hide();
     }catch (Exception ex)
     {
         MessageBox.Show("Enter the Line first:");
     }
 }