Example #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            lineIsBusy = true;

            currentCall.CallTime = DateTime.Now;

            currentCall.buttonEnablerChange(button3, true);
            currentCall.buttonEnablerChange(button2, false);
            currentCall.buttonEnablerChange(button1, false);
            currentCall.buttonEnablerChange(button5, false);

            currentCall.AddCallToLabel(label6);
            generateCalls();
        }
Example #2
0
 private void createCall()
 {
     while (true)
     {
         if (lineIsBusy == false)
         {
             Thread.Sleep(1000);
             Random rand    = new Random();
             int    userIK  = rand.Next(0, myContacts.ExampleContactList.Count);
             int    phoneIK = rand.Next(0, myContacts.ExampleContactList[userIK].phoneNumbers.Count);
             currentCall               = new Call();
             currentCall.ContactName   = myContacts.ExampleContactList[userIK].name;
             currentCall.CallDirection = (Direction)0;
             currentCall.CallTime      = DateTime.Now;
             currentCall.ContactNumber = myContacts.ExampleContactList[userIK].phoneNumbers[phoneIK];
             currentCall.AddCallToLabel(label3);
             currentCall.buttonEnablerChange(button1, true);
             Thread.Sleep(5000);
         }
     }
 }