From d0d69ad0457828db7bd76f53e49d44242d391920 Mon Sep 17 00:00:00 2001 From: Marcus Bachler Date: Fri, 26 Jul 2019 07:36:50 +0200 Subject: [PATCH] =?UTF-8?q?Projektdateien=20hinzuf=C3=BCgen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AV-ToolV3/App.config | 98 + AV-ToolV3/App.xaml | 442 ++++ AV-ToolV3/App.xaml.cs | 65 + AV-ToolV3/ChangesQueue.cs | 23 + AV-ToolV3/Crypto.cs | 76 + AV-ToolV3/Download.png | Bin 0 -> 2916 bytes AV-ToolV3/Export.cs | 51 + AV-ToolV3/FodyWeavers.xml | 4 + AV-ToolV3/Helper.cs | 140 ++ AV-ToolV3/Info.png | Bin 0 -> 2303 bytes AV-ToolV3/LogFile.cs | 85 + AV-ToolV3/MainWindow.xaml | 505 ++++ AV-ToolV3/MainWindow.xaml.cs | 2467 ++++++++++++++++++++ AV-ToolV3/NewVersionMessageBox.xaml | 15 + AV-ToolV3/NewVersionMessageBox.xaml.cs | 64 + AV-ToolV3/NewVersionScreen.xaml | 14 + AV-ToolV3/NewVersionScreen.xaml.cs | 40 + AV-ToolV3/PEP_Tool.csproj | 211 ++ AV-ToolV3/Print.cs | 480 ++++ AV-ToolV3/Properties/AssemblyInfo.cs | 55 + AV-ToolV3/Properties/Resources.Designer.cs | 63 + AV-ToolV3/Properties/Resources.resx | 117 + AV-ToolV3/Properties/Settings.Designer.cs | 278 +++ AV-ToolV3/Properties/Settings.settings | 69 + AV-ToolV3/Reader.cs | 863 +++++++ AV-ToolV3/SQL.cs | 127 + AV-ToolV3/TableCreator.cs | 82 + AV-ToolV3/TableInfo.cs | 226 ++ AV-ToolV3/Tracker.cs | 81 + AV-ToolV3/Writer.cs | 69 + AV-ToolV3/icon.ico | Bin 0 -> 53633 bytes AV-ToolV3/packages.config | 11 + AV-ToolV3/ucSpinnerPiston.xaml | 83 + AV-ToolV3/ucSpinnerPiston.xaml.cs | 26 + PEP_ToolProject.sln | 25 + 35 files changed, 6955 insertions(+) create mode 100644 AV-ToolV3/App.config create mode 100644 AV-ToolV3/App.xaml create mode 100644 AV-ToolV3/App.xaml.cs create mode 100644 AV-ToolV3/ChangesQueue.cs create mode 100644 AV-ToolV3/Crypto.cs create mode 100644 AV-ToolV3/Download.png create mode 100644 AV-ToolV3/Export.cs create mode 100644 AV-ToolV3/FodyWeavers.xml create mode 100644 AV-ToolV3/Helper.cs create mode 100644 AV-ToolV3/Info.png create mode 100644 AV-ToolV3/LogFile.cs create mode 100644 AV-ToolV3/MainWindow.xaml create mode 100644 AV-ToolV3/MainWindow.xaml.cs create mode 100644 AV-ToolV3/NewVersionMessageBox.xaml create mode 100644 AV-ToolV3/NewVersionMessageBox.xaml.cs create mode 100644 AV-ToolV3/NewVersionScreen.xaml create mode 100644 AV-ToolV3/NewVersionScreen.xaml.cs create mode 100644 AV-ToolV3/PEP_Tool.csproj create mode 100644 AV-ToolV3/Print.cs create mode 100644 AV-ToolV3/Properties/AssemblyInfo.cs create mode 100644 AV-ToolV3/Properties/Resources.Designer.cs create mode 100644 AV-ToolV3/Properties/Resources.resx create mode 100644 AV-ToolV3/Properties/Settings.Designer.cs create mode 100644 AV-ToolV3/Properties/Settings.settings create mode 100644 AV-ToolV3/Reader.cs create mode 100644 AV-ToolV3/SQL.cs create mode 100644 AV-ToolV3/TableCreator.cs create mode 100644 AV-ToolV3/TableInfo.cs create mode 100644 AV-ToolV3/Tracker.cs create mode 100644 AV-ToolV3/Writer.cs create mode 100644 AV-ToolV3/icon.ico create mode 100644 AV-ToolV3/packages.config create mode 100644 AV-ToolV3/ucSpinnerPiston.xaml create mode 100644 AV-ToolV3/ucSpinnerPiston.xaml.cs create mode 100644 PEP_ToolProject.sln diff --git a/AV-ToolV3/App.config b/AV-ToolV3/App.config new file mode 100644 index 0000000..8d4fccb --- /dev/null +++ b/AV-ToolV3/App.config @@ -0,0 +1,98 @@ + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + + + 1.0 + + + 2.0.4 + + + 0 + + + Normal + + + 0 + + + 681 + + + 1323 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + \ No newline at end of file diff --git a/AV-ToolV3/App.xaml b/AV-ToolV3/App.xaml new file mode 100644 index 0000000..e1cd521 --- /dev/null +++ b/AV-ToolV3/App.xaml @@ -0,0 +1,442 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/AV-ToolV3/App.xaml.cs b/AV-ToolV3/App.xaml.cs new file mode 100644 index 0000000..06a717d --- /dev/null +++ b/AV-ToolV3/App.xaml.cs @@ -0,0 +1,65 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Diagnostics; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace PEP_Tool +{ + /// + /// Interaktionslogik für "App.xaml" + /// + public partial class App : Application + { + void App_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e) + { + // Process unhandled exception + LogFile.WriteLine($"{Environment.NewLine} UnhandledException: {Environment.NewLine + e.Exception}"); + + e.Handled = true; + } + + private void Application_Startup(object sender, StartupEventArgs e) + { + AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); + + //FirstChanceEx(); + + } + + void FirstChanceEx() + { + AppDomain.CurrentDomain.FirstChanceException += (sender, eventArgs) => + { + LogFile.WriteLine(eventArgs.Exception.ToString()); + }; + } + + void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) + { + Exception ex = e.ExceptionObject as Exception; + LogFile.WriteLine($"{Environment.NewLine} UnhandledException: {Environment.NewLine + ex.ToString()}"); + + //MessageBox.Show(ex.Message, "Uncaught Thread Exception", MessageBoxButton.OK, MessageBoxImage.Error); + + } + + static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e) + { + // Log the exception, display it, etc + LogFile.WriteLine(e.Exception.Message); + + } + + + + private void Application_Exit(object sender, ExitEventArgs e) + { + PEP_Tool.Properties.Settings.Default.Save(); + } + + } +} diff --git a/AV-ToolV3/ChangesQueue.cs b/AV-ToolV3/ChangesQueue.cs new file mode 100644 index 0000000..2502e50 --- /dev/null +++ b/AV-ToolV3/ChangesQueue.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PEP_Tool +{ + public class ChangesQueue + { + public class BemerkungenChanges + { + public object sender { get; set; } + public int index { get; set; } + } + + public class TelefonChanges + { + public object sender { get; set; } + public int index { get; set; } + } + } +} diff --git a/AV-ToolV3/Crypto.cs b/AV-ToolV3/Crypto.cs new file mode 100644 index 0000000..fe700eb --- /dev/null +++ b/AV-ToolV3/Crypto.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Security.Cryptography; +using System.Text; +using System.Threading.Tasks; + +namespace PEP_Tool +{ + public static class Crypto + { + static string CryptoString = @"]VQr$gOKG_19m~p:9y0+DD{6?hL}##l_'^?M)>}OI&EIC~8thwY7YG<\d2[NdKA"; + + public static async Task EncryptString(string Message) + { + await Task.Delay(100); + byte[] Results = null; + System.Text.UTF8Encoding UTF8 = new System.Text.UTF8Encoding(); + MD5CryptoServiceProvider HashProvider = new MD5CryptoServiceProvider(); + byte[] TDESKey = HashProvider.ComputeHash(UTF8.GetBytes(CryptoString)); + TripleDESCryptoServiceProvider TDESAlgorithm = new TripleDESCryptoServiceProvider(); + TDESAlgorithm.Key = TDESKey; + TDESAlgorithm.Mode = CipherMode.ECB; + TDESAlgorithm.Padding = PaddingMode.PKCS7; + byte[] DataToEncrypt = UTF8.GetBytes(Message); + try + { + ICryptoTransform Encryptor = TDESAlgorithm.CreateEncryptor(); + Results = Encryptor.TransformFinalBlock(DataToEncrypt, 0, DataToEncrypt.Length); + } + catch (Exception ex) + { + System.Diagnostics.Debug.WriteLine(ex); + } + finally + { + TDESAlgorithm.Clear(); + HashProvider.Clear(); + + } + + return Convert.ToBase64String(Results); + + } + + public static async Task DecryptString(string Message) + { + await Task.Delay(100); + byte[] Results; + System.Text.UTF8Encoding UTF8 = new System.Text.UTF8Encoding(); + MD5CryptoServiceProvider HashProvider = new MD5CryptoServiceProvider(); + byte[] TDESKey = HashProvider.ComputeHash(UTF8.GetBytes(CryptoString)); + TripleDESCryptoServiceProvider TDESAlgorithm = new TripleDESCryptoServiceProvider(); + TDESAlgorithm.Key = TDESKey; + TDESAlgorithm.Mode = CipherMode.ECB; + TDESAlgorithm.Padding = PaddingMode.PKCS7; + byte[] DataToDecrypt = Convert.FromBase64String(Message); + try + { + ICryptoTransform Decryptor = TDESAlgorithm.CreateDecryptor(); + Results = Decryptor.TransformFinalBlock(DataToDecrypt, 0, DataToDecrypt.Length); + } + catch(Exception ex) + { + LogFile.WriteLine(ex.Message.ToString() + $" Datenlänge: {DataToDecrypt.Length}"); + return "%%"; + } + finally + { + TDESAlgorithm.Clear(); + HashProvider.Clear(); + } + return UTF8.GetString(Results); + } + } +} diff --git a/AV-ToolV3/Download.png b/AV-ToolV3/Download.png new file mode 100644 index 0000000000000000000000000000000000000000..ac8d711a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p(%i{^`>_xFf3SUae7zbmxS-oY-ifLWh$3zhnz zglWZw8gLh>)PQx_0NH4w{~R!1?nr~Js|^`+mPuW}VBBcq<>833X&YvTnZq8xkhmv` z>1)e|zACWJWbJE%zKlM6D$iV(vo{eQ!s3-n!J9(Ho(#CPj<3yd^I-U8NI}T&^ByV^ z_IcNK>u z7^c=*pSe2x?TI?{GW-+!r~LbeZQ(=P%pQ3EaMD&&xSv{PeJ-EYyjXUh=Q(Ze4XBys ziL?%AVY_&ZCsy?(sk?#p^;_c}o!KygOzg(^!@bF2F}U~f`O3qpBt@;p2t$nF*HSnm{tY5+9h1KwPn<+)cwSBqUvUSF^QL~ zy{WV=tpg{B;3wV|UFNmz^$tBIdff&9mx9sDQC63kd+w=I8_nq|2>ej+j-K>z6A42xl8Eu8ygWht&t5bB?0{ymn)l9S)jVa!@h#O7CYk<_Wp$Xq8X?$lU zBCiVTz=7FsINP-8tsw9GGU3^4Fg+-NaM(~ybHB*z!j5w`AwR$bbmyXpSRP$u&lN)0z6z?OAb%b^-`@&+NhahL+2SxCxqNN<>JyX~bDBm@uDJR1Lu) z41Ng1L@;6U6GyEAbVC2Hu~2m)T7DjPaeNfQZ6yj9;*j#(Q)i2EAIfLl4aXwl<>x{; z?bV2znpLod>KY&r{vV1l7&&fkQpi9%?8>zer)L)Fm6;@c-y zZ3{zel}!X;5T5>e{i_*<{I$I6J2Ij6`W3F87ru04!VH}-Lnbt4$b{gcHwxi=hAVT? zgqC3#bVe=63|z@*U7G&+!MF*jfXFC;kliVjjFywqWF;K!woo7~;aK~0AuZwJL--;5 z5Pk?hgdajQ!ryQ4b!iFp-|l&j7bnJNDfxC|_9@z#CYxkZ&l~>8nDQ?ZLK%J)!8Zc{ O0000 list) + { + string[] arr = new string[list.Count]; + StringBuilder sb = new StringBuilder(); + + MainWindow.main.BarIsIndeterminate = false; + MainWindow.main.BarVisibility = System.Windows.Visibility.Visible; + MainWindow.main.BarMax = list.Count; + + sb.AppendLine($"Name;Vorname;Datum;Zuweisung;Bemerkung;" + Environment.NewLine); + + int count = 0; + foreach(var user in list) + { + count++; + sb.AppendLine($"{user.Name};{user.Vorname};{user.Datum.ToString("dd.MM.yyyy")};{user.Zuweisung};{user.Bemerkung};"); + MainWindow.main.BarValue = count; + } + + MainWindow.main.BarIsIndeterminate = true; + MainWindow.main.BarVisibility = System.Windows.Visibility.Collapsed; + + + Microsoft.Win32.SaveFileDialog dialog = new Microsoft.Win32.SaveFileDialog(); + dialog.AddExtension = true; + dialog.DefaultExt = "csv"; + dialog.Filter = "Excel Arbeitsblatt CSV|*.csv"; + dialog.OverwritePrompt = true; + dialog.RestoreDirectory = true; + dialog.Title = "Liste exportieren"; + + dialog.ShowDialog(); + + + if (dialog.FileName != "") + System.IO.File.WriteAllText(dialog.FileName, sb.ToString()); + } + + + } +} diff --git a/AV-ToolV3/FodyWeavers.xml b/AV-ToolV3/FodyWeavers.xml new file mode 100644 index 0000000..c6e1b7c --- /dev/null +++ b/AV-ToolV3/FodyWeavers.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/AV-ToolV3/Helper.cs b/AV-ToolV3/Helper.cs new file mode 100644 index 0000000..a925ba4 --- /dev/null +++ b/AV-ToolV3/Helper.cs @@ -0,0 +1,140 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PEP_Tool +{ + public static class Helper + { + public static string RemoveSpecialCharacters(string str) + { + StringBuilder sb = new StringBuilder(); + foreach (char c in str) + { + if ((c >= '0' && c <= '9') || (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || c == '.' || c == '_') + { + sb.Append(c); + } + } + return sb.ToString(); + } + + public static bool keyIsSpecialKey(System.Windows.Input.Key key) + { + var b = false; + + if (key == System.Windows.Input.Key.Escape || key == System.Windows.Input.Key.Tab || + key == System.Windows.Input.Key.CapsLock || key == System.Windows.Input.Key.LWin || + key == System.Windows.Input.Key.Left || key == System.Windows.Input.Key.Up || + key == System.Windows.Input.Key.Down || key == System.Windows.Input.Key.Right || + key == System.Windows.Input.Key.End || key == System.Windows.Input.Key.Home || + key == System.Windows.Input.Key.PageUp || key == System.Windows.Input.Key.PageDown || + key == System.Windows.Input.Key.PrintScreen || key == System.Windows.Input.Key.Print || + (key >= System.Windows.Input.Key.F1 && key <= System.Windows.Input.Key.LaunchApplication2) || + key == System.Windows.Input.Key.System || key == System.Windows.Input.Key.Play) + b = true; + else + b = false; // the key will sappressed + + return b; + } + + public static bool isTelNumber(System.Windows.Input.Key Char) + { + return ((Char >= System.Windows.Input.Key.D0 && Char <= System.Windows.Input.Key.D9) || + (Char >= System.Windows.Input.Key.NumPad0 && Char <= System.Windows.Input.Key.NumPad9) || + (Char == System.Windows.Input.Key.Delete || + Char == System.Windows.Input.Key.Divide || + Char == System.Windows.Input.Key.Space || + Char == System.Windows.Input.Key.Back || + Char == System.Windows.Input.Key.Add)); + } + + + + public static bool IsBase64String(this string s) + { + s = s.Trim(); + return (s.Length % 4 == 0) && System.Text.RegularExpressions.Regex.IsMatch(s, @"^[a-zA-Z0-9\+/]*={0,3}$", System.Text.RegularExpressions.RegexOptions.None); + } + + + public static T FindVisualChild(System.Windows.DependencyObject depObj) where T : System.Windows.DependencyObject + { + if (depObj != null) + { + for (int i = 0; i < System.Windows.Media.VisualTreeHelper.GetChildrenCount(depObj); i++) + { + System.Windows.DependencyObject child = System.Windows.Media.VisualTreeHelper.GetChild(depObj, i); + if (child != null && child is T) + { + return (T)child; + } + + T childItem = FindVisualChild(child); + if (childItem != null) return childItem; + } + } + return null; + } + + + public static int IndexOfNth(this string str, string value, int nth = 1) + { + if (nth <= 0) + throw new ArgumentException("Can not find the zeroth index of substring in string. Must start with 1"); + int offset = str.IndexOf(value); + for (int i = 1; i < nth; i++) + { + if (offset == -1) return -1; + offset = str.IndexOf(value, offset + 1); + } + return offset; + } + + public static int CountSubstring(this string text, string value) + { + int count = 0, minIndex = text.IndexOf(value, 0); + while (minIndex != -1) + { + minIndex = text.IndexOf(value, minIndex + value.Length); + count++; + } + return count; + } + + public static string AddLineNumbers(this string text, int startLine = 1) + { + var i = text.CountSubstring("\n"); + var strArr = text.Split("\n".ToCharArray()); + + for(var j = startLine; j <= i; j++) + { + strArr[j] = $"{j - startLine + 1}. " + strArr[j].TrimStart("1234567890. ".ToCharArray()); + } + + text = string.Join("\n", strArr); + return text; + } + } + + public class ReplaceDotConverter : System.Windows.Data.IValueConverter + { + public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) + { + if (value != null) + { + string original = value.ToString(); + return original.Replace("l, ", ""); + } + else return ""; + } + + public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} diff --git a/AV-ToolV3/Info.png b/AV-ToolV3/Info.png new file mode 100644 index 0000000000000000000000000000000000000000..4c65138994af326f09910c013fbceebabdc70bc0 GIT binary patch literal 2303 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D2$V@gK~zXfwN`0V z6ImAKfA{!fe$31vkbp!K7mO$%4w6(ANhO3u5f?;J_8=guHVOy|h&wKgt+uC87!`zU zCV><}61Ie$keILwX%Iw?vuHEtOt+46L#1h)(bMy%@A;DRs_NeFt9Rdh_m$m;-`IXd zU~XC;So64Tt8!<6&M~Keq3E$ke^>sQK8XjMn*HY&xYns2c58l=1lC(8{d;Nxc6lLzHDveSBipj-@-&8 z5W<1PMz?6c2!J>|wpc7(-QD7+L%FwS1Q%b#TzC~#GIyYOE~0RD@9EiV!Z#0^76g}O z0@@)gT*f+ zie~p0z6?Jz6Pi1v?EV+&{KJnQ;z}kssb*e=2~Qhfr}W{;y5JOLWSUh2NPuc-J!}H7 zM36+tOnFUr%H@g3B1`z07vZO;_7+$Xnrk^wIQ8z|q_5Q;HN5nR)8lCdELo2x_OJw< zXhI85AdgJGHat86R6t02S_PoUpbTK4?pBDhZcOek7~g$rGAz%sE6);^JGm=&a>vPu zknFM1>7U3Lu$=4tzHx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File.cs b/AV-ToolV3/LogFile.cs new file mode 100644 index 0000000..a4e60c3 --- /dev/null +++ b/AV-ToolV3/LogFile.cs @@ -0,0 +1,85 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PEP_Tool +{ + public static class LogFile + { + public static void WriteLine(string Text) + { + Debug.WriteLine(DateTime.Now + " v" + Properties.Settings.Default.Version + " " + Text); + try + { + byte[] t = Encoding.ASCII.GetBytes(Text); + if (!Directory.Exists(Path.GetDirectoryName(@"\\bku.db.de\db\DB_006\GLW_11\ICE-Fertigung\M2\Personaleinsatzplanung\Log\Log.txt"))) Directory.CreateDirectory(Path.GetDirectoryName(@"\\bku.db.de\db\DB_006\GLW_11\ICE-Fertigung\M2\Personaleinsatzplanung\Log\Log.txt")); + + //using (var fs = Writer.WaitForFile(@"\\bku.db.de\db\DB_006\GLW_11\ICE-Fertigung\M2\Personaleinsatzplanung\Log\Log.txt", FileMode.Append, FileAccess.Write, FileShare.ReadWrite | FileShare.Delete)) + //{ + // fs.WriteAsync(t, (int)fs.Length, t.Count()); + //} + + File.AppendAllText(@"\\bku.db.de\db\DB_006\GLW_11\ICE-Fertigung\M2\Personaleinsatzplanung\Log\Log.txt", $"{DateTime.Now} v{Properties.Settings.Default.Version} {Environment.MachineName} {Environment.UserDomainName}:{Environment.NewLine}{Environment.NewLine} {Text.ToString()}{Environment.NewLine}{Environment.NewLine}"); + } + catch (Exception) + { + } + } + + public static void WriteLine(double Text) + { + Debug.WriteLine(DateTime.Now + " v" + Properties.Settings.Default.Version + " " + Text); + try + { + if (!Directory.Exists(Path.GetDirectoryName(@"\\bku.db.de\db\DB_006\GLW_11\ICE-Fertigung\M2\Personaleinsatzplanung\Log\Log.txt"))) Directory.CreateDirectory(Path.GetDirectoryName(@"\\bku.db.de\db\DB_006\GLW_11\ICE-Fertigung\M2\Personaleinsatzplanung\Log\Log.txt")); + File.AppendAllText(@"\\bku.db.de\db\DB_006\GLW_11\ICE-Fertigung\M2\Personaleinsatzplanung\Log\Log.txt", $"{DateTime.Now} v{Properties.Settings.Default.Version} {Environment.MachineName} {Environment.UserDomainName}:{Environment.NewLine}{Environment.NewLine} {Text.ToString()}{Environment.NewLine}{Environment.NewLine}"); + } + catch (Exception) + { + } + } + + public static void WriteLine(int Text) + { + Debug.WriteLine(DateTime.Now + " v" + Properties.Settings.Default.Version + " " + Text); + try + { + if (!Directory.Exists(Path.GetDirectoryName(@"\\bku.db.de\db\DB_006\GLW_11\ICE-Fertigung\M2\Personaleinsatzplanung\Log\Log.txt"))) Directory.CreateDirectory(Path.GetDirectoryName(@"\\bku.db.de\db\DB_006\GLW_11\ICE-Fertigung\M2\Personaleinsatzplanung\Log\Log.txt")); + File.AppendAllText(@"\\bku.db.de\db\DB_006\GLW_11\ICE-Fertigung\M2\Personaleinsatzplanung\Log\Log.txt", $"{DateTime.Now} v{Properties.Settings.Default.Version} {Environment.MachineName} {Environment.UserDomainName}:{Environment.NewLine}{Environment.NewLine} {Text.ToString()}{Environment.NewLine}{Environment.NewLine}"); + } + catch (Exception) + { + } + } + + public static void WriteLine(bool Text) + { + Debug.WriteLine(DateTime.Now + " v" + Properties.Settings.Default.Version + " " + Text); + try + { + if (!Directory.Exists(Path.GetDirectoryName(@"\\bku.db.de\db\DB_006\GLW_11\ICE-Fertigung\M2\Personaleinsatzplanung\Log\Log.txt"))) Directory.CreateDirectory(Path.GetDirectoryName(@"\\bku.db.de\db\DB_006\GLW_11\ICE-Fertigung\M2\Personaleinsatzplanung\Log\Log.txt")); + File.AppendAllText(@"\\bku.db.de\db\DB_006\GLW_11\ICE-Fertigung\M2\Personaleinsatzplanung\Log\Log.txt", $"{DateTime.Now} v{Properties.Settings.Default.Version} {Environment.MachineName} {Environment.UserDomainName}:{Environment.NewLine}{Environment.NewLine} {Text.ToString()}{Environment.NewLine}{Environment.NewLine}"); + } + catch (Exception) + { + } + } + + public static void WriteLine(Exception Text) + { + Debug.WriteLine(DateTime.Now + " v" + Properties.Settings.Default.Version + " " + Text); + try + { + if (!Directory.Exists(Path.GetDirectoryName(@"\\bku.db.de\db\DB_006\GLW_11\ICE-Fertigung\M2\Personaleinsatzplanung\Log\Log.txt"))) Directory.CreateDirectory(Path.GetDirectoryName(@"\\bku.db.de\db\DB_006\GLW_11\ICE-Fertigung\M2\Personaleinsatzplanung\Log\Log.txt")); + File.AppendAllText(@"\\bku.db.de\db\DB_006\GLW_11\ICE-Fertigung\M2\Personaleinsatzplanung\Log\Log.txt", $"{DateTime.Now} v{Properties.Settings.Default.Version} {Environment.MachineName} {Environment.UserDomainName}:{Environment.NewLine}{Environment.NewLine} {Text.ToString()}{Environment.NewLine}{Environment.NewLine}"); + } + catch (Exception) + { + } + } + } +} diff --git a/AV-ToolV3/MainWindow.xaml b/AV-ToolV3/MainWindow.xaml new file mode 100644 index 0000000..071ccfe --- /dev/null +++ b/AV-ToolV3/MainWindow.xaml @@ -0,0 +1,505 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Column + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +