PageRenderTime 20ms CodeModel.GetById 14ms app.highlight 3ms RepoModel.GetById 2ms app.codeStats 0ms

/pigeoncms/Modules/PigeonCms.VideoPlayer/views/wmvplayer.ascx.cs

http://pigeoncms.googlecode.com/
C# | 39 lines | 34 code | 5 blank | 0 comment | 0 complexity | eeb9d48fafc4502a8a12a85204a0910a MD5 | raw file
 1using System;
 2using System.Data;
 3using System.Configuration;
 4using System.Collections;
 5using System.Web;
 6using System.Web.Security;
 7using System.Web.UI;
 8using System.Web.UI.WebControls;
 9using System.Web.UI.WebControls.WebParts;
10using System.Web.UI.HtmlControls;
11using System.Web.Caching;
12using System.Collections.Generic;
13using PigeonCms;
14
15public partial class PigeonCms_VideoPlayer_wmvplayer : PigeonCms.VideoPlayerControl
16{
17    protected string LblContent = "";
18
19
20    protected void Page_Load(object sender, EventArgs e)
21    {
22        string viewFolder = Config.ModulesPath + this.BaseModule.ModuleFullName +
23            "/views/" + this.BaseModule.CurrViewFolder;
24
25        Utility.Script.RegisterClientScriptInclude(this, "silverlight", ResolveUrl(viewFolder + "/silverlight.js"));
26        Utility.Script.RegisterClientScriptInclude(this, "wmvplayer", ResolveUrl(viewFolder + "/wmvplayer.js"));
27
28        LblContent = "<script type='text/javascript'>\n";
29	    LblContent += "var cnt = document.getElementById('mediaspace');\n";
30	    LblContent += "var src = '"+ viewFolder +"/wmvplayer.xaml';\n";
31        LblContent += "var cfg = {\n"
32        + "file:'"+ base.File +"',\n"
33        + "height:'"+ base.Width +"',\n"
34        + "width:'"+ base.Height +"'\n"
35        + "};\n";
36        LblContent += "var ply = new jeroenwijering.Player(cnt,src,cfg);\n";
37        LblContent += "</script>";
38    }
39}