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="width:660px;height:480px;display:block"></a>
<script type="text/javascript">
var swfFile = "SWFFile/liuzeliang.swf";
var fp = new FlexPaperViewer(
///FlexPaper组件的SWF框架路径
'scripts/flexpaper/FlexPaperViewer',
'viewerPlaceHolder',
{
config:
{
///需要显示的.swf
SwfFile: escape(swfFile),
Scale: 0.6,
ZoomTransition: 'easeOut',
ZoomTime: 0.5,
ZoomInterval: 0.2,
FitPageOnLoad: false,
FitWidthOnLoad: false,
PrintEnabled: true,
FullScreenAsMaxWindow: false,
ProgressiveLoading: false,
MinZoomSize: 0.2,
MaxZoomSize: ,
SearchMatchAll: false,
InitViewMode: 'Portrait',
ViewModeToolsVisible: true,
ZoomToolsVisible: true,
NavToolsVisible: true,
CursorToolsVisible: true,
SearchToolsVisible: true,
localeChain: 'en_US'
}
});
</script>