Update 20260109

This commit is contained in:
Stefan Hutter
2026-01-09 08:37:07 +01:00
parent e377f08ccd
commit 49155d898f
229 changed files with 28984 additions and 39486 deletions

View File

@@ -30,8 +30,8 @@
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MitarbeiterProfil));
Syncfusion.Windows.Forms.Tools.TreeNodeAdvStyleInfo treeNodeAdvStyleInfo3 = new Syncfusion.Windows.Forms.Tools.TreeNodeAdvStyleInfo();
Syncfusion.Windows.Forms.Tools.TreeNodeAdvStyleInfo treeNodeAdvStyleInfo1 = new Syncfusion.Windows.Forms.Tools.TreeNodeAdvStyleInfo();
Syncfusion.Windows.Forms.Tools.TreeNodeAdvStyleInfo treeNodeAdvStyleInfo2 = new Syncfusion.Windows.Forms.Tools.TreeNodeAdvStyleInfo();
this.ribbon1 = new System.Windows.Forms.Ribbon();
this.ribbonTab1 = new System.Windows.Forms.RibbonTab();
this.RibbonPanelExit = new System.Windows.Forms.RibbonPanel();
@@ -165,7 +165,7 @@
this.ribbon1.OrbStyle = System.Windows.Forms.RibbonOrbStyle.Office_2013;
this.ribbon1.OrbVisible = false;
this.ribbon1.RibbonTabFont = new System.Drawing.Font("Trebuchet MS", 9F);
this.ribbon1.Size = new System.Drawing.Size(802, 121);
this.ribbon1.Size = new System.Drawing.Size(742, 121);
this.ribbon1.TabIndex = 0;
this.ribbon1.Tabs.Add(this.ribbonTab1);
this.ribbon1.Tabs.Add(this.ribbonTab2);
@@ -533,8 +533,9 @@
// txtfunktion
//
this.txtfunktion.Location = new System.Drawing.Point(138, 174);
this.txtfunktion.Multiline = true;
this.txtfunktion.Name = "txtfunktion";
this.txtfunktion.Size = new System.Drawing.Size(147, 20);
this.txtfunktion.Size = new System.Drawing.Size(219, 56);
this.txtfunktion.TabIndex = 13;
//
// label10
@@ -657,7 +658,7 @@
this.GrpGetSignature.Controls.Add(this.btnDeleteImage);
this.GrpGetSignature.Controls.Add(this.btnSaveSignature);
this.GrpGetSignature.Controls.Add(this.sign1);
this.GrpGetSignature.Location = new System.Drawing.Point(89, 79);
this.GrpGetSignature.Location = new System.Drawing.Point(32, 19);
this.GrpGetSignature.Name = "GrpGetSignature";
this.GrpGetSignature.Size = new System.Drawing.Size(651, 394);
this.GrpGetSignature.TabIndex = 21;
@@ -787,6 +788,7 @@
//
this.GrpGAS.Controls.Add(this.panelpersadresse);
this.GrpGAS.Controls.Add(this.label30);
this.GrpGAS.Controls.Add(this.GrpGetSignature);
this.GrpGAS.Controls.Add(this.label31);
this.GrpGAS.Controls.Add(this.label32);
this.GrpGAS.Controls.Add(this.label29);
@@ -797,9 +799,9 @@
this.GrpGAS.Controls.Add(this.TreeViewADVPersadresse);
this.GrpGAS.Controls.Add(this.label19);
this.GrpGAS.Controls.Add(this.treeViewAdvAdresse);
this.GrpGAS.Location = new System.Drawing.Point(14, 30);
this.GrpGAS.Location = new System.Drawing.Point(8, 30);
this.GrpGAS.Name = "GrpGAS";
this.GrpGAS.Size = new System.Drawing.Size(696, 509);
this.GrpGAS.Size = new System.Drawing.Size(733, 461);
this.GrpGAS.TabIndex = 22;
this.GrpGAS.TabStop = false;
this.GrpGAS.Text = "Rückantwort-Adressen";
@@ -1065,15 +1067,15 @@
// TreeViewADVPersadresse
//
this.TreeViewADVPersadresse.BackgroundColor = new Syncfusion.Drawing.BrushInfo(System.Drawing.SystemColors.Window);
treeNodeAdvStyleInfo1.CheckBoxTickThickness = 1;
treeNodeAdvStyleInfo1.CheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdvStyleInfo1.EnsureDefaultOptionedChild = true;
treeNodeAdvStyleInfo1.IntermediateCheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdvStyleInfo1.OptionButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdvStyleInfo1.SelectedOptionButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(210)))), ((int)(((byte)(210)))), ((int)(((byte)(210)))));
treeNodeAdvStyleInfo1.TextColor = System.Drawing.Color.Black;
treeNodeAdvStyleInfo3.CheckBoxTickThickness = 1;
treeNodeAdvStyleInfo3.CheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdvStyleInfo3.EnsureDefaultOptionedChild = true;
treeNodeAdvStyleInfo3.IntermediateCheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdvStyleInfo3.OptionButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdvStyleInfo3.SelectedOptionButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(210)))), ((int)(((byte)(210)))), ((int)(((byte)(210)))));
treeNodeAdvStyleInfo3.TextColor = System.Drawing.Color.Black;
this.TreeViewADVPersadresse.BaseStylePairs.AddRange(new Syncfusion.Windows.Forms.Tools.StyleNamePair[] {
new Syncfusion.Windows.Forms.Tools.StyleNamePair("Standard", treeNodeAdvStyleInfo1)});
new Syncfusion.Windows.Forms.Tools.StyleNamePair("Standard", treeNodeAdvStyleInfo3)});
this.TreeViewADVPersadresse.ContextMenuStrip = this.contextMenuStrip1;
//
//
@@ -1142,15 +1144,15 @@
// treeViewAdvAdresse
//
this.treeViewAdvAdresse.BackgroundColor = new Syncfusion.Drawing.BrushInfo(System.Drawing.SystemColors.Window);
treeNodeAdvStyleInfo2.CheckBoxTickThickness = 1;
treeNodeAdvStyleInfo2.CheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdvStyleInfo2.EnsureDefaultOptionedChild = true;
treeNodeAdvStyleInfo2.IntermediateCheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdvStyleInfo2.OptionButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdvStyleInfo2.SelectedOptionButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(210)))), ((int)(((byte)(210)))), ((int)(((byte)(210)))));
treeNodeAdvStyleInfo2.TextColor = System.Drawing.Color.Black;
treeNodeAdvStyleInfo1.CheckBoxTickThickness = 1;
treeNodeAdvStyleInfo1.CheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdvStyleInfo1.EnsureDefaultOptionedChild = true;
treeNodeAdvStyleInfo1.IntermediateCheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdvStyleInfo1.OptionButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdvStyleInfo1.SelectedOptionButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(210)))), ((int)(((byte)(210)))), ((int)(((byte)(210)))));
treeNodeAdvStyleInfo1.TextColor = System.Drawing.Color.Black;
this.treeViewAdvAdresse.BaseStylePairs.AddRange(new Syncfusion.Windows.Forms.Tools.StyleNamePair[] {
new Syncfusion.Windows.Forms.Tools.StyleNamePair("Standard", treeNodeAdvStyleInfo2)});
new Syncfusion.Windows.Forms.Tools.StyleNamePair("Standard", treeNodeAdvStyleInfo1)});
this.treeViewAdvAdresse.ContextMenuStrip = this.contextMenuStrip2;
//
//
@@ -1203,8 +1205,7 @@
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(806, 496);
this.Controls.Add(this.GrpGetSignature);
this.ClientSize = new System.Drawing.Size(746, 496);
this.Controls.Add(this.GrpGAS);
this.Controls.Add(this.GrpBoxMitarbeiter);
this.Controls.Add(this.GrpBoxDetails);

View File

@@ -65,7 +65,7 @@
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(472, 26);
this.label2.TabIndex = 2;
this.label2.Text = "28. Dezember 2025";
this.label2.Text = "9. Januar 2026";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.label2.Click += new System.EventHandler(this.label2_Click);
//

View File

@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Management;
using System.Runtime.InteropServices;
using System.Security.AccessControl;
using System.Text;
using System.Threading;
@@ -10,13 +11,72 @@ using System.Threading.Tasks;
using System.Timers;
using System.Windows.Forms;
using Database;
using Microsoft.Office.Interop.Word;
using OnDoc.UICintrols;
using Syncfusion.Olap.MDXQueryParser;
using Syncfusion.Windows.Forms.Tools;
using Syncfusion.WinForms.Input.Enums;
using static Syncfusion.Windows.Forms.Tools.ColorDlgAdv;
using Word = Microsoft.Office.Interop.Word;
namespace OnDoc.Klassen
{
public static class clsProcessWatch
{
[DllImport("user32.dll", CharSet = CharSet.Unicode)]
private static extern int GetWindowText(IntPtr hWnd, StringBuilder strText, int maxCount);
[DllImport("user32.dll", CharSet = CharSet.Unicode)]
private static extern int GetWindowTextLength(IntPtr hWnd);
[DllImport("user32.dll")]
private static extern bool EnumWindows(EnumWindowsProc enumProc, IntPtr lParam);
// Delegate to filter which windows to include
public delegate bool EnumWindowsProc(IntPtr hWnd, IntPtr lParam);
/// <summary> Get the text for the window pointed to by hWnd </summary>
public static string GetWindowText(IntPtr hWnd)
{
int size = GetWindowTextLength(hWnd);
if (size > 0)
{
var builder = new StringBuilder(size + 1);
GetWindowText(hWnd, builder, builder.Capacity);
return builder.ToString();
}
return String.Empty;
}
public static IEnumerable<IntPtr> FindWindows(EnumWindowsProc filter)
{
IntPtr found = IntPtr.Zero;
List<IntPtr> windows = new List<IntPtr>();
EnumWindows(delegate (IntPtr wnd, IntPtr param)
{
if (filter(wnd, param))
{
// only add the windows that pass the filter
windows.Add(wnd);
}
// but return true here so that we iterate all windows
return true;
}, IntPtr.Zero);
return windows;
}
public static IEnumerable<IntPtr> FindWindowsWithText(string titleText)
{
return FindWindows(delegate (IntPtr wnd, IntPtr param)
{
return GetWindowText(wnd).Contains(titleText);
});
}
public static System.Timers.Timer watchtimer = new System.Timers.Timer(Convert.ToInt32(Properties.Settings.Default.OfficeWatchTimerIntervall));
@@ -72,7 +132,7 @@ namespace OnDoc.Klassen
return "NO OWNER";
}
private static void WatchProcesses(object source, ElapsedEventArgs e)
private static void WatchProcesses1(object source, ElapsedEventArgs e)
{
bool word = false;
bool excel = false;
@@ -80,13 +140,14 @@ namespace OnDoc.Klassen
bool found = false;
watchtimer.Enabled = false;
found = false;
Logging.Logging.Debug("Start Watch_Process:"+ DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"), "OnDoc.Processwatch","" );
Logging.Logging.Debug("Start Watch_Process:" + DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"), "OnDoc.Processwatch", "");
try
{
foreach (FileToCheck fc in FilestoCheck)
{
if (fc.filedatetime < DateTime.Now.AddSeconds(-3))
{
found = false;
word = false;
excel = false;
@@ -101,12 +162,18 @@ namespace OnDoc.Klassen
{
Thread.Sleep(200);
Process[] localByName = Process.GetProcessesByName("WINWORD");
Logging.Logging.Debug("Get Processe", "", "");
foreach (Process p in localByName)
{
Logging.Logging.Debug(localByName.Count().ToString(), "", "");
string owner = GetProcessOwner(p.Id);
owner = owner.ToUpper();
Logging.Logging.Debug(AppParams.systemtgnummer + "/" + AppParams.currenttgnummer + "/" + owner + "/" + fc.dokumentid + "/" + p.MainWindowTitle, "", "");
if (p.MainWindowTitle.IndexOf(fc.dokumentid) > -1 ||
(p.MainWindowTitle.Trim() == "" && owner.Contains(AppParams.systemtgnummer.ToUpper())))
{
@@ -194,9 +261,71 @@ namespace OnDoc.Klassen
}
finally
{
watchtimer.Enabled = true ;
watchtimer.Enabled = true;
}
}
private static void WatchProcesses(object source, ElapsedEventArgs e)
{
bool word = false;
bool excel = false;
bool pdf = false;
bool found = false;
watchtimer.Enabled = false;
found = false;
Logging.Logging.Debug("Start Watch_Process:" + DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"), "OnDoc.Processwatch", "");
try
{
foreach (FileToCheck fc in FilestoCheck)
{
if (fc.filedatetime < DateTime.Now.AddSeconds(-3))
{
found = false;
var windows = FindWindowsWithText(fc.dokumentid);
if (windows.Count() > 0)
{
found = true;
save_to_db(fc);
}
windows = null;
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);
Logging.DocLog.Info("Dokument gespeichert und geschlossen", "Processwatch", fc.dokumentid, "", fc.filename);
RemoveFromList(fc.dokumentid);
Remove_Dok_in_Bearbeitung(fc.dokumentid);
Remove_Dokumentbearbeitung_Zwingend(fc.dokumentid);
Remove_Approvals(fc.dokumentid);
return;
}
else
{
Logging.DocLog.Info("Dokument ohne speichern geschlossen", "Processwatch", fc.dokumentid, "", fc.filename);
RemoveFromList(fc.dokumentid);
Remove_Dok_in_Bearbeitung(fc.dokumentid);
return;
};
}
}
}
watchtimer.Enabled = true;
}
catch (Exception ex)
{
Logging.Logging.Debug("Error Processwatch", "OnDoc", ex.Message);
}
finally
{
watchtimer.Enabled = true;
}
}
private static void Remove_Dok_in_Bearbeitung(string dokumentid)
{
DB db = new DB(AppParams.connectionstring);

View File

@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.7.11.03")]
[assembly: AssemblyFileVersion("1.7.11.03")]
[assembly: AssemblyVersion("1.7.11.05")]
[assembly: AssemblyFileVersion("1.7.11.05")]

View File

@@ -51,6 +51,7 @@ namespace OnDoc.UIControls
}
private void treeViewAdv1_NodeMouseClick(object sender, Syncfusion.Windows.Forms.Tools.TreeViewAdvMouseClickEventArgs e)
{
treeViewAdv1.SelectedNode = e.Node;
if (treeViewAdv1.SelectedNode.Level == 1)
{
this.ribbonButtonApproved.Enabled = false;

View File

@@ -1436,8 +1436,8 @@ namespace OnDoc.Versandstrasse
DB db = new DB(AppParams.connectionstring);
DB db2 = new DB(AppParams.connectionstring);
// db.Get_Tabledata("Select * from ondoc_versandstrasse_paket where isnull(signed,1)=1 and aktiv=1 and ersteller=" + AppParams.CurrentMitarbeiter + " and versendet=0", false, true);
//STH
//db.Get_Tabledata("Select * from ondoc_versandstrasse_paket where isnull(signed,1)=1 and aktiv=1 and ersteller=" + AppParams.CurrentMitarbeiter + " and versendet=0", false, true);
db.Get_Tabledata("Select * from ondoc_versandstrasse_paket where aktiv=1 and ersteller=" + AppParams.CurrentMitarbeiter + " and versendet=0", false, true);
treeViewAdvCouverts.Nodes.Clear();
foreach (DataRow dr in db.dsdaten.Tables[0].Rows)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.