莱科宁

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
try  
{   
    string flashPrinter = ConfigurationManager.AppSettings["FlashPaperPath"].ToString();   
    string _oldFilePath = MapPath(txtFilePath.Text.Trim());   
    string _swfFilePath = MapPath(txtFilePath.Text.Trim().Replace(BaseLib.GetFileExt(txtFilePath.Text.Trim()), ".swf"));   
    System.Diagnostics.Process pss = new System.Diagnostics.Process();   
    pss.StartInfo.CreateNoWindow = false;   
    pss.StartInfo.FileName = flashPrinter;   
    pss.StartInfo.Arguments = string.Format("{0} {1} -o {2}", flashPrinter, _oldFilePath, _swfFilePath);   
    pss.Start();   
    while (!pss.HasExited)   
    {   
        continue;   
    }   
    lblView.Text = "成功!";      
}   
catch (Exception ex)   
{   
    lblView.Text = ex.ToString();   
}  
posted on 2011-02-24 21:42  莱科宁  阅读(2737)  评论(0编辑  收藏  举报