update 20250324
This commit is contained in:
@@ -16,6 +16,7 @@ using OnDoc.UIControls;
|
||||
using System.Linq.Expressions;
|
||||
|
||||
|
||||
|
||||
namespace OnDoc
|
||||
{
|
||||
internal static class Program
|
||||
@@ -28,8 +29,7 @@ namespace OnDoc
|
||||
/// Der Haupteinstiegspunkt für die Anwendung.
|
||||
/// </summary>
|
||||
private static Mutex mutex = null;
|
||||
const string AppId = "OnDoc5094533C-A613-4889-A0E3-8C28C130C6AA)";
|
||||
|
||||
const string AppId = "OnDoc5094533C-A613-4889-A0E3-8C28C130C6AA)";
|
||||
//static Start MyForm = new Start();
|
||||
///
|
||||
[STAThread]
|
||||
@@ -47,9 +47,9 @@ namespace OnDoc
|
||||
{
|
||||
|
||||
string debugstring;
|
||||
|
||||
if (args[0].ToString().ToUpper().Substring(args[0].ToString().Length - 4, 4) == ".EDK")
|
||||
{
|
||||
|
||||
AppParams.init();
|
||||
Database.DB db = new Database.DB(AppParams.connectionstring);
|
||||
string mitarbeiter = System.Security.Principal.WindowsIdentity.GetCurrent().Name;
|
||||
@@ -67,11 +67,14 @@ namespace OnDoc
|
||||
System.Environment.Exit(0);
|
||||
return;
|
||||
}
|
||||
string destfile = AppParams.tempdir + DateTime.Now.ToString("yyyyMMddHHmmss") + "_tmpfile.edk";
|
||||
string destfile = AppParams.tempdir + RandomString(8)+ "_"+DateTime.Now.ToString("yyyyMMddHHmmss") + "_tmpfile.edk";
|
||||
|
||||
System.IO.File.Copy(args[0],destfile);
|
||||
Application.DoEvents();
|
||||
System.IO.File.Delete(args[0]);
|
||||
|
||||
//EDK_Data.Load_EDK_File(args[0]);
|
||||
Application.DoEvents();
|
||||
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -129,6 +132,14 @@ namespace OnDoc
|
||||
|
||||
|
||||
|
||||
}
|
||||
private static Random random = new Random();
|
||||
|
||||
public static string RandomString(int length)
|
||||
{
|
||||
const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
|
||||
return new string(Enumerable.Repeat(chars, length)
|
||||
.Select(s => s[random.Next(s.Length)]).ToArray());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user