本文整理汇总了C#中IPlayer.SetLink方法的典型用法代码示例。如果您正苦于以下问题:C# IPlayer.SetLink方法的具体用法?C# IPlayer.SetLink怎么用?C# IPlayer.SetLink使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IPlayer
的用法示例。
在下文中一共展示了IPlayer.SetLink方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadBackground
/// <summary>
/// Load background template
/// </summary>
/// <param name="templateid"></param>
public void LoadBackground(TemplateInfo tempinfo, string id)
{
try
{
objBGPlayer = Activator.CreateInstance(tempinfo.TemplatePlayerInfo) as IPlayer;
if (objBGPlayer != null)
{
objBGPlayer.Init("", "", id, "");
objBGPlayer.SetLink(AppLink, tempinfo.MetaDataXml);
if (objBGPlayer is IAddinInfo)
(objBGPlayer as IAddinInfo).Init(new InstanceInfo() { InstanceId = id });
IChannelShotBox objChannelShotBox = objBGPlayer as IChannelShotBox;
if (objChannelShotBox != null)
{
objChannelShotBox.SetEngineUrl(m_serverurl);
}
objBGPlayer.OnShotBoxStatus += objPlayer1_OnShotBoxStatus;
objBGPlayer.OnShotBoxControllerStatus += objPlayer1_OnShotBoxStatus;
objBGPlayer.Prepare(m_serverurl, 0, string.Empty, RENDERMODE.PROGRAM);
}
}
catch (Exception ex)
{
LogWriter.WriteLog(ex);
}
}
示例2: GetTemplate
/// <summary>
/// Method to get template details and player
/// </summary>
/// <param name="str"></param>
/// <param name="column"></param>
private void GetTemplate(string str, string column)
{
try
{
string columnname = column;
ScenInfo si = m_lstSceneCollection.Where(s => s.Description == str).FirstOrDefault();
TemplateInfo obj = objPlayergetter.GetPlayerInfo(si.Id);
m_objPlayer = Activator.CreateInstance(obj.TemplatePlayerInfo) as IPlayer;
Form objfrm = m_objPlayer as Form;
SetMatchUdt(objfrm);
if (m_objPlayer != null)
{
m_objPlayer.Init("", "", si.Id, "");
m_objPlayer.SetLink(m_objsceneHandler.AppLink, obj.MetaDataXml);
//S. No 116: Added for AddIn
//S.No. : - 128
if (m_objPlayer is IAddinInfo)
(m_objPlayer as IAddinInfo).Init(new InstanceInfo() { InstanceId = si.Id });
IDataEntry objDataentry = m_objPlayer as IDataEntry;
if (objDataentry != null)
{
objDataentry.PostData += objDataentry_PostData;
}
IChannelShotBox objChannelShotBox = m_objPlayer as IChannelShotBox;
if (objChannelShotBox != null)
{
objChannelShotBox.SetEngineUrl(m_serverurl);
}
m_objPlayer.OnShotBoxControllerStatus += objPlayer_OnShotBoxControllerStatus;
m_objPlayer.Prepare(m_serverurl, Convert.ToInt32(m_objPlayer.ZORDER), string.Empty, RENDERMODE.PROGRAM);
}
if (columnname != "-1")
{
objfrm.TopLevel = false;
objfrm.Visible = false;
objfrm.Dock = DockStyle.Fill;
Control ctl = null;
Control ctl2 = null;
if (string.Compare(columnname, "Column2", StringComparison.OrdinalIgnoreCase) == 0)
{
ctl = tableLayoutPanel1.GetControlFromPosition(0, 0);
if (ctl != null) // Already control present there
{
//First play out the graphic.
//then delete the gfx
tableLayoutPanel1.Controls.Remove(ctl);
(ctl as IPlayer).DeleteSg();
tableLayoutPanel1.Controls.Add(objfrm, 0, 0);
}
}
if (string.Compare(columnname, "Column3", StringComparison.OrdinalIgnoreCase) == 0)
{
ctl2 = tableLayoutPanel1.GetControlFromPosition(1, 0);
if (ctl2 != null) // Already control present there
{
//First play out the graphic.
//then delete the gfx
tableLayoutPanel1.Controls.Remove(ctl2);
(ctl2 as IPlayer).DeleteSg();
tableLayoutPanel1.Controls.Add(objfrm, 1, 0);
}
}
if (ctl == null && (string.Compare(columnname, "Column2",StringComparison.OrdinalIgnoreCase) == 0))
{
tableLayoutPanel1.Controls.Add(objfrm, 0, 0);
}
else if (ctl2 == null && (string.Compare(columnname, "Column3", StringComparison.OrdinalIgnoreCase) == 0))
{
tableLayoutPanel1.Controls.Add(objfrm, 1, 0);
}
objfrm.Show();
}
}
catch (Exception ex)
{
LogWriter.WriteLog(ex);
}
}