update 20241217
This commit is contained in:
@@ -22,8 +22,9 @@ namespace OnDoc.Klassen
|
||||
public static void AddToList(string dokumentid, string filename, string application)
|
||||
{
|
||||
FilestoCheck.Add(new FileToCheck(dokumentid, filename, application));
|
||||
if (watchtimer.Enabled == false) { watchtimer.Enabled = true; }
|
||||
watchtimer.Elapsed += WatchProcesses;
|
||||
if (watchtimer.Enabled == false) { watchtimer.Enabled = true; }
|
||||
|
||||
}
|
||||
|
||||
public static void RemoveFromList(string dokumentid)
|
||||
@@ -52,6 +53,7 @@ namespace OnDoc.Klassen
|
||||
found= false;
|
||||
foreach (FileToCheck fc in FilestoCheck)
|
||||
{
|
||||
Logging.Logging.Debug("FileChek "+fc.filename+" / " + DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"), "OnDoc.Processwatch", fc.dokumentid);
|
||||
if (fc.application == "Word") { word = true; }
|
||||
if (fc.application == "Excel") { excel = true; }
|
||||
if (fc.application == "PDF") { pdf = true; }
|
||||
@@ -61,7 +63,7 @@ namespace OnDoc.Klassen
|
||||
Process[] localByName = Process.GetProcessesByName("WINWORD");
|
||||
foreach (Process p in localByName)
|
||||
{
|
||||
if (p.MainWindowTitle.IndexOf(fc.dokumentid) > 0) { found = true; }
|
||||
if (p.MainWindowTitle.IndexOf(fc.dokumentid) > -1) { found = true; }
|
||||
}
|
||||
}
|
||||
if (excel)
|
||||
@@ -74,6 +76,7 @@ namespace OnDoc.Klassen
|
||||
}
|
||||
if (!found)
|
||||
{
|
||||
Logging.Logging.Debug("Not Found "+fc.filename+" / "+ DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"), "OnDoc.Processwatch", fc.dokumentid);
|
||||
if (Check_Modified(fc) == true)
|
||||
{
|
||||
Save_File(fc.dokumentid, fc.filename);
|
||||
|
||||
Reference in New Issue
Block a user