使用服务c#

时间:2016-07-27 02:43:34

标签: c# service exe interprocess

我有一个使用FileSystemWatcher的Windows服务来查看是否有pdf文件移动到文件夹,然后,当用户将pdf文件移动到该文件夹​​时,服务会执行MyProcess 。 pdf文件名如下:name_doctorcode.pdf
代码:

Private static void MyProcess(string pdfname)
{ 
  string sDoctorCode= getdoctorcode(pdfname); //brings doctor code from filename
  bool foundDoctorCode= FindDoctorCode(sDoctorCode); //searchs  into a data container (database, txt,etc..) to see if the doctor code is found
  if(foundDoctorCode==false)
  {
    // HELP to call exe file to prompt user to enter a correct doctorcode
    //pass the doctorcode to a variable
   string sNewDoctorCode = doctorCodeFromExe;
  }
}

你能帮帮我吗? 任何指南,教程或代码?
感谢

0 个答案:

没有答案