From b72ca2b364baa8678e2fc294ef96c7259285d0af Mon Sep 17 00:00:00 2001 From: NinjaManatee Date: Wed, 27 Sep 2023 15:21:07 -0400 Subject: [PATCH] Update examples for 8.9.3 --- .../AuthenticationExample.csproj | 6 +- AuthenticationExample/packages.config | 2 +- FDC3WPFExample/FDC3WPFExample.csproj | 6 +- FDC3WPFExample/packages.config | 2 +- MultiWindowExample/App.xaml.cs | 189 ++--- MultiWindowExample/MultiWindowExample.csproj | 6 +- MultiWindowExample/SingleInstance.cs | 11 +- MultiWindowExample/Window1.xaml.cs | 2 - MultiWindowExample/Window2.xaml.cs | 2 - MultiWindowExample/Window3.xaml.cs | 2 - MultiWindowExample/Window4.xaml.cs | 2 - MultiWindowExample/packages.config | 2 +- WPFExample/WPFExample.csproj | 6 +- WPFExample/packages.config | 2 +- WPFExampleCore/WPFExampleCore.csproj | 2 +- .../WPFMultiWindowExampleCore.csproj | 2 +- .../WindowlessExample.Core.csproj | 4 +- WindowlessExample/WindowlessExample.csproj | 6 +- WindowlessExample/packages.config | 2 +- WinformExample/WinformExample.csproj | 6 +- WinformExample/packages.config | 2 +- WinformExampleCore/WinformExampleCore.csproj | 2 +- .../WinformMultiWindowExample.csproj | 6 +- WinformMultiWindowExample/packages.config | 2 +- .../WinformMultiWindowExampleCore.csproj | 2 +- apps.json | 735 ++++++++++++++++++ 26 files changed, 870 insertions(+), 141 deletions(-) create mode 100644 apps.json diff --git a/AuthenticationExample/AuthenticationExample.csproj b/AuthenticationExample/AuthenticationExample.csproj index 537fd26..bd9e58b 100644 --- a/AuthenticationExample/AuthenticationExample.csproj +++ b/AuthenticationExample/AuthenticationExample.csproj @@ -49,8 +49,8 @@ ..\packages\DotNetZip.1.16.0\lib\net40\DotNetZip.dll - - ..\packages\Finsemble.8.9.0\lib\net452\Finsemble.dll + + ..\packages\Finsemble.8.9.3\lib\net452\Finsemble.dll ..\packages\Microsoft.IdentityModel.Logging.6.16.0\lib\net45\Microsoft.IdentityModel.Logging.dll @@ -59,7 +59,7 @@ ..\packages\Microsoft.IdentityModel.Tokens.6.16.0\lib\net45\Microsoft.IdentityModel.Tokens.dll - ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.13.0.2\lib\net45\Newtonsoft.Json.dll ..\packages\PInvoke.Windows.Core.0.6.49\lib\net20\PInvoke.Windows.Core.dll diff --git a/AuthenticationExample/packages.config b/AuthenticationExample/packages.config index 24c9b73..1ff02da 100644 --- a/AuthenticationExample/packages.config +++ b/AuthenticationExample/packages.config @@ -1,7 +1,7 @@  - + diff --git a/FDC3WPFExample/FDC3WPFExample.csproj b/FDC3WPFExample/FDC3WPFExample.csproj index a9c26fe..63fb7ae 100644 --- a/FDC3WPFExample/FDC3WPFExample.csproj +++ b/FDC3WPFExample/FDC3WPFExample.csproj @@ -49,8 +49,8 @@ ..\packages\DotNetZip.1.16.0\lib\net40\DotNetZip.dll - - ..\packages\Finsemble.8.9.0\lib\net452\Finsemble.dll + + ..\packages\Finsemble.8.9.3\lib\net452\Finsemble.dll ..\packages\Microsoft.IdentityModel.Logging.6.16.0\lib\net45\Microsoft.IdentityModel.Logging.dll @@ -59,7 +59,7 @@ ..\packages\Microsoft.IdentityModel.Tokens.6.16.0\lib\net45\Microsoft.IdentityModel.Tokens.dll - ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.13.0.2\lib\net45\Newtonsoft.Json.dll ..\packages\PInvoke.Windows.Core.0.6.49\lib\net20\PInvoke.Windows.Core.dll diff --git a/FDC3WPFExample/packages.config b/FDC3WPFExample/packages.config index b57d159..d42ea0f 100644 --- a/FDC3WPFExample/packages.config +++ b/FDC3WPFExample/packages.config @@ -1,7 +1,7 @@  - + diff --git a/MultiWindowExample/App.xaml.cs b/MultiWindowExample/App.xaml.cs index 2c46c21..a8fce64 100644 --- a/MultiWindowExample/App.xaml.cs +++ b/MultiWindowExample/App.xaml.cs @@ -5,7 +5,9 @@ using System.Diagnostics; using System.Linq; using System.Threading; +using System.Threading.Tasks; using System.Windows; +using System.Windows.Interop; using System.Windows.Threading; namespace MultiWindowExample @@ -15,8 +17,6 @@ namespace MultiWindowExample /// public partial class App : Application, ISingleInstanceApp { - private static readonly object lockObj = new object(); - private const string Unique = "6bea6fc4-5d9c-4961-b39d-89addcd65a73"; private static App application = null; @@ -35,6 +35,10 @@ public partial class App : Application, ISingleInstanceApp QI = "PODgpJrXxPAp72v_O0fNfAhWjHLeTk9TfLARl9lzPpYIoYR5tgP1Y_A-3feH_xtCfkzcCskfXIerQlY9lVmqs-eGEYjfuuPVYIruN4OsskMY1nz-h_14clyUmUwfCQJDV4qjcAzf80IMu53jYEW1BydRf90snRjk1dYgSq_qtTQ", }; + private static TaskCompletionSource ParentInstanceReadyTCS; + + private static SemaphoreSlim SemaphoreSync = new SemaphoreSlim(1, 1); + /// /// /// @@ -42,7 +46,7 @@ public partial class App : Application, ISingleInstanceApp public static void Main(string[] args) { #if DEBUG - Debugger.Launch(); + Debugger.Launch(); #endif #if LOGGING && TRACE @@ -82,25 +86,28 @@ public static void Main(string[] args) // then ensure that we always release the mutex if (SingleInstance.InitializeAsFirstInstance(Unique)) { - application = new App(); - - // If window type passed for initial launch, add listener to launch window when connected. - var argsList = args.ToList(); - IEnumerable nonFSBLArgs = GetNonFinsembleArgs(argsList); - if ((nonFSBLArgs != null) && nonFSBLArgs.Any()) - { - // Non-finsemble arguments passed, launch window - LaunchWindow(args.ToList()); - } - else + // initialize the parent instance + if (FSBL == null) { + ParentInstanceReadyTCS = new TaskCompletionSource(); + // Register with Finsemble as a windowless component so the application will close when Finsemble is closed. - //Ensure that your window has been created (so that its window handle exists) before connecting to Finsemble. - var fsbl = new Finsemble(args.ToArray(), null); + FSBL = new Finsemble(args, null); + FSBL.Connected += FSBL_Connected; + // Subscribe on Disconnected event to close the Application + FSBL.Disconnected += OnShutdown; + FSBL.Connect("MultiWindowExample", JWK); + } - fsbl.Connect("MultiWindowExample", JWK); + // If window type passed for initial launch, add listener to launch window when connected. + var newWindowName = GetWindowNameToLaunch(args); + if (!string.IsNullOrEmpty(newWindowName)) + { + _ = LaunchWindow(newWindowName, args); } + // start application + application = new App(); application.InitializeComponent(); mutex.ReleaseMutex(); application.Run(); @@ -111,121 +118,90 @@ public static void Main(string[] args) } } - /// - /// Giving a list of arguments, returns an enumerable of non-Finsemble arguments (no =) - /// - /// List of arguments - /// Enumerable of non-Finsemble arguments - private static IEnumerable GetNonFinsembleArgs(IList args) - { - var nonFSBLArgs = args.Where(str => !str.Contains("=") && !str.Contains(".exe")); - - return nonFSBLArgs; - } - /// /// Launches a Finsemble aware window with the passed arguments. /// - /// The arguments passed to the process. - /// Always true? - private static bool LaunchWindow(IList args) + /// The name of the window to be launched. + /// Command line args for launched window. + private static async Task LaunchWindow(string windowName, IEnumerable args) { -#if DEBUG - Debugger.Launch(); -#endif - - if (!args.Any()) - { - // Invalid number of arguments - return true; - } + TaskCompletionSource tcs = new TaskCompletionSource(); - var nonFSBLArgs = GetNonFinsembleArgs(args); - if ((nonFSBLArgs == null) || !nonFSBLArgs.Any()) + if (string.IsNullOrEmpty(windowName)) { - // no non-finsemble arguments. Cannot launch window. - return true; + // Invalid window name + throw new ArgumentNullException("windowName", "Invalid window name"); } - string name = nonFSBLArgs.First(); - - // handle command line arguments of second instance Window window = null; Current.Dispatcher.Invoke(() => { - window = CreateWindow(name); + window = CreateWindow(windowName); }); if (window == null) { - Trace.TraceWarning($"Could not create window: {name}"); + Trace.TraceWarning($"Could not create window: {windowName}"); + tcs.SetResult(window); + } + else if (!(window is IIntegratable fsblWindow)) + { + Trace.TraceWarning($"The window \"{windowName}\" is not a window that can be integrated into Finsemble."); + tcs.SetResult(window); } else { + Current.Dispatcher.Invoke(() => + { + // Ensure that your window has been created (so that its window handle exists) before connecting to Finsemble. + new WindowInteropHelper(window).EnsureHandle(); + }); + + // Wait until the parent instance connects to Finsemble + await ParentInstanceReadyTCS.Task; + // Register with Finsemble - //Ensure that your window has been created (so that its window handle exists) before connecting to Finsemble. - var fsbl = new Finsemble(args.ToArray(), window); + var fsbl = new Finsemble(args?.ToArray(), window); fsbl.Connected += (s, e) => { - IIntegratable fsblWin = window as IIntegratable; - if (fsblWin == null) - { - Trace.TraceWarning($"The window \"{name}\" is not a window that can be integrated into Finsemble."); - } - else - { - fsblWin.SetFinsemble(fsbl); - } - + fsblWindow.SetFinsemble(fsbl); Current.Dispatcher.Invoke(window.Show); + + // releases the Task when the child window connected to Finsemble + tcs.SetResult(window); }; // Dispose of Finsemble object when window is closed. window.Closed += (s, e) => { - Trace.TraceInformation("disposing window from app.xaml"); - fsbl.Dispose(); - Trace.TraceInformation("dispose completed"); + Trace.TraceInformation($"The window {windowName} has been closed"); }; fsbl.Connect("MultiWindowExample", JWK); } - return true; + return await tcs.Task; } - private static void OnShutdown(object sender, EventArgs e) + private static void FSBL_Connected(object sender, EventArgs e) { - if (FSBL != null) - { - lock (lockObj) - { - if (FSBL != null) - { - try - { - // Dispose of Finsemble. - FSBL.Dispose(); - } - catch { } - finally - { - FSBL = null; - } - } + // Uncomment a row below if the parent app is appService and the config contains "waitForInitialization": true + // FSBL.PublishReady(); + ParentInstanceReadyTCS.SetResult(true); + } - } - } + private static void OnShutdown(object sender, EventArgs e) + { + FSBL = null; try { // Release main thread so application can exit. Current.Dispatcher.Invoke(application.Shutdown); } - catch + catch (Exception ex) { - // An error occurred, but I don't care as long as it exits. - ; + Trace.TraceError($"Couldn't shutdown the apllication. Exception: {ex.Message}"); } } @@ -277,7 +253,27 @@ private static Window CreateWindow(string name) /// public bool SignalExternalCommandLineArgs(IList args) { - return LaunchWindow(args); + var newWindowName = GetWindowNameToLaunch(args); + Task.Run(async () => + { + try + { + // The SemaphoreSync object will guarantee that only one child window will be created per time. + // Use TimeSpan as parameter to prevent an infinite waiting while SemaphoreSync is released. + await SemaphoreSync.WaitAsync(TimeSpan.FromMinutes(5)); + await LaunchWindow(newWindowName, args); + } + catch(Exception ex) + { + Trace.TraceError($"Couldn't launch child window because {ex.Message}"); + } + finally + { + SemaphoreSync.Release(); + } + + }); + return true; } #endregion @@ -288,11 +284,16 @@ public bool SignalExternalCommandLineArgs(IList args) /// private void Application_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e) { -#if DEBUG - Debugger.Launch(); -#endif + MessageBox.Show($"An Unhandled Exception has occurred. Please Check your event Logs. \n {e.Exception.Message}"); + } - MessageBox.Show("An Unhandled Exception has occurred. Please Check your event Logs."); + /// + /// Returns the window name which should be created + /// + /// command line arguments passed to application + private static string GetWindowNameToLaunch(IEnumerable args) + { + return args?.FirstOrDefault(str => !str.Contains("=") && !str.Contains(".exe")); } } } \ No newline at end of file diff --git a/MultiWindowExample/MultiWindowExample.csproj b/MultiWindowExample/MultiWindowExample.csproj index 0352b77..107a0e7 100644 --- a/MultiWindowExample/MultiWindowExample.csproj +++ b/MultiWindowExample/MultiWindowExample.csproj @@ -49,8 +49,8 @@ ..\packages\DotNetZip.1.16.0\lib\net40\DotNetZip.dll - - ..\packages\Finsemble.8.9.0\lib\net452\Finsemble.dll + + ..\packages\Finsemble.8.9.3\lib\net452\Finsemble.dll ..\packages\Microsoft.IdentityModel.Logging.6.16.0\lib\net45\Microsoft.IdentityModel.Logging.dll @@ -59,7 +59,7 @@ ..\packages\Microsoft.IdentityModel.Tokens.6.16.0\lib\net45\Microsoft.IdentityModel.Tokens.dll - ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.13.0.2\lib\net45\Newtonsoft.Json.dll ..\packages\PInvoke.Windows.Core.0.6.49\lib\net20\PInvoke.Windows.Core.dll diff --git a/MultiWindowExample/SingleInstance.cs b/MultiWindowExample/SingleInstance.cs index d64e471..c63b0aa 100644 --- a/MultiWindowExample/SingleInstance.cs +++ b/MultiWindowExample/SingleInstance.cs @@ -437,12 +437,10 @@ private static object ActivateFirstInstanceCallback(object arg) private static void ActivateFirstInstance(IList args) { // Set main window state and process command line args - if (Application.Current == null) + if (Application.Current is TApplication application) { - return; + application.SignalExternalCommandLineArgs(args); } - - ((TApplication)Application.Current).SignalExternalCommandLineArgs(args); } #endregion @@ -465,7 +463,10 @@ public void InvokeFirstInstance(IList args) { // Do an asynchronous call to ActivateFirstInstance function Application.Current.Dispatcher.BeginInvoke( - DispatcherPriority.Normal, new DispatcherOperationCallback(SingleInstance.ActivateFirstInstanceCallback), args); + DispatcherPriority.Normal, + new DispatcherOperationCallback(ActivateFirstInstanceCallback), + args + ); } } diff --git a/MultiWindowExample/Window1.xaml.cs b/MultiWindowExample/Window1.xaml.cs index c5969e2..7f4de55 100644 --- a/MultiWindowExample/Window1.xaml.cs +++ b/MultiWindowExample/Window1.xaml.cs @@ -53,8 +53,6 @@ public void SetFinsemble(Finsemble fsbl) }; fsbl.DragAndDropClient.SetScrim(Scrim); // The Scrim Label Control is used for drag and drop. - - Show(); }); } } diff --git a/MultiWindowExample/Window2.xaml.cs b/MultiWindowExample/Window2.xaml.cs index e41cde5..c087582 100644 --- a/MultiWindowExample/Window2.xaml.cs +++ b/MultiWindowExample/Window2.xaml.cs @@ -53,8 +53,6 @@ public void SetFinsemble(Finsemble fsbl) }; fsbl.DragAndDropClient.SetScrim(Scrim); // The Scrim Label Control is used for drag and drop. - - Show(); }); } } diff --git a/MultiWindowExample/Window3.xaml.cs b/MultiWindowExample/Window3.xaml.cs index 5186f58..a93bcc2 100644 --- a/MultiWindowExample/Window3.xaml.cs +++ b/MultiWindowExample/Window3.xaml.cs @@ -53,8 +53,6 @@ public void SetFinsemble(Finsemble fsbl) }; fsbl.DragAndDropClient.SetScrim(Scrim); // The Scrim Label Control is used for drag and drop. - - Show(); }); } } diff --git a/MultiWindowExample/Window4.xaml.cs b/MultiWindowExample/Window4.xaml.cs index 11cef91..3db0170 100644 --- a/MultiWindowExample/Window4.xaml.cs +++ b/MultiWindowExample/Window4.xaml.cs @@ -53,8 +53,6 @@ public void SetFinsemble(Finsemble fsbl) }; fsbl.DragAndDropClient.SetScrim(Scrim); // The Scrim Label Control is used for drag and drop. - - Show(); }); } } diff --git a/MultiWindowExample/packages.config b/MultiWindowExample/packages.config index 24c9b73..1ff02da 100644 --- a/MultiWindowExample/packages.config +++ b/MultiWindowExample/packages.config @@ -1,7 +1,7 @@  - + diff --git a/WPFExample/WPFExample.csproj b/WPFExample/WPFExample.csproj index d3154df..248a2fc 100644 --- a/WPFExample/WPFExample.csproj +++ b/WPFExample/WPFExample.csproj @@ -49,8 +49,8 @@ ..\packages\DotNetZip.1.16.0\lib\net40\DotNetZip.dll - - ..\packages\Finsemble.8.9.0\lib\net452\Finsemble.dll + + ..\packages\Finsemble.8.9.3\lib\net452\Finsemble.dll ..\packages\Microsoft.IdentityModel.Logging.6.16.0\lib\net45\Microsoft.IdentityModel.Logging.dll @@ -59,7 +59,7 @@ ..\packages\Microsoft.IdentityModel.Tokens.6.16.0\lib\net45\Microsoft.IdentityModel.Tokens.dll - ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.13.0.2\lib\net45\Newtonsoft.Json.dll ..\packages\PInvoke.Windows.Core.0.6.49\lib\net20\PInvoke.Windows.Core.dll diff --git a/WPFExample/packages.config b/WPFExample/packages.config index b57d159..d42ea0f 100644 --- a/WPFExample/packages.config +++ b/WPFExample/packages.config @@ -1,7 +1,7 @@  - + diff --git a/WPFExampleCore/WPFExampleCore.csproj b/WPFExampleCore/WPFExampleCore.csproj index 9779dce..2d02edc 100644 --- a/WPFExampleCore/WPFExampleCore.csproj +++ b/WPFExampleCore/WPFExampleCore.csproj @@ -29,7 +29,7 @@ - + diff --git a/WPFMultiWindowExampleCore/WPFMultiWindowExampleCore.csproj b/WPFMultiWindowExampleCore/WPFMultiWindowExampleCore.csproj index c475b57..b586bd9 100644 --- a/WPFMultiWindowExampleCore/WPFMultiWindowExampleCore.csproj +++ b/WPFMultiWindowExampleCore/WPFMultiWindowExampleCore.csproj @@ -26,7 +26,7 @@ - + diff --git a/WindowlessExample.Core/WindowlessExample.Core.csproj b/WindowlessExample.Core/WindowlessExample.Core.csproj index 4da981f..329a8b0 100644 --- a/WindowlessExample.Core/WindowlessExample.Core.csproj +++ b/WindowlessExample.Core/WindowlessExample.Core.csproj @@ -1,4 +1,4 @@ - + WinExe @@ -24,7 +24,7 @@ - + diff --git a/WindowlessExample/WindowlessExample.csproj b/WindowlessExample/WindowlessExample.csproj index 0a35df7..f803fc0 100644 --- a/WindowlessExample/WindowlessExample.csproj +++ b/WindowlessExample/WindowlessExample.csproj @@ -46,8 +46,8 @@ bin\x64\Release\ - - ..\packages\Finsemble.8.9.0\lib\net452\Finsemble.dll + + ..\packages\Finsemble.8.9.3\lib\net452\Finsemble.dll @@ -57,7 +57,7 @@ ..\packages\Microsoft.IdentityModel.Tokens.6.16.0\lib\net45\Microsoft.IdentityModel.Tokens.dll - ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.13.0.2\lib\net45\Newtonsoft.Json.dll ..\packages\PInvoke.Windows.Core.0.6.49\lib\net20\PInvoke.Windows.Core.dll diff --git a/WindowlessExample/packages.config b/WindowlessExample/packages.config index c56a68b..4c81ed6 100644 --- a/WindowlessExample/packages.config +++ b/WindowlessExample/packages.config @@ -1,6 +1,6 @@  - + diff --git a/WinformExample/WinformExample.csproj b/WinformExample/WinformExample.csproj index 17ba766..7137901 100644 --- a/WinformExample/WinformExample.csproj +++ b/WinformExample/WinformExample.csproj @@ -50,8 +50,8 @@ ..\packages\DotNetZip.1.16.0\lib\net40\DotNetZip.dll - - ..\packages\Finsemble.8.9.0\lib\net452\Finsemble.dll + + ..\packages\Finsemble.8.9.3\lib\net452\Finsemble.dll ..\packages\Microsoft.IdentityModel.Logging.6.16.0\lib\net45\Microsoft.IdentityModel.Logging.dll @@ -69,7 +69,7 @@ ..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll - ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.13.0.2\lib\net45\Newtonsoft.Json.dll ..\packages\PInvoke.Windows.Core.0.6.49\lib\net20\PInvoke.Windows.Core.dll diff --git a/WinformExample/packages.config b/WinformExample/packages.config index d4c6e0d..f364b7b 100644 --- a/WinformExample/packages.config +++ b/WinformExample/packages.config @@ -1,7 +1,7 @@  - + diff --git a/WinformExampleCore/WinformExampleCore.csproj b/WinformExampleCore/WinformExampleCore.csproj index b605f2b..22e400e 100644 --- a/WinformExampleCore/WinformExampleCore.csproj +++ b/WinformExampleCore/WinformExampleCore.csproj @@ -39,7 +39,7 @@ - + diff --git a/WinformMultiWindowExample/WinformMultiWindowExample.csproj b/WinformMultiWindowExample/WinformMultiWindowExample.csproj index 8f4f429..20555f2 100644 --- a/WinformMultiWindowExample/WinformMultiWindowExample.csproj +++ b/WinformMultiWindowExample/WinformMultiWindowExample.csproj @@ -50,8 +50,8 @@ ..\packages\DotNetZip.1.16.0\lib\net40\DotNetZip.dll - - ..\packages\Finsemble.8.9.0\lib\net452\Finsemble.dll + + ..\packages\Finsemble.8.9.3\lib\net452\Finsemble.dll ..\packages\Microsoft.IdentityModel.Logging.6.16.0\lib\net45\Microsoft.IdentityModel.Logging.dll @@ -70,7 +70,7 @@ - ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.13.0.2\lib\net45\Newtonsoft.Json.dll ..\packages\PInvoke.Windows.Core.0.6.49\lib\net20\PInvoke.Windows.Core.dll diff --git a/WinformMultiWindowExample/packages.config b/WinformMultiWindowExample/packages.config index 7f2bcf6..480ba5d 100644 --- a/WinformMultiWindowExample/packages.config +++ b/WinformMultiWindowExample/packages.config @@ -1,7 +1,7 @@  - + diff --git a/WinformMultiWindowExampleCore/WinformMultiWindowExampleCore.csproj b/WinformMultiWindowExampleCore/WinformMultiWindowExampleCore.csproj index ebb5a26..0995c51 100644 --- a/WinformMultiWindowExampleCore/WinformMultiWindowExampleCore.csproj +++ b/WinformMultiWindowExampleCore/WinformMultiWindowExampleCore.csproj @@ -25,7 +25,7 @@ - + diff --git a/apps.json b/apps.json new file mode 100644 index 0000000..91ed390 --- /dev/null +++ b/apps.json @@ -0,0 +1,735 @@ +{ + "comment": "Apps config", + "$schema": "../../../../core/configs/schemas/fileBasedSchemas/appsConfigFile.schema.json", + "apps": [ + { + "appId": "WPFExampleCore", + "name": "WPFExampleCore", + "type": "native", + "details": { + "path": "$wpfExampleCoreRoot/WPFExampleCore.exe" + }, + "interop": { + "intents": { + "listensFor": { + "ViewChart": { + "displayName": "View Chart", + "contexts": [ "fdc3.instrument" ] + } + } + } + }, + "hostManifests": { + "Finsemble": { + "signatureKey": { + "e": "AQAB", + "ext": true, + "key_ops": [ "verify" ], + "kty": "RSA", + "n": "zPOxYfLiAd3rM7KOLDBIeLl0kjQ7fk43mTTc1Nm9BDaSNVWqvOshSMCHmqOrKZX_WwA67Y6CQxWI5rZ6WNzoLHQU3PyqOvAdB7RgXCHlSeVYZ2haTcbWRjAXQ89H1WfnW96VwAbZn5nccxQGYlZIl3AMcwNRqV4hmiKtJVq4-2OzA-zs9Yg4Pfs6TbKR1XbNKz6EAPHDev0-7Xdnb6x1-qr4uL2Bq0ZwgfnyKQIRLc3zhD5kwqiJ5N7uZAZomLRkMFMXwy1UftD6fQUlFT2yoISn403RwN7YHEL8KoA9X7Jgs-dtlBh8c38QzQ1vbdMBzPuyRb07GMMKb6bdjdBV1w" + }, + "window": { + "windowType": "native", + "minHeight": 300, + "minWidth": 300 + }, + "foreign": { + "components": { + "App Launcher": { + "launchableByUser": true + } + } + } + } + }, + "version": "1.0.0", + "publisher": "Cosaic" + }, + { + "appId": "WinformExampleCore", + "name": "WinformExampleCore", + "type": "native", + "details": { + "path": "$winformExampleCoreRoot/WinformExampleCore.FDC3.exe" + }, + "hostManifests": { + "Finsemble": { + "signatureKey": { + "e": "AQAB", + "ext": true, + "key_ops": [ "verify" ], + "kty": "RSA", + "n": "zPOxYfLiAd3rM7KOLDBIeLl0kjQ7fk43mTTc1Nm9BDaSNVWqvOshSMCHmqOrKZX_WwA67Y6CQxWI5rZ6WNzoLHQU3PyqOvAdB7RgXCHlSeVYZ2haTcbWRjAXQ89H1WfnW96VwAbZn5nccxQGYlZIl3AMcwNRqV4hmiKtJVq4-2OzA-zs9Yg4Pfs6TbKR1XbNKz6EAPHDev0-7Xdnb6x1-qr4uL2Bq0ZwgfnyKQIRLc3zhD5kwqiJ5N7uZAZomLRkMFMXwy1UftD6fQUlFT2yoISn403RwN7YHEL8KoA9X7Jgs-dtlBh8c38QzQ1vbdMBzPuyRb07GMMKb6bdjdBV1w" + }, + "window": { + "windowType": "native", + "minHeight": 300, + "minWidth": 300 + }, + "foreign": { + "components": { + "App Launcher": { + "launchableByUser": true + } + } + }, + "interop": { + "selectConnect": [ + { + "contextType": "fdc3.instrument", + "cc": "#Workspace" + } + ] + } + } + }, + "version": "1.0.0", + "publisher": "Cosaic" + }, + { + "appId": "Finsemble WPF Demo", + "name": "Finsemble WPF Demo", + "type": "native", + "details": { + "path": "$wpfExampleRoot/WPFExample.exe" + }, + "interop": { + "intents": { + "listensFor": { + "ViewChart": { + "displayName": "View Chart", + "contexts": [ "fdc3.instrument" ] + } + } + } + }, + "hostManifests": { + "Finsemble": { + "signatureKey": { + "e": "AQAB", + "ext": true, + "key_ops": [ "verify" ], + "kty": "RSA", + "n": "zPOxYfLiAd3rM7KOLDBIeLl0kjQ7fk43mTTc1Nm9BDaSNVWqvOshSMCHmqOrKZX_WwA67Y6CQxWI5rZ6WNzoLHQU3PyqOvAdB7RgXCHlSeVYZ2haTcbWRjAXQ89H1WfnW96VwAbZn5nccxQGYlZIl3AMcwNRqV4hmiKtJVq4-2OzA-zs9Yg4Pfs6TbKR1XbNKz6EAPHDev0-7Xdnb6x1-qr4uL2Bq0ZwgfnyKQIRLc3zhD5kwqiJ5N7uZAZomLRkMFMXwy1UftD6fQUlFT2yoISn403RwN7YHEL8KoA9X7Jgs-dtlBh8c38QzQ1vbdMBzPuyRb07GMMKb6bdjdBV1w" + }, + "window": { + "windowType": "native", + "minHeight": 300, + "minWidth": 300 + }, + "foreign": { + "components": { + "App Launcher": { + "launchableByUser": true + } + } + }, + "interop": { + "selectConnect": [ + { + "contextType": "fdc3.instrument", + "cc": "#Workspace" + } + ] + } + } + }, + "version": "1.0.0", + "publisher": "Cosaic" + }, + { + "appId": "WinformExample", + "name": "WinformExample", + "type": "native", + "details": { + "path": "$winformExampleRoot/WinformExample.exe" + }, + "hostManifests": { + "Finsemble": { + "signatureKey": { + "e": "AQAB", + "ext": true, + "key_ops": [ "verify" ], + "kty": "RSA", + "n": "zPOxYfLiAd3rM7KOLDBIeLl0kjQ7fk43mTTc1Nm9BDaSNVWqvOshSMCHmqOrKZX_WwA67Y6CQxWI5rZ6WNzoLHQU3PyqOvAdB7RgXCHlSeVYZ2haTcbWRjAXQ89H1WfnW96VwAbZn5nccxQGYlZIl3AMcwNRqV4hmiKtJVq4-2OzA-zs9Yg4Pfs6TbKR1XbNKz6EAPHDev0-7Xdnb6x1-qr4uL2Bq0ZwgfnyKQIRLc3zhD5kwqiJ5N7uZAZomLRkMFMXwy1UftD6fQUlFT2yoISn403RwN7YHEL8KoA9X7Jgs-dtlBh8c38QzQ1vbdMBzPuyRb07GMMKb6bdjdBV1w" + }, + "window": { + "windowType": "native", + "minHeight": 300, + "minWidth": 300 + }, + "foreign": { + "components": { + "App Launcher": { + "launchableByUser": true + } + } + }, + "interop": { + "selectConnect": [ + { + "contextType": "fdc3.instrument", + "cc": "#Workspace" + } + ] + } + } + }, + "version": "1.0.0", + "publisher": "Cosaic" + }, + { + "appId": "AuthenticationExample", + "name": "AuthenticationExample", + "type": "native", + "details": { + "path": "$dotNetAuthExampleRoot/AuthenticationExample.exe" + }, + "hostManifests": { + "Finsemble": { + "signatureKey": { + "e": "AQAB", + "ext": true, + "key_ops": [ "verify" ], + "kty": "RSA", + "n": "zPOxYfLiAd3rM7KOLDBIeLl0kjQ7fk43mTTc1Nm9BDaSNVWqvOshSMCHmqOrKZX_WwA67Y6CQxWI5rZ6WNzoLHQU3PyqOvAdB7RgXCHlSeVYZ2haTcbWRjAXQ89H1WfnW96VwAbZn5nccxQGYlZIl3AMcwNRqV4hmiKtJVq4-2OzA-zs9Yg4Pfs6TbKR1XbNKz6EAPHDev0-7Xdnb6x1-qr4uL2Bq0ZwgfnyKQIRLc3zhD5kwqiJ5N7uZAZomLRkMFMXwy1UftD6fQUlFT2yoISn403RwN7YHEL8KoA9X7Jgs-dtlBh8c38QzQ1vbdMBzPuyRb07GMMKb6bdjdBV1w" + }, + "window": { + "windowType": "native" + }, + "foreign": { + "components": { + "App Launcher": { + "launchableByUser": true + } + } + }, + "interop": { + "selectConnect": [ + { + "contextType": "fdc3.instrument", + "cc": "#Workspace" + } + ] + } + } + }, + "version": "1.0.0", + "publisher": "Cosaic" + }, + { + "appId": "WindowlessExample", + "name": "WindowlessExample", + "type": "native", + "details": { + "path": "$windowlessRoot/WindowlessExample.exe" + }, + "hostManifests": { + "Finsemble": { + "signatureKey": { + "e": "AQAB", + "ext": true, + "key_ops": [ "verify" ], + "kty": "RSA", + "n": "zPOxYfLiAd3rM7KOLDBIeLl0kjQ7fk43mTTc1Nm9BDaSNVWqvOshSMCHmqOrKZX_WwA67Y6CQxWI5rZ6WNzoLHQU3PyqOvAdB7RgXCHlSeVYZ2haTcbWRjAXQ89H1WfnW96VwAbZn5nccxQGYlZIl3AMcwNRqV4hmiKtJVq4-2OzA-zs9Yg4Pfs6TbKR1XbNKz6EAPHDev0-7Xdnb6x1-qr4uL2Bq0ZwgfnyKQIRLc3zhD5kwqiJ5N7uZAZomLRkMFMXwy1UftD6fQUlFT2yoISn403RwN7YHEL8KoA9X7Jgs-dtlBh8c38QzQ1vbdMBzPuyRb07GMMKb6bdjdBV1w" + }, + "window": { + "windowType": "native" + }, + "bootParams": { + "dependencies": [], + "stopOnFailure": true, + "autoStart": true, + "customFailureMessage": "WindowlessExample service failure" + }, + "appService": true, + "waitForInitialization": true + } + }, + "version": "1.0.0", + "publisher": "Cosaic" + }, + { + "appId": "WindowlessExampleCore", + "name": "WindowlessExampleCore", + "type": "native", + "details": { + "path": "$windowlessCoreRoot/WindowlessExample.Core.exe" + }, + "hostManifests": { + "Finsemble": { + "signatureKey": { + "e": "AQAB", + "ext": true, + "key_ops": [ "verify" ], + "kty": "RSA", + "n": "zPOxYfLiAd3rM7KOLDBIeLl0kjQ7fk43mTTc1Nm9BDaSNVWqvOshSMCHmqOrKZX_WwA67Y6CQxWI5rZ6WNzoLHQU3PyqOvAdB7RgXCHlSeVYZ2haTcbWRjAXQ89H1WfnW96VwAbZn5nccxQGYlZIl3AMcwNRqV4hmiKtJVq4-2OzA-zs9Yg4Pfs6TbKR1XbNKz6EAPHDev0-7Xdnb6x1-qr4uL2Bq0ZwgfnyKQIRLc3zhD5kwqiJ5N7uZAZomLRkMFMXwy1UftD6fQUlFT2yoISn403RwN7YHEL8KoA9X7Jgs-dtlBh8c38QzQ1vbdMBzPuyRb07GMMKb6bdjdBV1w" + }, + "window": { + "windowType": "native" + }, + "bootParams": { + "dependencies": [], + "stopOnFailure": true, + "autoStart": true, + "customFailureMessage": "WindowlessExampleCore service failure" + }, + "appService": true, + "waitForInitialization": true + } + }, + "version": "1.0.0", + "publisher": "Cosaic" + }, + { + "appId": "MultiWindow-Parent", + "name": "MultiWindow-Parent", + "type": "native", + "details": { + "path": "$multiWindowRoot/MultiWindowExample.exe" + }, + "hostManifests": { + "Finsemble": { + "window": { + "windowType": "native" + }, + "foreign": { + "components": { + "App Launcher": { + "launchableByUser": false, + "spawnOnStartup": true + } + } + } + } + }, + "version": "1.0.0", + "publisher": "Cosaic" + }, + { + "appId": "MultiWindow-Window1", + "name": "MultiWindow-Window1", + "type": "native", + "details": { + "path": "$multiWindowRoot/MultiWindowExample.exe" + }, + "hostManifests": { + "Finsemble": { + "window": { + "windowType": "native", + "arguments": "Window1" + }, + "foreign": { + "components": { + "App Launcher": { + "launchableByUser": true + } + } + } + } + }, + "version": "1.0.0", + "publisher": "Cosaic" + }, + { + "appId": "MultiWindow-Window2", + "name": "MultiWindow-Window2", + "type": "native", + "details": { + "path": "$multiWindowRoot/MultiWindowExample.exe" + }, + "hostManifests": { + "Finsemble": { + "window": { + "windowType": "native", + "arguments": "Window2" + }, + "foreign": { + "components": { + "App Launcher": { + "launchableByUser": true + } + } + } + } + }, + "version": "1.0.0", + "publisher": "Cosaic" + }, + { + "appId": "MultiWindow-Window3", + "name": "MultiWindow-Window3", + "type": "native", + "details": { + "path": "$multiWindowRoot/MultiWindowExample.exe" + }, + "hostManifests": { + "Finsemble": { + "window": { + "windowType": "native", + "arguments": "Window3" + }, + "foreign": { + "components": { + "App Launcher": { + "launchableByUser": true + } + } + } + } + }, + "version": "1.0.0", + "publisher": "Cosaic" + }, + { + "appId": "MultiWindow-Window4", + "name": "MultiWindow-Window4", + "type": "native", + "details": { + "path": "$multiWindowRoot/MultiWindowExample.exe" + }, + "hostManifests": { + "Finsemble": { + "window": { + "windowType": "native", + "arguments": "Window4" + }, + "foreign": { + "components": { + "App Launcher": { + "launchableByUser": true + } + } + } + } + }, + "version": "1.0.0", + "publisher": "Cosaic" + }, + { + "appId": "MultiWindow-Core-Parent", + "name": "MultiWindow-Core-Parent", + "type": "native", + "details": { + "path": "$multiWindowCoreRoot/WPFMultiWindowExampleCore.exe" + }, + "hostManifests": { + "Finsemble": { + "window": { + "windowType": "native" + }, + "foreign": { + "components": { + "App Launcher": { + "launchableByUser": false, + "spawnOnStartup": true + } + } + } + } + }, + "version": "1.0.0", + "publisher": "Cosaic" + }, + { + "appId": "MultiWindow-Core-Window1", + "name": "MultiWindow-Core-Window1", + "type": "native", + "details": { + "path": "$multiWindowCoreRoot/WPFMultiWindowExampleCore.exe" + }, + "hostManifests": { + "Finsemble": { + "window": { + "windowType": "native", + "arguments": "Window1" + }, + "foreign": { + "components": { + "App Launcher": { + "launchableByUser": true + } + } + } + } + }, + "version": "1.0.0", + "publisher": "Cosaic" + }, + { + "appId": "MultiWindow-Core-Window2", + "name": "MultiWindow-Core-Window2", + "type": "native", + "details": { + "path": "$multiWindowCoreRoot/WPFMultiWindowExampleCore.exe" + }, + "hostManifests": { + "Finsemble": { + "window": { + "windowType": "native", + "arguments": "Window2" + }, + "foreign": { + "components": { + "App Launcher": { + "launchableByUser": true + } + } + } + } + }, + "version": "1.0.0", + "publisher": "Cosaic" + }, + { + "appId": "MultiWindow-Core-Window3", + "name": "MultiWindow-Core-Window3", + "type": "native", + "details": { + "path": "$multiWindowCoreRoot/WPFMultiWindowExampleCore.exe" + }, + "hostManifests": { + "Finsemble": { + "window": { + "windowType": "native", + "arguments": "Window3" + }, + "foreign": { + "components": { + "App Launcher": { + "launchableByUser": true + } + } + } + } + }, + "version": "1.0.0", + "publisher": "Cosaic" + }, + { + "appId": "MultiWindow-Core-Window4", + "name": "MultiWindow-Core-Window4", + "type": "native", + "details": { + "path": "$multiWindowCoreRoot/WPFMultiWindowExampleCore.exe" + }, + "hostManifests": { + "Finsemble": { + "window": { + "windowType": "native", + "arguments": "Window4" + }, + "foreign": { + "components": { + "App Launcher": { + "launchableByUser": true + } + } + } + } + }, + "version": "1.0.0", + "publisher": "Cosaic" + }, + { + "appId": "Winform-MultiWindow-Form1", + "name": "Winform-MultiWindow-Form1", + "type": "native", + "details": { + "path": "$winformMultiwindowExampleRoot/WinformMultiWindowExample.exe" + }, + "hostManifests": { + "Finsemble": { + "window": { + "windowType": "native", + "arguments": "Form1" + }, + "foreign": { + "components": { + "App Launcher": { + "launchableByUser": true + } + } + } + } + }, + "version": "1.0.0", + "publisher": "Cosaic" + }, + { + "appId": "Winform-MultiWindow-Form2", + "name": "Winform-MultiWindow-Form2", + "type": "native", + "details": { + "path": "$winformMultiwindowExampleRoot/WinformMultiWindowExample.exe" + }, + "hostManifests": { + "Finsemble": { + "window": { + "windowType": "native", + "arguments": "Form2" + }, + "foreign": { + "components": { + "App Launcher": { + "launchableByUser": true + } + } + } + } + }, + "version": "1.0.0", + "publisher": "Cosaic" + }, + { + "appId": "Winform-MultiWindow-Form3", + "name": "Winform-MultiWindow-Form3", + "type": "native", + "details": { + "path": "$winformMultiwindowExampleRoot/WinformMultiWindowExample.exe" + }, + "hostManifests": { + "Finsemble": { + "window": { + "windowType": "native", + "arguments": "Form3" + }, + "foreign": { + "components": { + "App Launcher": { + "launchableByUser": true + } + } + } + } + }, + "version": "1.0.0", + "publisher": "Cosaic" + }, + { + "appId": "Winform-MultiWindow-Form4", + "name": "Winform-MultiWindow-Form4", + "type": "native", + "details": { + "path": "$winformMultiwindowExampleRoot/WinformMultiWindowExample.exe" + }, + "hostManifests": { + "Finsemble": { + "window": { + "windowType": "native", + "arguments": "Form4" + }, + "foreign": { + "components": { + "App Launcher": { + "launchableByUser": true + } + } + } + } + }, + "version": "1.0.0", + "publisher": "Cosaic" + }, + { + "appId": "Winform-MultiWindow-Core-Form1", + "name": "Winform-MultiWindow-Core-Form1", + "type": "native", + "details": { + "path": "$winformMultiwindowExampleCoreRoot/WinformMultiWindowExampleCore.exe" + }, + "hostManifests": { + "Finsemble": { + "window": { + "windowType": "native", + "arguments": "Form1" + }, + "foreign": { + "components": { + "App Launcher": { + "launchableByUser": true + } + } + } + } + }, + "version": "1.0.0", + "publisher": "Cosaic" + }, + { + "appId": "Winform-MultiWindow-Core-Form2", + "name": "Winform-MultiWindow-Core-Form2", + "type": "native", + "details": { + "path": "$winformMultiwindowExampleCoreRoot/WinformMultiWindowExampleCore.exe" + }, + "hostManifests": { + "Finsemble": { + "window": { + "windowType": "native", + "arguments": "Form2" + }, + "foreign": { + "components": { + "App Launcher": { + "launchableByUser": true + } + } + } + } + }, + "version": "1.0.0", + "publisher": "Cosaic" + }, + { + "appId": "Winform-MultiWindow-Core-Form3", + "name": "Winform-MultiWindow-Core-Form3", + "type": "native", + "details": { + "path": "$winformMultiwindowExampleCoreRoot/WinformMultiWindowExampleCore.exe" + }, + "hostManifests": { + "Finsemble": { + "window": { + "windowType": "native", + "arguments": "Form3" + }, + "foreign": { + "components": { + "App Launcher": { + "launchableByUser": true + } + } + } + } + }, + "version": "1.0.0", + "publisher": "Cosaic" + }, + { + "appId": "Winform-MultiWindow-Core-Form4", + "name": "Winform-MultiWindow-Core-Form4", + "type": "native", + "details": { + "path": "$winformMultiwindowExampleCoreRoot/WinformMultiWindowExampleCore.exe" + }, + "hostManifests": { + "Finsemble": { + "window": { + "windowType": "native", + "arguments": "Form4" + }, + "foreign": { + "components": { + "App Launcher": { + "launchableByUser": true + } + } + } + } + }, + "version": "1.0.0", + "publisher": "Cosaic" + } + ] +}