C# 如何使用记事本++;在我的项目中
我有一些PHP代码保存在数据库中。 我想写一个程序,从数据库读取php,然后加载到记事本++和编辑后保存到数据库 可以在我们的php项目中使用notepad++作为编辑器吗 或者可以将notepad++加载到我们的c#项目并用作编辑器 问题:C# 如何使用记事本++;在我的项目中,c#,php,notepad++,C#,Php,Notepad++,我有一些PHP代码保存在数据库中。 我想写一个程序,从数据库读取php,然后加载到记事本++和编辑后保存到数据库 可以在我们的php项目中使用notepad++作为编辑器吗 或者可以将notepad++加载到我们的c#项目并用作编辑器 问题: 如何将notepad++作为编辑器加载到(c#或php)项目中?据我对您问题的理解(可能是错误的) 1.在程序中,当单击文件时,您可以使用以下命令调用notepad++ <Path to your notepad++> -n<line&g
如何将notepad++作为编辑器加载到(c#或php)项目中?据我对您问题的理解(可能是错误的) 1.在程序中,当单击文件时,您可以使用以下命令调用notepad++
<Path to your notepad++> -n<line> <Path to your source code file>
-n
FileSystemWatcher
类监视要保存的文件,当文件保存时,您的程序将读取它并将其保存回数据库
FileSystemWatcher fsw = new FileSystemWatcher(@"C:\temp\");
fsw.Filter = "tmpfile.php";
fsw.NotifyFilter = NotifyFilters.LastWrite;
fsw.Changed += new FileSystemEventHandler(fsw_Changed);
fsw.EnableRaisingEvents = true;
并添加函数
private static void fsw_Changed(object sender, FileSystemEventArgs e)
{
// Code to save file to DB and delete temp file.
}
数据库中有php代码吗?为什么?是的,我的项目的所有代码都保存在数据库中!我使用processmaker和processmaker将代码另存为数据库中的触发器
private static void fsw_Changed(object sender, FileSystemEventArgs e)
{
// Code to save file to DB and delete temp file.
}