本文整理汇总了C#中Call.Finish方法的典型用法代码示例。如果您正苦于以下问题:C# Call.Finish方法的具体用法?C# Call.Finish怎么用?C# Call.Finish使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Call
的用法示例。
在下文中一共展示了Call.Finish方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OurCallStatus
public void OurCallStatus(Call call, TCallStatus status)
{
try
{
if (status == TCallStatus.clsInProgress /*call.VideoSendStatus == TCallVideoSendStatus.vssAvailable*/)
{
call.StartVideoSend();
}
}
catch
{
}
// Always use try/catch with ANY Skype calls.
try
{
if (status == TCallStatus.clsRinging)
{
if (numCalls == 0)
{
call.Answer();
callID = call.Id;
numCalls++;
}
else if (numCalls == 1 && callID != call.Id)
{
try
{
this.BeginInvoke((Action)(() =>
{
call.Finish();
}));
}
catch (InvalidCastException e)
{
}
}
}
// If this call is from a SkypeIn/Online number, show which one.
else if (call.Type == TCallType.cltIncomingP2P && status == TCallStatus.clsInProgress && call.Id == callID)
{
selectedSkypeChatUser = call.PartnerHandle.ToString();
this.BeginInvoke((Action)(() =>
{
skype.SendMessage(selectedSkypeChatUser, Properties.Settings.Default.controllerMessage);
}));
chatUserSelected = true;
user_combobox.ResetText();
user_combobox.SelectedText = call.PartnerHandle.ToString();
if (!skypeUserTabs.Contains(new SkypeUserTab(call.PartnerHandle)))
{
user_combobox.Items.Add(call.PartnerHandle);
var newTabUser = new SkypeUserTab(call.PartnerHandle);
skypeUserTabs.Add(newTabUser);
tabUsers.Controls.Add(newTabUser.tabPage);
}
}
else if (status == TCallStatus.clsFinished && call.Id == callID)
{
numCalls--;
callID = 0;
}
}
catch (Exception e)
{
}
}
示例2: FinishCall
private Result FinishCall(Call call)
{
if (call == null)
return Result.Failed;
try
{
call.Finish();
return Result.Successful;
}
catch
{
return Result.Failed;
}
}
示例3: skype_CallStatus
private void skype_CallStatus(Call call, TCallStatus status)
{
if (status == TCallStatus.clsRinging)
{
if (call.PartnerHandle == txbConsultant.Text)
{
call.Answer();
Point screenBounds = ScreenBounds;
SkypeAutomation.SkypeObj.SendMessage(txbConsultant.Text, string.Format("screenbounds({0},{1})", screenBounds.X, screenBounds.Y));
SkypeAutomation.ShareFullScreen();
}
else
call.Finish();
}
}