private void SetActivePhoneCallToFirstOne() { //TODO!!! if (ItsViewForm.NumberOfActivePhoneCalls == 1) { ItsViewForm.SetActiveCallToFirstOne(); } }
public override void CameraTestStateChanged(bool isEnable) { if (isEnable) { ItsViewForm.DisableVideoControlButton(); } else { ItsViewForm.EnableVideoControlButton(); } }
/// <summary> /// Clears the display, or hangs up the call. /// </summary> /// <remarks> /// If the display contains text is going to be cleared, /// otherwise the selected call is going to be hung up. /// </remarks> protected void ClearDisplayOrHangUp() { if (ItsViewForm.ItsDisplay.Text.Length != 0) { ItsViewForm.ItsDisplay.Text = string.Empty; return; } if (ItsViewForm.ItsDisplay.Text.Equals(String.Empty) && ItsViewForm.SelectedCall != null) { //ItsViewForm.SoftPhoneModel.HangUpCall(ItsViewForm.SelectedCall); ItsViewForm.HangUpSelectedCall(); return; } }
/// <summary> /// Creates a call on the selected phone line. /// </summary> protected void CreateCall() { /* If the display doesn't contain text, there is no number to dial. */ if (ItsViewForm.ItsDisplay.Text.Length == 0) { return; } /* If there is no selected line, it can't call. * */ if (ItsViewForm.SelectedLine == null) { return; } string dial = ItsViewForm.ItsDisplay.Text; ItsViewForm.ItsDisplay.Text = string.Empty; ItsViewForm.CreateCall(dial); }
/// <summary> /// The state change function. /// </summary> protected void ChangeState() { if (ItsViewForm.NumberOfActivePhoneLines == 0 && ItsViewForm.NumberOfActivePhoneCalls == 0) { /* No lines, no calls. * */ ItsViewForm.SetGUIState(new NoLineAndNoCall(ItsViewForm)); } if (ItsViewForm.NumberOfActivePhoneLines > 0 && ItsViewForm.NumberOfActivePhoneCalls == 0) { /* There are some lines, and no calls. * */ ItsViewForm.SetGUIState(new LineAndNoCall(ItsViewForm)); return; } if (ItsViewForm.NumberOfActivePhoneLines > 0 && ItsViewForm.NumberOfActivePhoneCalls > 0) { /* There are some lines and there are some calls. * */ ItsViewForm.SetGUIState(new LineAndCall(ItsViewForm)); return; } if (ItsViewForm.NumberOfActivePhoneLines == 0 && ItsViewForm.NumberOfActivePhoneCalls > 0) { /* There are no lines and there are some calls. * This is very strange, but possible, due to * SIP properties, you can simply cancel the registration of a * line phone and keep talking on a call. It's normal. * */ ItsViewForm.SetGUIState(new NoLineAndCall(ItsViewForm)); return; } }
/// <summary> /// Rejects the incoming call. /// </summary> public override void HangUpPressed() { ItsViewForm.RejectIncomingCall(); ChangeState(); ItsViewForm.ItsDisplay.Text = string.Empty; }
/// <summary> /// Accepts incoming call. /// </summary> public override void PickUpPressed() { ItsViewForm.AcceptIncomingCall(); ChangeState(); ItsViewForm.ItsDisplay.Text = string.Empty; }