using (Process p = new Process())
{
try
{
p.StartInfo.FileName = cmdStr;
p.StartInfo.Arguments = args;
p.StartInfo.UseShellExecute = false; //不使用系统外壳程序启动
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复制到项目中在引用下面俩个js到页面(我的flexpaper是1.4.5版本的)
2.将文件夹中的FlexPaperViewer.swf放到项目中去
<script src="scripts/flexpaper/jquery.js"></script>
<script src="scripts/flexpaper/flexpaper_flash.js"></script>
1 <a id="viewerPlaceHolder" style="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>