diff --git a/Client/App.config b/Client/App.config
index 6147b3f3..6f00c972 100644
--- a/Client/App.config
+++ b/Client/App.config
@@ -50,7 +50,7 @@
E:\Software-Projekte\EDOKA\Cleint_Erneuerung_DMS_Framwork48 - Kopie\EDOKA\bin\edoka.exe
- 5000
+ 20000
E:\Software-Projekte\OnDoc\TKB-Vorlagen\
diff --git a/Client/Klassen/clsProcessWatch.cs b/Client/Klassen/clsProcessWatch.cs
index 4c6d8df0..0ca82589 100644
--- a/Client/Klassen/clsProcessWatch.cs
+++ b/Client/Klassen/clsProcessWatch.cs
@@ -7,6 +7,7 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Timers;
+using System.Windows.Forms;
using Database;
using Syncfusion.Windows.Forms.Tools;
using Syncfusion.WinForms.Input.Enums;
@@ -62,6 +63,10 @@ namespace OnDoc.Klassen
if (fc.filedatetime < DateTime.Now.AddSeconds(-5))
{
found = false;
+ word = false;
+ excel = false;
+ pdf = false;
+
Logging.Logging.Debug(fc.application + " / FileChek " + fc.filename + " / " + fc.filedatetime.ToString("yyyy-MM-dd hh:mm:ss") + 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; }
@@ -69,20 +74,33 @@ namespace OnDoc.Klassen
if (word)
{
+ Thread.Sleep(200);
Process[] localByName = Process.GetProcessesByName("WINWORD");
- foreach (Process p in localByName)
- {
- if (p.MainWindowTitle.IndexOf(fc.dokumentid) > -1) { found = true; }
- save_to_db(fc);
- }
+
+ foreach (Process p in localByName)
+ {
+ Logging.Logging.Debug(fc.dokumentid + "/" + p.MainWindowTitle, "", "");
+ if (p.MainWindowTitle.IndexOf(fc.dokumentid) > -1)
+
+ {
+ found = true;
+ save_to_db(fc);
+ break;
+ }
+
+ }
+
}
if (excel)
{
Process[] localByName = Process.GetProcessesByName("EXCEL");
foreach (Process p in localByName)
{
- if (p.MainWindowTitle.IndexOf(fc.dokumentid) > 0) { found = true; }
- save_to_db(fc);
+ if (p.MainWindowTitle.IndexOf(fc.dokumentid) > -1) {
+ found = true;
+ save_to_db(fc);
+ }
+
}
}
if (!found)
diff --git a/Client/UIControls/DokList.cs b/Client/UIControls/DokList.cs
index 7c3dbb5c..ac9f4b7d 100644
--- a/Client/UIControls/DokList.cs
+++ b/Client/UIControls/DokList.cs
@@ -53,6 +53,7 @@ using Syncfusion.Windows.Forms.Edit.Utils;
using Syncfusion.WinForms.DataGrid.Serialization;
using NLog.LayoutRenderers;
using Syncfusion.Windows.Forms.PivotAnalysis;
+using System.Xml.Linq;
@@ -559,12 +560,32 @@ namespace OnDoc.UICintrols
interop = dokbearbeitung.interop;
//runmacros = dokbearbeitung.runmacros;
string filename = dokbearbeitung.filename;
-
- Logging.Logging.Debug("Doklist Docfunction=6", "Doklist", "");
+ string ext = System.IO.Path.GetExtension(filename);
+ string apptype = "";
+ switch (ext.ToUpper())
+ {
+ case ".DOCX":
+ case ".DOCM":
+ case ".DOC":
+ case ".DOT":
+ case ".WORD":
+ case ".DOTM":
+ apptype = "Word";
+ break;
+ case ".XLSM":
+ case ".XLSX":
+ case ".XLST":
+ case ".XLS":
+ case ".XLT":
+ apptype = "Excel";
+ break;
+ }
+
+ Logging.Logging.Debug("Doklist Docfunction=6", "Doklist", "");
//db1.Dok_in_Bearbeitung(1, selected_dokumentid, AppParams.CurrentMitarbeiter);
//db1 = null;
- clsProcessWatch.AddToList(selected_dokumentid, filename, "Word");
+ clsProcessWatch.AddToList(selected_dokumentid, filename, apptype);
break;
default:
break;
@@ -670,6 +691,7 @@ namespace OnDoc.UICintrols
tempfilename = fh.save_temp_file(dok.dokument, selected_dokumentid, AppParams.tempdir, dok.extension);
//System.Diagnostics.Process.Start(tempfilename);
+ interop = true;
if (interop == true)
{
OnDocOffice.clsWordEdit WordInterOP = new OnDocOffice.clsWordEdit(AppParams.connectionstring, tempfilename, selected_dokumentid, AppParams.RESTURI, AppParams.apikey);
@@ -960,7 +982,27 @@ namespace OnDoc.UICintrols
Logging.Logging.Debug("Doklist Docfunction=6", "Doklist", "");
db.Dok_in_Bearbeitung(1, selected_dokumentid, AppParams.CurrentMitarbeiter);
db = null;
- clsProcessWatch.AddToList(selected_dokumentid, filename, "Word");
+ string ext = System.IO.Path.GetExtension(filename);
+ string apptype = "";
+ switch (ext.ToUpper())
+ {
+ case ".DOCX":
+ case ".DOCM":
+ case ".DOC":
+ case ".DOT":
+ case ".WORD":
+ case ".DOTM":
+ apptype = "Word";
+ break;
+ case ".XLSM":
+ case ".XLSX":
+ case ".XLST":
+ case ".XLS":
+ case ".XLT":
+ apptype = "Excel";
+ break;
+ }
+ clsProcessWatch.AddToList(selected_dokumentid, filename, apptype);
break;
default:
break;
diff --git a/Client/bin/Debug/OnDoc.exe b/Client/bin/Debug/OnDoc.exe
index cb86e861..68e0e112 100644
Binary files a/Client/bin/Debug/OnDoc.exe and b/Client/bin/Debug/OnDoc.exe differ
diff --git a/Client/bin/Debug/OnDoc.exe.config b/Client/bin/Debug/OnDoc.exe.config
index 6147b3f3..6f00c972 100644
--- a/Client/bin/Debug/OnDoc.exe.config
+++ b/Client/bin/Debug/OnDoc.exe.config
@@ -50,7 +50,7 @@
E:\Software-Projekte\EDOKA\Cleint_Erneuerung_DMS_Framwork48 - Kopie\EDOKA\bin\edoka.exe
- 5000
+ 20000
E:\Software-Projekte\OnDoc\TKB-Vorlagen\
diff --git a/Client/bin/Debug/OnDoc.pdb b/Client/bin/Debug/OnDoc.pdb
index 873e7769..56e827dd 100644
Binary files a/Client/bin/Debug/OnDoc.pdb and b/Client/bin/Debug/OnDoc.pdb differ
diff --git a/Client/bin/Debug/OnDocClient.zip b/Client/bin/Debug/OnDocClient.zip
index 8c51887c..070b5a24 100644
Binary files a/Client/bin/Debug/OnDocClient.zip and b/Client/bin/Debug/OnDocClient.zip differ
diff --git a/Client/bin/Debug/de-DE/OnDoc.resources.dll b/Client/bin/Debug/de-DE/OnDoc.resources.dll
index 9069e761..e9302a0e 100644
Binary files a/Client/bin/Debug/de-DE/OnDoc.resources.dll and b/Client/bin/Debug/de-DE/OnDoc.resources.dll differ
diff --git a/Client/obj/Debug/Client.csproj.AssemblyReference.cache b/Client/obj/Debug/Client.csproj.AssemblyReference.cache
index 534d2573..514fcf9e 100644
Binary files a/Client/obj/Debug/Client.csproj.AssemblyReference.cache and b/Client/obj/Debug/Client.csproj.AssemblyReference.cache differ
diff --git a/Client/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/Client/obj/Debug/DesignTimeResolveAssemblyReferences.cache
index 158c2e47..513c857a 100644
Binary files a/Client/obj/Debug/DesignTimeResolveAssemblyReferences.cache and b/Client/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ
diff --git a/Client/obj/Debug/OnDoc.exe b/Client/obj/Debug/OnDoc.exe
index cb86e861..68e0e112 100644
Binary files a/Client/obj/Debug/OnDoc.exe and b/Client/obj/Debug/OnDoc.exe differ
diff --git a/Client/obj/Debug/OnDoc.pdb b/Client/obj/Debug/OnDoc.pdb
index 873e7769..56e827dd 100644
Binary files a/Client/obj/Debug/OnDoc.pdb and b/Client/obj/Debug/OnDoc.pdb differ
diff --git a/Client/obj/Debug/de-DE/OnDoc.resources.dll b/Client/obj/Debug/de-DE/OnDoc.resources.dll
index 9069e761..e9302a0e 100644
Binary files a/Client/obj/Debug/de-DE/OnDoc.resources.dll and b/Client/obj/Debug/de-DE/OnDoc.resources.dll differ