using (Process p = new Process())
{
try
{
p.StartInfo.FileName = cmdStr;
p.StartInfo.Arguments = args;
p.StartInfo.UseShellExecute = false; //不使用系統(tǒng)外殼程序啟動(dòng)
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.CreateNoWindow = false;
p.Start();
//p.StandardInput.WriteLine(args);
p.WaitForExit();
if (p != null)
{
p.Close();
}
}
catch (Exception)
{
throw;
}
}
1.先下載好flexpaper的.rar包,然后將包中的js復(fù)制到項(xiàng)目中在引用下面?zhèn)z個(gè)js到頁(yè)面(我的flexpaper是1.4.5版本的)
2.將文件夾中的FlexPaperViewer.swf放到項(xiàng)目中去
<script src="scripts/flexpaper/jquery.js"></script>
<script src="scripts/flexpaper/flexpaper_flash.js"></script>
1 <a id="viewerPlaceHolder" style="width:660px;height:480px;display:block"></a>
2 <script type="text/javascript">
3 var swfFile = "SWFFile/liuzeliang.swf";
4 var fp = new FlexPaperViewer(
5 ///FlexPaper組件的SWF框架路徑
6 'scripts/flexpaper/FlexPaperViewer',
7 'viewerPlaceHolder',
8 {
9 config:
10 {
11 ///需要顯示的.swf
12 SwfFile: escape(swfFile),
13 Scale: 0.6,
14 ZoomTransition: 'easeOut',
15 ZoomTime: 0.5,
16 ZoomInterval: 0.2,
17 FitPageOnLoad: false,
18 FitWidthOnLoad: false,
19 PrintEnabled: true,
20 FullScreenAsMaxWindow: false,
21 ProgressiveLoading: false,
22 MinZoomSize: 0.2,
23 MaxZoomSize: 5,
24 SearchMatchAll: false,
25 InitViewMode: 'Portrait',
26 ViewModeToolsVisible: true,
27 ZoomToolsVisible: true,
28 NavToolsVisible: true,
29 CursorToolsVisible: true,
30 SearchToolsVisible: true,
31 localeChain: 'en_US'
32 }
33 });
34
35 </script>