diff --git a/BeWo/BeWoApp.xaml.cs b/BeWo/BeWoApp.xaml.cs index 4a0563c4f..111bece04 100644 --- a/BeWo/BeWoApp.xaml.cs +++ b/BeWo/BeWoApp.xaml.cs @@ -40,11 +40,10 @@ namespace BeWo /// /// Interaction logic for App.xaml /// - public partial class BeWoApp : INotifyPropertyChanged + public partial class BeWoApp : Application, INotifyPropertyChanged { private static DebugMessageLogView _DebugMessageLogView; - - + private static FrameworkElement _lockedContent; public static LoginControl LoginControl; @@ -787,7 +786,7 @@ namespace BeWo } temp = sr.ReadLine(); - + Loader.Load(temp); } } diff --git a/BeWo/Loader.cs b/BeWo/Loader.cs index 38da348ef..f2873c55c 100644 --- a/BeWo/Loader.cs +++ b/BeWo/Loader.cs @@ -23,7 +23,6 @@ namespace BeWo BeWoApp.UserPassword = password; BeWoApp.ServerName = servername; BeWoApp.Tenant = tenant; - ////if (coreserveraddress is object) BeWoApp.ServerAddress = coreserveraddress; BeWoApp.LoggedOnUser = ServiceFacade.DoUserServiceSync(s => s.LoadUserByNameAndPassword(BeWoApp.UserName, BeWoApp.UserPassword)); diff --git a/BeWo/MainControl.xaml.cs b/BeWo/MainControl.xaml.cs index b9d1251ea..4963e04e3 100644 --- a/BeWo/MainControl.xaml.cs +++ b/BeWo/MainControl.xaml.cs @@ -54,7 +54,7 @@ namespace BeWo CustomerTeam } - public partial class MainControl + public partial class MainControl : UserControl { private const string _PINInfoText = "Um Zugriff auf Ihre Daten zu bekommen, benötigen wir eine PIN."; private readonly Stack _ModalPopupControls = new Stack(); diff --git a/BeWo/View/ExceptionMessageBox.xaml b/BeWo/View/ExceptionMessageBox.xaml index d4a785e01..8f600164a 100644 --- a/BeWo/View/ExceptionMessageBox.xaml +++ b/BeWo/View/ExceptionMessageBox.xaml @@ -1,6 +1,5 @@  - - + diff --git a/BeWo/View/ExceptionMessageBox.xaml.cs b/BeWo/View/ExceptionMessageBox.xaml.cs index 38e9611f4..ff6db7281 100644 --- a/BeWo/View/ExceptionMessageBox.xaml.cs +++ b/BeWo/View/ExceptionMessageBox.xaml.cs @@ -1,10 +1,10 @@ using System; using System.Windows; - +using System.Windows.Controls; namespace BeWo.View { - public partial class ExceptionMessageBox + public partial class ExceptionMessageBox : UserControl { public ExceptionMessageBox(string message, Exception ex, bool showDetails) { diff --git a/BeWoLauncher/Components/ExceptionMessageBox.xaml.cs b/BeWoLauncher/Components/ExceptionMessageBox.xaml.cs index 71a2f32af..507cc11bc 100644 --- a/BeWoLauncher/Components/ExceptionMessageBox.xaml.cs +++ b/BeWoLauncher/Components/ExceptionMessageBox.xaml.cs @@ -1,15 +1,15 @@ using System; using System.Windows; - +using System.Windows.Controls; namespace BeWoLauncher.Components { - public partial class ExceptionMessageBox + public partial class ExceptionMessageBox : UserControl { public ExceptionMessageBox(string message, Exception ex, bool showDetails) : this(message, ex?.ToString(), showDetails) { } public ExceptionMessageBox(string message, string submessage, bool showDetails) - { + { InitializeComponent(); if (!String.IsNullOrEmpty(message) && !showDetails) diff --git a/BeWoLauncher/LauncherApp.xaml.cs b/BeWoLauncher/LauncherApp.xaml.cs index 9aaf88224..611d5f1cb 100644 --- a/BeWoLauncher/LauncherApp.xaml.cs +++ b/BeWoLauncher/LauncherApp.xaml.cs @@ -118,6 +118,7 @@ namespace BeWoLauncher PlanerProcess.StartInfo.FileName = UpdatePathManager.GetPlanerPath(); PlanerProcess.EnableRaisingEvents = true; + PlanerProcess.Exited += PlanerProcess_Exit; using (AnonymousPipeServerStream pipeServer = new AnonymousPipeServerStream(PipeDirection.Out, HandleInheritability.Inheritable)) { @@ -154,7 +155,7 @@ namespace BeWoLauncher Current.Shutdown(); } - private void PlanerProcess_Exit(object sender, EventArgs e) + private static void PlanerProcess_Exit(object sender, EventArgs e) { // ExitCode Übersicht: // 100 - Nutzer hat Logout in Core gedrückt diff --git a/BeWoLauncher/LauncherServiceReferences.bat b/BeWoLauncher/LauncherServiceReferences.bat index 87a331360..763400846 100644 --- a/BeWoLauncher/LauncherServiceReferences.bat +++ b/BeWoLauncher/LauncherServiceReferences.bat @@ -1 +1 @@ -svcutil.exe /noConfig /edb /n:*,BeWoLauncher.ServiceProxy /out:ServiceProxy\LauncherGenerated.cs /ct:System.Collections.Generic.List`1 /r:..\SharedLauncher\bin\Debug\BS.SharedLauncher.dll http://localhost:3778/LauncherService.svc?wsdl http://localhost:3778/EnumTranslationService.svc?wsdl \ No newline at end of file +svcutil.exe /noConfig /edb /n:*,BeWoLauncher.ServiceProxy /out:ServiceProxy\LauncherGenerated.cs /ct:System.Collections.Generic.List`1 /r:..\SharedLauncher\bin\Debug\BS.SharedLauncher.dll http://localhost:3778/LauncherService.svc?wsdl http://localhost:3778/EnumTranslationService.svc?wsdl http://localhost:3778/DownloadBeWoService.svc?wsdl \ No newline at end of file diff --git a/BeWoLauncher/PageImp/02 UpdatePage.xaml.cs b/BeWoLauncher/PageImp/02 UpdatePage.xaml.cs index 12adbad99..fffd2de77 100644 --- a/BeWoLauncher/PageImp/02 UpdatePage.xaml.cs +++ b/BeWoLauncher/PageImp/02 UpdatePage.xaml.cs @@ -100,6 +100,7 @@ namespace BeWoLauncher.PageImp SubMessage = "Starte BeWoPlaner..."; await showDelay(1000); + UpdateFileManager.UpdateData = null; UpdateSuccessful(this, new EventArgs()); UpdatePathManager.GetDownloadDirInfo().ClearFolder(); diff --git a/BeWoLauncher/ServiceProxy/LauncherGenerated.cs b/BeWoLauncher/ServiceProxy/LauncherGenerated.cs index e12d69fc4..6e0063cfa 100644 --- a/BeWoLauncher/ServiceProxy/LauncherGenerated.cs +++ b/BeWoLauncher/ServiceProxy/LauncherGenerated.cs @@ -332,4 +332,54 @@ namespace BeWoLauncher.ServiceProxy return base.Channel.GetTranslation(e, value); } } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] + [System.ServiceModel.ServiceContractAttribute(ConfigurationName="BeWoLauncher.ServiceProxy.IDownloadBeWoService")] + public interface IDownloadBeWoService + { + + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IDownloadBeWoService/Download", ReplyAction="http://tempuri.org/IDownloadBeWoService/DownloadResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(BeWoLauncher.ServiceProxy.BeWoFault), Action="http://tempuri.org/IDownloadBeWoService/DownloadBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] + BS.SharedLauncher.DataContract.BeWoProgramPackageDC Download(BS.SharedLauncher.DataContract.BeWoProgramFilterDC filter); + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] + public interface IDownloadBeWoServiceChannel : BeWoLauncher.ServiceProxy.IDownloadBeWoService, System.ServiceModel.IClientChannel + { + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] + public partial class DownloadBeWoServiceClient : System.ServiceModel.ClientBase, BeWoLauncher.ServiceProxy.IDownloadBeWoService + { + + public DownloadBeWoServiceClient() + { + } + + public DownloadBeWoServiceClient(string endpointConfigurationName) : + base(endpointConfigurationName) + { + } + + public DownloadBeWoServiceClient(string endpointConfigurationName, string remoteAddress) : + base(endpointConfigurationName, remoteAddress) + { + } + + public DownloadBeWoServiceClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : + base(endpointConfigurationName, remoteAddress) + { + } + + public DownloadBeWoServiceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : + base(binding, remoteAddress) + { + } + + public BS.SharedLauncher.DataContract.BeWoProgramPackageDC Download(BS.SharedLauncher.DataContract.BeWoProgramFilterDC filter) + { + return base.Channel.Download(filter); + } + } } diff --git a/BeWoLauncher/ServiceProxy/LauncherServiceFacade.cs b/BeWoLauncher/ServiceProxy/LauncherServiceFacade.cs index 6d0c0f846..2f73c6d8a 100644 --- a/BeWoLauncher/ServiceProxy/LauncherServiceFacade.cs +++ b/BeWoLauncher/ServiceProxy/LauncherServiceFacade.cs @@ -31,7 +31,8 @@ namespace BeWoLauncher.ServiceProxy _EndpointAddresses = new Dictionary { { typeof(ILauncherService), new EndpointAddress(serverName + "LauncherService.svc") }, - { typeof(IEnumTranslationService), new EndpointAddress(serverName + "EnumTranslationService.svc") } + { typeof(IEnumTranslationService), new EndpointAddress(serverName + "EnumTranslationService.svc") }, + { typeof(IDownloadBeWoService), new EndpointAddress(serverName + "DownloadBeWoService.svc") } }; } @@ -91,7 +92,6 @@ namespace BeWoLauncher.ServiceProxy DoMulitpleSync(pActions, true); } #endregion - #region EnumTranslation public static void DoEnumTranslationServiceSync(Action pAction) @@ -144,6 +144,49 @@ namespace BeWoLauncher.ServiceProxy DoMulitpleSync(pActions, true); } + #endregion + #region DownloadBeWo + public static void DoDownloadBeWoServiceSync(Action pAction) + { + try + { + pAction.Invoke(GetInstance()); + } + catch (Exception e) + { + // if (HandleServiceProxyException(e)) + // throw e; + ShowErrorMessage(e); + } + } + public static T DoDownloadBeWoServiceSync(Func pFunc) + { + try + { + return pFunc.Invoke(GetInstance()); + } + catch (Exception e) + { + ShowErrorMessage(e); + } + return default(T); + } + public static void DoDownloadBeWoServiceAsync(Func pFunc, Action pCallBack) + { + DoAsync(pFunc, pCallBack, true); + } + public static void DoDownloadBeWoServiceAsync(Func pFunc, Action pCallBack, bool showWaitDialog) + { + DoAsync(pFunc, pCallBack, showWaitDialog); + } + public static void DoDownloadBeWoServiceAsync(Action pAction) + { + DoAsync(pAction, true); + } + public static void DoDownloadBeWoServiceAsync(Action pAction, Action pCallBack) + { + DoAsync(pAction, pCallBack, true); + } #endregion private static void DoAsync(Func pFunc, Action pCallback, bool showWaitDialog) diff --git a/BeWoLauncher/UpdatePathManager.cs b/BeWoLauncher/UpdatePathManager.cs index 6fa37bb1f..a1c681408 100644 --- a/BeWoLauncher/UpdatePathManager.cs +++ b/BeWoLauncher/UpdatePathManager.cs @@ -26,7 +26,7 @@ namespace BeWoLauncher if (string.IsNullOrWhiteSpace(installLocation)) { - installLocation = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, GetMainExeName()); + installLocation = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "data"); } return installLocation; diff --git a/Host/Web.config b/Host/Web.config index 45b154b59..83b9553aa 100644 --- a/Host/Web.config +++ b/Host/Web.config @@ -105,7 +105,7 @@ - + diff --git a/LauncherHost/DownloadBeWoService.svc b/LauncherHost/DownloadBeWoService.svc new file mode 100644 index 000000000..6e1051749 --- /dev/null +++ b/LauncherHost/DownloadBeWoService.svc @@ -0,0 +1 @@ +<%@ ServiceHost Language="C#" Debug="true" Service="BeWo.Service.ServiceImplementations.DownloadBeWoServiceImp" %> \ No newline at end of file diff --git a/LauncherHost/LauncherHost.csproj b/LauncherHost/LauncherHost.csproj index 87de87b04..2c079e930 100644 --- a/LauncherHost/LauncherHost.csproj +++ b/LauncherHost/LauncherHost.csproj @@ -54,6 +54,9 @@ ..\Lib\NHibernate.ByteCode.Castle.dll + + + @@ -76,6 +79,7 @@ + diff --git a/LauncherHost/Web.config b/LauncherHost/Web.config index 0437a6174..319b6c899 100644 --- a/LauncherHost/Web.config +++ b/LauncherHost/Web.config @@ -49,6 +49,12 @@ + + + + + + @@ -76,6 +82,9 @@ + + + @@ -86,9 +95,7 @@ - - diff --git a/Service/Service.csproj b/Service/Service.csproj index 6b7ef6b27..1dc0cb623 100644 --- a/Service/Service.csproj +++ b/Service/Service.csproj @@ -106,24 +106,6 @@ ..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll - - ..\packages\Microsoft.CodeAnalysis.Common.3.11.0\lib\netstandard2.0\Microsoft.CodeAnalysis.dll - - - ..\packages\Microsoft.CodeAnalysis.CSharp.3.11.0\lib\netstandard2.0\Microsoft.CodeAnalysis.CSharp.dll - - - ..\packages\Microsoft.CodeAnalysis.CSharp.Workspaces.3.11.0\lib\netstandard2.0\Microsoft.CodeAnalysis.CSharp.Workspaces.dll - - - ..\packages\Microsoft.CodeAnalysis.VisualBasic.3.11.0\lib\netstandard2.0\Microsoft.CodeAnalysis.VisualBasic.dll - - - ..\packages\Microsoft.CodeAnalysis.VisualBasic.Workspaces.3.11.0\lib\netstandard2.0\Microsoft.CodeAnalysis.VisualBasic.Workspaces.dll - - - ..\packages\Microsoft.CodeAnalysis.Workspaces.Common.3.11.0\lib\netstandard2.0\Microsoft.CodeAnalysis.Workspaces.dll - False ..\Lib\MySql.Data.dll @@ -463,6 +445,7 @@ + @@ -476,6 +459,7 @@ + diff --git a/Service/ServiceContracts/IDownloadBeWoService.cs b/Service/ServiceContracts/IDownloadBeWoService.cs new file mode 100644 index 000000000..9ae8dd14e --- /dev/null +++ b/Service/ServiceContracts/IDownloadBeWoService.cs @@ -0,0 +1,17 @@ +using System; +using System.IO; +using System.ServiceModel; + +using BS.Shared.DataContracts; +using BS.SharedLauncher.DataContract; + +namespace BeWo.Service.ServiceContracts +{ + [ServiceContract] + public interface IDownloadBeWoService + { + [FaultContract(typeof(BeWoFault))] + [OperationContract] + BeWoProgramPackageDC Download(BeWoProgramFilterDC filter); + } +} \ No newline at end of file diff --git a/Service/ServiceImplementations/DownloadBeWoServiceImp.cs b/Service/ServiceImplementations/DownloadBeWoServiceImp.cs new file mode 100644 index 000000000..65ba14119 --- /dev/null +++ b/Service/ServiceImplementations/DownloadBeWoServiceImp.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; + +using System.ServiceModel; +using BeWo.Service.ServiceContracts; +using BS.SharedLauncher.DataContract; + +namespace BeWo.Service.ServiceImplementations +{ + [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall, ConcurrencyMode = ConcurrencyMode.Single)] + public class DownloadBeWoServiceImp : IDownloadBeWoService + { + public BeWoProgramPackageDC Download(BeWoProgramFilterDC filter) + { + return null; + } + } +} \ No newline at end of file diff --git a/SharedLauncher/DataContract/BeWoProgramFilterDC.cs b/SharedLauncher/DataContract/BeWoProgramFilterDC.cs new file mode 100644 index 000000000..e17a70f11 --- /dev/null +++ b/SharedLauncher/DataContract/BeWoProgramFilterDC.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Threading.Tasks; + +namespace BS.SharedLauncher.DataContract +{ + [DataContract] + public class BeWoProgramFilterDC + { + } +} diff --git a/SharedLauncher/SharedLauncher.csproj b/SharedLauncher/SharedLauncher.csproj index 390a7735c..5189958be 100644 --- a/SharedLauncher/SharedLauncher.csproj +++ b/SharedLauncher/SharedLauncher.csproj @@ -47,6 +47,7 @@ +