首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

要怎样修改小弟我才能对文件操作

2012-06-05 
要怎样修改我才能对文件操作这是调用flashpaper的函数调用以后不能用public void ConvertToSwf(string old

要怎样修改我才能对文件操作
这是调用flashpaper的函数调用以后不能用
public void ConvertToSwf(string oldFile, string swfFile)
  {
  System.Diagnostics.Process pc = new System.Diagnostics.Process();
  pc.StartInfo.FileName = @"C:\Program Files\Macromedia\FlashPaper 2\FlashPrinter.exe";
  pc.StartInfo.Arguments = string.Format("{0} -o {1}", oldFile, swfFile);
  pc.StartInfo.CreateNoWindow = true;
  pc.StartInfo.UseShellExecute = false;
  pc.StartInfo.RedirectStandardInput = false;
  pc.StartInfo.RedirectStandardOutput = false;
  pc.StartInfo.RedirectStandardError = true;
  pc.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
  pc.Start();
  pc.WaitForExit();
  pc.Close();
  pc.Dispose();
  }
而我修改成以后就能正确操作,求各位大侠指教,调了一天了
public void ConvertToSwf(string oldFile, string swfFile)
  {
  System.Diagnostics.Process pc = new System.Diagnostics.Process();
  pc.StartInfo.FileName = @"C:\Program Files\Macromedia\FlashPaper 2\FlashPrinter.exe";
  pc.StartInfo.Arguments = string.Format("{0} -o {1}", "E\\hehe.txt", "E:\\hehe.swf");
  pc.StartInfo.CreateNoWindow = true;
  pc.StartInfo.UseShellExecute = false;
  pc.StartInfo.RedirectStandardInput = false;
  pc.StartInfo.RedirectStandardOutput = false;
  pc.StartInfo.RedirectStandardError = true;
  pc.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
  pc.Start();
  pc.WaitForExit();
  pc.Close();
  pc.Dispose();
  }

[解决办法]
你怎么传递路径的。

E\\hehe.txt ->
E:\\hehe.txt
[解决办法]
localPath是否正确。
你到底想处理的是客户端的文件还是服务器上的,前者是不行的。
在string swfPath = localPath + "\\" + fileNames[0] + ".swf";上下端点,看filePath, swfPath输出什么。
[解决办法]
轉換到swf最好是 iSpring PPT To Flash SDK 6.0.3

http://ufo-crackerx.blog.163.com/blog/static/113078778201222394558376/

热点排行