<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ChartStaticView.aspx.cs" Inherits="InfoPath.Chart.ChartStaticView" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
    <script type="text/javascript" src="../JS/Visifire2.js"></script>
    <object id="WebBrowser"  classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"  height="0"  width="0" VIEWASTEXT>
    </object>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
          <script type="text/javascript" >
              function Finder(xml, width, height) {
                  var width = width;
                  var height = height;
                  var xml = xml;
                  var vChart = new Visifire2('../ClientBin/slc.xap', "MyChart", width, height);
                vChart.setDataUri(xml);
                // Render chart
                vChart.render("Chart1");
            }
            function setPrint() {
                factory.printing.header = "silverlight打印";
                factory.printing.footer = "";
                factory.printing.portrait = false;
                factory.printing.leftMargin = 1.0;
                factory.printing.topMargin = 1.0;
                factory.printing.rightMargin = 1.0;
                factory.printing.bottomMargin = 0.0;
            }

            //GoBack
            function GoBack(formid, formname) {
                window.location.href = "ContentList.aspx?FormName=" + formname + "&FormID=" + formid;

            }

            function GoBack() {
                window.history.go(-1);

            }

            //打印
            function print() {
                setTimeout("document.WebBrowser.ExecWB(6, 1)", 500);
                document.getElementById("btn").style.display = 'none';
            }

            //页面设定
            function pageSetup() {
                setTimeout("document.WebBrowser.ExecWB(8, 1)", 500);
            }

            //打印预览
            function printPreview() {
                //            parent.document.getElementById("mainFrame").style.display = "none"
                setTimeout("document.WebBrowser.ExecWB(7, 1)", 500);
                //            document.all.WebBrowser.ExecWB(7, 1);
                document.getElementById("btn").style.display = 'none';
            }
             </script>
</head>
<body>
    <form id="form1" runat="server">
        <div id="btn" >
            <input id="print" class="buttons" type="button" value="打印" onclick="print()" />
            <input id="preView" class="buttons" type="button" value="打印预览" onclick="printPreview()" />
    </div>

        <div id="Chart1" >
    </div>

    </form>
</body>
</html>
