private void btnStatus_Click(object sender, EventArgs e) { switch (PhoneStatus) { case PhoneStatus.Ringing: { PickupPhone(); break; } case PhoneStatus.Talking: { HangupPhone(); break; } case PhoneStatus.ReadyHuman: { btnStatus.Text = "Talking (Hang Up)"; btnStatus.BackColor = Color.PowderBlue; PhoneStatus = PhoneStatus.Talking; CallLogger.LogInteraction(InteractionWho.Phone, InteractionWhat.Pickup, SystemColors.Desktop, ""); currentPhoneNum = outgoingPhoneNumber; SystemController.Instance.Office.PhoneDialingIn(Settings.Default.DefaultFromNumber, outgoingPhoneNumber); break; } } }
private void PickupPhone() { btnStatus.Text = "Talking (Hang Up)"; btnStatus.BackColor = Color.PowderBlue; PhoneStatus = PhoneStatus.Talking; CallLogger.LogInteraction(InteractionWho.Phone, InteractionWhat.Pickup, SystemColors.Desktop, ""); SystemController.Instance.Office.PhonePickedUp(currentPhoneNum, DefaultPhoneStatus == PhoneStatus.ReadyMachine?true:false); }
private void SubmitBuffer() { CallLogger.LogInteraction(InteractionWho.Phone, InteractionWhat.Say, SystemColors.Desktop, lblBuffer.Text.Replace("Buffer: ", "")); tmrDial.Enabled = false; SystemController.Instance.Office.PhoneSendingDigits(PhoneNumber, lblBuffer.Text.Replace("Buffer: ", "")); lblBuffer.Text = ""; lblBuffer.Visible = false; }
private void HangupPhone() { PhoneStatus = DefaultPhoneStatus; SystemController.Instance.Office.PhoneHungUp(outgoingPhoneNumber); CallLogger.LogInteraction(InteractionWho.Phone, InteractionWhat.Hangup, SystemColors.Desktop, ""); }