diff --git a/.gitignore b/.gitignore index ba2d22159..a3f60446f 100644 --- a/.gitignore +++ b/.gitignore @@ -515,6 +515,7 @@ /ReportImp/LebenshilfeDuisburgAtz/obj/Debug /ReportImp/LebenshilfeDuisburgAtz/obj/Release /ReportImp/VaroSozialagentur/obj/Debug +/ReportImp/AmbulantBetreutesWohnenAstridPulm/obj/Debug /ReportImp/VaroSozialagentur/obj/Release /ReportImp/LebenshilfeDuisburg2/obj/Debug /ReportImp/LebenshilfeDuisburg2/obj/Release diff --git a/BeWo.sln b/BeWo.sln index 63a07f702..1f7be1212 100644 --- a/BeWo.sln +++ b/BeWo.sln @@ -461,6 +461,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bewolonia", "ReportImp\Bewo EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VaroSozialagentur", "ReportImp\VaroSozialagentur\VaroSozialagentur.csproj", "{5C99CC38-15A8-4485-8D59-997EEEA9D6C1}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AmbulantBetreutesWohnenAstridPulm", "ReportImp\AmbulantBetreutesWohnenAstridPulm\AmbulantBetreutesWohnenAstridPulm.csproj", "{6AB16005-E552-4619-9E55-D752FCCAC3B0}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|.NET = Debug|.NET @@ -3536,6 +3538,22 @@ Global {5C99CC38-15A8-4485-8D59-997EEEA9D6C1}.Release|Mixed Platforms.Build.0 = Release|Any CPU {5C99CC38-15A8-4485-8D59-997EEEA9D6C1}.Release|x86.ActiveCfg = Release|Any CPU {5C99CC38-15A8-4485-8D59-997EEEA9D6C1}.Release|x86.Build.0 = Release|Any CPU + {6AB16005-E552-4619-9E55-D752FCCAC3B0}.Debug|.NET.ActiveCfg = Debug|Any CPU + {6AB16005-E552-4619-9E55-D752FCCAC3B0}.Debug|.NET.Build.0 = Debug|Any CPU + {6AB16005-E552-4619-9E55-D752FCCAC3B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6AB16005-E552-4619-9E55-D752FCCAC3B0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6AB16005-E552-4619-9E55-D752FCCAC3B0}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {6AB16005-E552-4619-9E55-D752FCCAC3B0}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {6AB16005-E552-4619-9E55-D752FCCAC3B0}.Debug|x86.ActiveCfg = Debug|Any CPU + {6AB16005-E552-4619-9E55-D752FCCAC3B0}.Debug|x86.Build.0 = Debug|Any CPU + {6AB16005-E552-4619-9E55-D752FCCAC3B0}.Release|.NET.ActiveCfg = Release|Any CPU + {6AB16005-E552-4619-9E55-D752FCCAC3B0}.Release|.NET.Build.0 = Release|Any CPU + {6AB16005-E552-4619-9E55-D752FCCAC3B0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6AB16005-E552-4619-9E55-D752FCCAC3B0}.Release|Any CPU.Build.0 = Release|Any CPU + {6AB16005-E552-4619-9E55-D752FCCAC3B0}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {6AB16005-E552-4619-9E55-D752FCCAC3B0}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {6AB16005-E552-4619-9E55-D752FCCAC3B0}.Release|x86.ActiveCfg = Release|Any CPU + {6AB16005-E552-4619-9E55-D752FCCAC3B0}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -3762,6 +3780,7 @@ Global {B0C86A71-94ED-4F0D-98B3-49DB04056882} = {D8A691C5-146D-4613-86CC-438F02FE9106} {B289C237-C966-41A0-8968-C04D0004F30B} = {D8A691C5-146D-4613-86CC-438F02FE9106} {5C99CC38-15A8-4485-8D59-997EEEA9D6C1} = {D8A691C5-146D-4613-86CC-438F02FE9106} + {6AB16005-E552-4619-9E55-D752FCCAC3B0} = {D8A691C5-146D-4613-86CC-438F02FE9106} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {FBE985BB-9F0F-4DBB-8F94-ABC37A803FF9} diff --git a/BeWo/BeWo.csproj b/BeWo/BeWo.csproj index 201291561..949ce95fb 100644 --- a/BeWo/BeWo.csproj +++ b/BeWo/BeWo.csproj @@ -43,12 +43,12 @@ de-DE BeWoPlaner beyondSoft GmbH - 2.0.1.200 + 2.0.1.204 true publish.htm false true - 201 + 205 2.0.1.%2a false true @@ -320,6 +320,10 @@ MSBuild:Compile Designer + + MSBuild:Compile + Designer + MSBuild:Compile Designer @@ -813,6 +817,7 @@ + UploadDialog.xaml @@ -891,6 +896,7 @@ + @@ -992,9 +998,10 @@ DPCtrlDienstTooltip.xaml + - + @@ -1025,6 +1032,9 @@ InformationView.xaml + + UrlaubstagSchenkenView.xaml + Suchergebnis.xaml @@ -2347,6 +2357,7 @@ Designer + SettingsSingleFileGenerator Settings.Designer.cs diff --git a/BeWo/BeWoApp.xaml.cs b/BeWo/BeWoApp.xaml.cs index 9979f2844..3ab22f738 100644 --- a/BeWo/BeWoApp.xaml.cs +++ b/BeWo/BeWoApp.xaml.cs @@ -47,8 +47,8 @@ namespace BeWo public static LoginControl LoginControl; public static MainControl MainControl; - public static string ShortVersion = "3.3"; - public static string Version = "Version 3.3"; + public static string ShortVersion = "3.4"; + public static string Version = "Version 3.4"; public static int RenderTier = 0; @@ -1088,20 +1088,6 @@ namespace BeWo #endif } - public static void LogMessage(string message, DebugWindowMessageColor color) - { -#if DEBUG - if(_DebugMessageLogView == null) - { - _DebugMessageLogView = new DebugMessageLogView(); - } - - _DebugMessageLogView.Closed += (s, e) => { _DebugMessageLogView = null; }; - - _DebugMessageLogView.Show(); - _DebugMessageLogView.LogMessage(message, color); -#endif - } public static void LogMessage(string message, Color customColor) { #if DEBUG diff --git a/BeWo/LoginControl.xaml.cs b/BeWo/LoginControl.xaml.cs index 57f9929db..73fa02310 100644 --- a/BeWo/LoginControl.xaml.cs +++ b/BeWo/LoginControl.xaml.cs @@ -25,6 +25,7 @@ using BS.Shared; using BS.Shared.Extensions; using BeWo.Core; +using BeWo.Security; using BeWo.ServiceProxy; using BeWo.View; using BeWo.View.Detail; @@ -431,9 +432,9 @@ namespace BeWo while (!myFile.EndOfStream) { - var data = myFile.ReadLine().Split('|'); + var data = myFile.ReadLine()?.Split('|'); - if (data.Length >= 3) + if (data?.Length >= 3) { if (!String.IsNullOrEmpty(data[1]) && !String.IsNullOrEmpty(data[2])) ProfileList.Add(new BeWoProfile(data[0], data[1], data[2])); @@ -445,7 +446,6 @@ namespace BeWo catch (Exception e) { } - } private string GetNumericServerName(string serverName) @@ -1073,6 +1073,7 @@ namespace BeWo ReadProxyName(); } + // TODO: Verschlüsselung einbauen! private void ReadProxyName() { int counter = 0; @@ -1087,17 +1088,24 @@ namespace BeWo filePath = Path.Combine(BeWoApp.GetAndCreateUserAppDataPath(), "proxy.dat"); } - var file = new System.IO.StreamReader(filePath); - while ((line = file.ReadLine()) != null) - { - byte[] decbuff = Convert.FromBase64String(line); - var x = System.Text.Encoding.UTF8.GetString(decbuff); + var allLines = File.ReadAllLines(filePath); - datai[counter] = x; + foreach(var linex in allLines) + { + var decryptedLine = EncryptionUtils.DecryptString(linex); + datai[counter] = decryptedLine; counter++; } - file.Close(); + + //var file = new StreamReader(filePath); + //while ((line = file.ReadLine()) != null) + //{ + // datai[counter] = Encoding.UTF8.GetString(Convert.FromBase64String(line)); + // counter++; + //} + + //file.Close(); proxyname = datai[0]; proxyUsername = datai[1]; @@ -1111,6 +1119,7 @@ namespace BeWo } + private void SaveSelectedProfile(BeWoProfile profile) { try @@ -1134,7 +1143,6 @@ namespace BeWo } } - private void SaveProfileListToFile() { try diff --git a/BeWo/ProxyLoginView.xaml.cs b/BeWo/ProxyLoginView.xaml.cs index c6826c048..534a1ed45 100644 --- a/BeWo/ProxyLoginView.xaml.cs +++ b/BeWo/ProxyLoginView.xaml.cs @@ -1,36 +1,22 @@ using System; using System.Collections.Generic; using System.IO; -using System.Linq; using System.Reflection; -using System.Security.Cryptography; -using System.Text; using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Shapes; +using BeWo.Security; namespace BeWo { - /// - /// Interaktionslogik für ProxyLoginView.xaml - /// - public partial class ProxyLoginView : Window + public partial class ProxyLoginView { public ProxyLoginView() { InitializeComponent(); - - überprüfe(); + CheckBeWoProfile(); } - - private void überprüfe() { + private void CheckBeWoProfile() { if (proxynametxt.Text.Equals("") && proxybenutzer.Text.Equals("") && proxypasswort.Password.Equals("")) { @@ -41,24 +27,34 @@ namespace BeWo try { - var filePath = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\proxy.dat"; + var filePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\proxy.dat"; if (!File.Exists(filePath)) { - filePath = System.IO.Path.Combine(BeWoApp.GetAndCreateUserAppDataPath(), "proxy.dat"); + filePath = Path.Combine(BeWoApp.GetAndCreateUserAppDataPath(), "proxy.dat"); } - var file = new System.IO.StreamReader(filePath); - while ((line = file.ReadLine()) != null) - { + var allLines = File.ReadAllLines(filePath); - byte[] decbuff = Convert.FromBase64String(line); - var x= System.Text.Encoding.UTF8.GetString(decbuff); - datai[counter] = x; + foreach(var linex in allLines) + { + var decryptedLine = EncryptionUtils.DecryptString(linex); + datai[counter] = decryptedLine; counter++; } - file.Close(); + //var file = new StreamReader(filePath); + //while ((line = file.ReadLine()) != null) + //{ + + // byte[] decbuff = Convert.FromBase64String(line); + // var x= System.Text.Encoding.UTF8.GetString(decbuff); + // datai[counter] = x; + + // counter++; + //} + + //file.Close(); proxynametxt.Text = datai[0]; proxybenutzer.Text = datai[1]; @@ -70,50 +66,53 @@ namespace BeWo } + // TODO: Verschlüsselung einbauen! private void proxyOK_Click(object sender, RoutedEventArgs e) { - string ptname = proxynametxt.Text; - string ptbenutzer = proxybenutzer.Text; - string ptpasswd = proxypasswort.Password; - - string[] lines = { ptname, ptbenutzer, ptpasswd }; + string[] lines = { proxynametxt.Text, proxybenutzer.Text, proxypasswort.Password }; + var encryptedLines = new List(); try { - var filePath = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\proxy.dat"; + var filePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\proxy.dat"; if (!File.Exists(filePath)) { - filePath = System.IO.Path.Combine(BeWoApp.GetAndCreateUserAppDataPath(), "proxy.dat"); + filePath = Path.Combine(BeWoApp.GetAndCreateUserAppDataPath(), "proxy.dat"); } - using (System.IO.StreamWriter file = - new System.IO.StreamWriter(filePath)) + foreach(var line in lines) { - foreach (string line in lines) - { - byte[] encData_byte = new byte[line.Length]; - encData_byte = System.Text.Encoding.UTF8.GetBytes(line); - string encodedData = Convert.ToBase64String(encData_byte); - - file.WriteLine(encodedData); - } + encryptedLines.Add(EncryptionUtils.EncryptString(line)); } - ptname = ""; - ptbenutzer = ""; - ptpasswd = ""; + File.WriteAllLines(filePath, encryptedLines); - this.Close(); - }catch(IOException i){ + + + + //using (var file = new StreamWriter(filePath)) + //{ + // foreach (string line in lines) + // { + // byte[] encData_byte = new byte[line.Length]; + // encData_byte = System.Text.Encoding.UTF8.GetBytes(line); + // string encodedData = Convert.ToBase64String(encData_byte); + + // file.WriteLine(encodedData); + // } + //} + + Close(); + + }catch(IOException){ //Fehlermeldung } } - private void proxyAbbr_Click(object sender, RoutedEventArgs e) { - this.Close(); + Close(); } } } diff --git a/BeWo/Scheduler/View/SchedulerAppointmentEditForm.xaml b/BeWo/Scheduler/View/SchedulerAppointmentEditForm.xaml index 2313a9665..5bf0e037b 100644 --- a/BeWo/Scheduler/View/SchedulerAppointmentEditForm.xaml +++ b/BeWo/Scheduler/View/SchedulerAppointmentEditForm.xaml @@ -291,18 +291,22 @@