From 94b6fc752db6806abc929239ca524a0997dbc336 Mon Sep 17 00:00:00 2001 From: MichaHofft Date: Sun, 6 Nov 2022 10:12:32 +0100 Subject: [PATCH 01/23] Update sources * hotkeys independent from menu items? --- .../AdminShellCollections.cs | 25 ++ src/AasxIntegrationBase/AasxMenu.cs | 296 ++++++++++++++++++ .../AasxPluginInterface.cs | 1 - .../MainWindow.CommandBindings.cs | 178 ++++++++++- src/AasxPackageExplorer/MainWindow.xaml | 8 +- src/AasxPackageExplorer/MainWindow.xaml.cs | 64 ++-- src/AasxWpfControlLibrary/AasxMenuWpf.cs | 105 +++++++ 7 files changed, 650 insertions(+), 27 deletions(-) create mode 100644 src/AasxIntegrationBase/AasxMenu.cs create mode 100644 src/AasxWpfControlLibrary/AasxMenuWpf.cs diff --git a/src/AasxCsharpLibrary/AdminShellCollections.cs b/src/AasxCsharpLibrary/AdminShellCollections.cs index 3da038ead..4b43b2ec6 100644 --- a/src/AasxCsharpLibrary/AdminShellCollections.cs +++ b/src/AasxCsharpLibrary/AdminShellCollections.cs @@ -38,4 +38,29 @@ public IEnumerable> Keys } } } + + public class DoubleSidedDict + { + private Dictionary _forward = new Dictionary(); + private Dictionary _backward = new Dictionary(); + + public void AddPair(T1 item1, T2 item2) + { + _forward.Add(item1, item2); + _backward.Add(item2, item1); + } + + public bool Contains1(T1 key1) => _forward.ContainsKey(key1); + public bool Contains2(T2 key2) => _backward.ContainsKey(key2); + + public T2 Get2(T1 key1) => _forward[key1]; + public T1 Get1(T2 key2) => _backward[key2]; + + public T2 Get2OrDefault(T1 key1) + => (key1 != null && _forward.ContainsKey(key1)) ? _forward[key1] : default(T2); + public T1 Get1OrDefault(T2 key2) + => (key2 != null && _backward.ContainsKey(key2)) ? _backward[key2] : default(T1); + + public void Clear() { _forward.Clear(); _backward.Clear(); } + } } diff --git a/src/AasxIntegrationBase/AasxMenu.cs b/src/AasxIntegrationBase/AasxMenu.cs new file mode 100644 index 000000000..2f745bcb6 --- /dev/null +++ b/src/AasxIntegrationBase/AasxMenu.cs @@ -0,0 +1,296 @@ +/* +Copyright (c) 2018-2021 Festo AG & Co. KG +Author: Michael Hoffmeister + +This source code is licensed under the Apache License 2.0 (see LICENSE.txt). + +This source code may use other Open Source software components (see LICENSE.txt). +*/ + +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading.Tasks; + +namespace AasxIntegrationBase +{ + /// + /// AASX menu items might be available in multiple applications. + /// + public enum AasxMenuFilter + { + None = 0x00, + WPF = 0x01, Blazor = 0x02, Toolkit = 0x04, + WpfBlazor = 0x03, + All = 0x07 + } + + /// + /// AASX menu items might call this action when activated. + /// + /// Name of menu item in lower case + public delegate void AasxMenuActionDelegate(string nameLower); + + /// + /// AASX menu items might call this action when activated. + /// + /// Name of menu item in lower case + public delegate Task AasxMenuActionAsyncDelegate(string nameLower); + + /// + /// Base class for menuitems. + /// + public abstract class AasxMenuItemBase + { + /// + /// Name of the menu item. Relevant. Will be used to differentiate + /// in actions. + /// + public string Name = ""; + + /// + /// The action to be activated. + /// + public AasxMenuActionDelegate Action = null; + + /// + /// The action to be activated. + /// + public AasxMenuActionAsyncDelegate ActionAsync = null; + } + + /// + /// By this information, menu items for AASX Package Explorer, Blazor and Toolkit + /// shall be described. Goal is to build up menu systems dynamically. + /// Shall be also usable for plugins. + /// + public class AasxMenuItem : AasxMenuItemBase + { + /// + /// For which application is this menu item applicable. + /// + public AasxMenuFilter Filter = AasxMenuFilter.All; + + /// + /// Displayed header in GUI based applications. + /// + public string Header = ""; + + /// + /// Icon to be place aside the header in GUI based applications. + /// Might contain unicode symbil, text or bitmap. + /// + public object Icon = null; + + /// + /// Can be switched to checked or not + /// + public bool IsCheckable = false; + + /// + /// Switch state to initailize with. + /// + public bool IsChecked = false; + + /// + /// Keyboard shortcut in GUI based applications. + /// + public string InputGesture = null; + + /// + /// Command name in command line based applications. Typically lower case with + /// dashes in between. No dask at front. + /// + public string CmdLine = null; + + /// + /// Help text or description in command line applications. + /// + public string HelpText = null; + + /// + /// Sub menues + /// + public AasxMenu Childs = null; + + // + // Constructors + // + + public AasxMenuItem() + { + } + + // + // more + // + + public void Add(AasxMenuItemBase item) + { + Childs.Add(item); + } + } + + + /// + /// Represents a single hotkey which could activate an action + /// + public class AasxHotkey : AasxMenuItemBase + { + /// + /// Contains the gesture in form of "Ctrl+Shift+F" stuff. + /// see: https://learn.microsoft.com/en-us/dotnet/api/system.windows.input.keygesture + /// + public string Gesture; + } + + /// + /// Holds a list of menu items, e.g. representing the main menu. + /// + public class AasxMenu : List + { + // + // Members + // + + /// + /// The action to be activated, if no action is set by single items. + /// + public AasxMenuActionDelegate DefaultAction = null; + + /// + /// The action to be activated, if no action is set by single items. + /// + public AasxMenuActionAsyncDelegate DefaultActionAsync = null; + + + // + // Creators (here, because class name is shorter) + // + + public AasxMenu AddWpf( + string name, string header, + AasxMenuActionDelegate action = null, + AasxMenuActionAsyncDelegate actionAsync = null, + AasxMenuFilter filter = AasxMenuFilter.WPF, + string inputGesture = null, + bool isCheckable = false, bool isChecked = false) + { + this.Add(new AasxMenuItem() + { + Name = name, + Header = header, + Action = action, + ActionAsync = actionAsync, + Filter = filter, + InputGesture = inputGesture, + IsCheckable = isCheckable, + IsChecked = isChecked + }); + return this; + } + + public AasxMenu AddWpfBlazor( + string name, string header, + AasxMenuActionDelegate action = null, + AasxMenuActionAsyncDelegate actionAsync = null, + AasxMenuFilter filter = AasxMenuFilter.WpfBlazor, + string inputGesture = null, + bool isCheckable = false, bool isChecked = false) + { + this.Add(new AasxMenuItem() + { + Name = name, + Header = header, + Action = action, + ActionAsync = actionAsync, + Filter = filter, + InputGesture = inputGesture, + IsCheckable = isCheckable, + IsChecked = isChecked + }); + return this; + } + + public AasxMenu AddAll( + string name, string header, + string cmd, string help, + AasxMenuActionDelegate action = null, + AasxMenuActionAsyncDelegate actionAsync = null, + AasxMenuFilter filter = AasxMenuFilter.All, + string inputGesture = null) + { + this.Add(new AasxMenuItem() + { + Name = name, + Header = header, + CmdLine = cmd, + HelpText = header, + Action = action, + ActionAsync = actionAsync, + Filter = filter, + InputGesture = inputGesture + }); + return this; + } + + public AasxMenu AddSeparator() + { + this.Add(new AasxMenuSeparator()); + return this; + } + + public AasxMenu AddMenu( + string header, + AasxMenuFilter filter = AasxMenuFilter.WpfBlazor, + AasxMenu childs = null) + { + this.Add(new AasxMenuItem() + { + Header = header, + Filter = filter, + Childs = childs + }); + return this; + } + + public AasxMenu AddHotkey( + string name, + string gesture) + { + this.Add(new AasxHotkey() + { + Name = name, + Gesture = gesture + }); + return this; + } + + // + // Operate + // + + public void ActivateAction(AasxMenuItem mii) + { + var name = mii?.Name?.Trim()?.ToLower(); + + if (mii?.ActionAsync != null) + mii.ActionAsync(name); + else if (mii?.Action != null) + mii.Action(name); + else if (this.DefaultActionAsync != null) + this.DefaultActionAsync(name); + else if (this.DefaultAction != null) + this.DefaultAction(name); + } + + } + + /// + /// To be used for separators + /// + public class AasxMenuSeparator : AasxMenuItemBase + { + } + +} diff --git a/src/AasxIntegrationBase/AasxPluginInterface.cs b/src/AasxIntegrationBase/AasxPluginInterface.cs index cd632eee1..4a6e22aaf 100644 --- a/src/AasxIntegrationBase/AasxPluginInterface.cs +++ b/src/AasxIntegrationBase/AasxPluginInterface.cs @@ -17,7 +17,6 @@ This source code may use other Open Source software components (see LICENSE.txt) // ReSharper disable ClassNeverInstantiated.Global - namespace AasxIntegrationBase { public class AasxPluginActionDescriptionBase diff --git a/src/AasxPackageExplorer/MainWindow.CommandBindings.cs b/src/AasxPackageExplorer/MainWindow.CommandBindings.cs index 4bcb7ca07..07a2195f3 100644 --- a/src/AasxPackageExplorer/MainWindow.CommandBindings.cs +++ b/src/AasxPackageExplorer/MainWindow.CommandBindings.cs @@ -41,6 +41,7 @@ This source code may use other Open Source software components (see LICENSE.txt) using Newtonsoft.Json.Serialization; using Org.BouncyCastle.Crypto; using Org.Webpki.JsonCanonicalizer; +using static AasxToolkit.Cli; namespace AasxPackageExplorer { @@ -52,6 +53,170 @@ public partial class MainWindow : Window, IFlyoutProvider { private string lastFnForInitialDirectory = null; + //// Note for UltraEdit: + //// + //// .AddWpf\(name: "\4", header: "\1", inputGesture: "\3"\) + //// or + //// + //// .AddWpf\(name: "\5", header: "\1", inputGesture: "\3", \4\) + + /// + /// Dynamic construction of the main menu + /// + public AasxMenu CreateMainMenu() + { + // + // Start + // + + var menu = new AasxMenu(); + + // + // File + // + + menu.AddMenu(header: "File", + childs: (new AasxMenu()) + .AddWpf(name: "New", header: "_New ..") + .AddWpf(name: "Open", header: "_Open ..", inputGesture: "Ctrl+O") + .AddWpf(name: "ConnectIntegrated", header: "Connect ..", inputGesture: "Ctrl+Shift+O") + .AddWpf(name: "Save", header: "_Save", inputGesture: "Ctrl+S") + .AddWpf(name: "SaveAs", header: "_Save as ..") + .AddWpf(name: "Close", header: "_Close ..") + .AddWpf(name: "CheckAndFix", header: "Check, validate and fix ..") + .AddMenu(header: "Security ..", childs: (new AasxMenu()) + .AddWpf(name: "Sign", header: "_Sign ..") + .AddWpf(name: "ValidateCertificate", header: "_Validate ..") + .AddWpf(name: "Encrypt", header: "_Encrypt ..") + .AddWpf(name: "Decrypt", header: "_Decrypt ..")) + .AddSeparator() + .AddWpf(name: "OpenAux", header: "Open Au_xiliary AAS ..", inputGesture: "Ctrl+X") + .AddWpf(name: "CloseAux", header: "Close Auxiliary AAS") + .AddSeparator() + .AddMenu(header: "Further connect options ..", childs: (new AasxMenu()) + .AddWpf(name: "ConnectSecure", header: "Secure Connect ..", inputGesture: "Ctrl+Shift+O") + .AddWpf(name: "ConnectOpcUa", header: "Connect via OPC-UA ..") + .AddWpf(name: "ConnectRest", header: "Connect via REST ..", inputGesture: "F6")) + .AddSeparator() + .AddMenu(header: "AASX File Repository ..", childs: (new AasxMenu()) + .AddWpf(name: "FileRepoNew", header: "New (local) repository..") + .AddWpf(name: "FileRepoOpen", header: "Open (local) repository ..") + .AddWpf(name: "FileRepoConnectRepository", header: "Connect HTTP/REST repository ..") + .AddWpf(name: "FileRepoConnectRegistry", header: "Query HTTP/REST registry ..") + .AddSeparator() + .AddWpf(name: "FileRepoCreateLRU", header: "Create last recently used list ..") + .AddSeparator() + .AddWpf(name: "FileRepoQuery", header: "Query open repositories ..", inputGesture: "F12")) + .AddSeparator() + .AddMenu(header: "Import ..", childs: (new AasxMenu()) + .AddWpf(name: "ImportAML", header: "Import AutomationML into AASX ..") + .AddWpf(name: "SubmodelRead", header: "Import Submodel from JSON ..") + .AddWpf(name: "SubmodelGet", header: "GET Submodel from URL ..") + .AddWpf(name: "ImportSubmodel", header: "Import Submodel from Dictionary ..") + .AddWpf(name: "ImportSubmodelElements", header: "Import Submodel Elements from Dictionary ..") + .AddWpf(name: "BMEcatImport", header: "Import BMEcat-file into SubModel ..") + .AddWpf(name: "TDImport", header: "Import Thing Description JSON LD document into SubModel ..") + .AddWpf(name: "CSVImport", header: "Import CSV-file into SubModel ..") + .AddWpf(name: "OPCUAi4aasImport", header: "Import AAS from i4aas-nodeset ..") + .AddWpf(name: "OpcUaImportNodeSet", header: "Import OPC UA nodeset.xml as Submodel ..") + .AddWpf(name: "OPCRead", header: "Read OPC values into SubModel ..") + .AddWpf(name: "RDFRead", header: "Import BAMM RDF into AASX ..") + .AddWpf(name: "ImportTimeSeries", header: "Read time series values into SubModel ..") + .AddWpf(name: "ImportTable", header: "Import SubmodelElements from Table ..")) + .AddMenu(header: "Export ..", childs: (new AasxMenu()) + .AddWpf(name: "ExportAML", header: "Export AutomationML ..") + .AddWpf(name: "SubmodelWrite", header: "Export Submodel to JSON ..") + .AddWpf(name: "SubmodelPut", header: "PUT Submodel to URL ..") + .AddWpf(name: "OPCUAi4aasExport", header: "Export AAS as i4aas-nodeset ..") + .AddWpf(name: "OpcUaExportNodeSetUaPlugin", header: "Export OPC UA Nodeset2.xml (via UA server plug-in) ..") + .AddWpf(name: "CopyClipboardElementJson", header: "Copy selected element JSON to clipboard", inputGesture: "Shift+Ctrl+C") + .AddWpf(name: "ExportGenericForms", header: "Export Submodel as options for GenericForms ..") + .AddWpf(name: "ExportPredefineConcepts", header: "Export Submodel as snippet for PredefinedConcepts ..") + .AddWpf(name: "SubmodelTDExport", header: "Export Submodel as Thing Description JSON LD document") + .AddWpf(name: "PrintAsset", header: "Print Asset as code sheet ..") + .AddWpf(name: "ExportSMD", header: "Export TeDZ Simulation Model Description (SMD) ..") + .AddWpf(name: "ExportTable", header: "Export SubmodelElements as Table ..") + .AddWpf(name: "ExportUml", header: "Export SubmodelElements as UML ..")) + .AddSeparator() + .AddMenu(header: "Server ..", childs: (new AasxMenu()) + .AddWpf(name: "ServerRest", header: "Serve AAS as REST ..", inputGesture: "Shift+F6") + .AddWpf(name: "MQTTPub", header: "Publish AAS via MQTT ..") + .AddSeparator() + .AddWpf(name: "ServerPluginEmptySample", header: "Plugin: Empty Sample ..") + .AddWpf(name: "ServerPluginOPCUA", header: "Plugin: OPC UA ..") + .AddWpf(name: "ServerPluginMQTT", header: "Plugin: MQTT ..")) + .AddSeparator() + .AddWpf(name: "Exit", header: "_Exit", inputGesture: "Alt+F4")); + + // + // Workspace + // + + menu.AddMenu(header: "Workspace", + childs: (new AasxMenu()) + .AddWpf(name: "EditMenu", header: "_Edit", inputGesture: "Ctrl+E", isCheckable: true) + .AddWpf(name: "HintsMenu", header: "_Hints", inputGesture: "Ctrl+H", isCheckable: true, isChecked: true) + .AddWpf(name: "Test", header: "Test") + .AddSeparator() + .AddWpf(name: "ToolsFindText", header: "Find ...") + .AddSeparator() + .AddMenu(header: "Plugins ..", childs: (new AasxMenu()) + .AddWpf(name: "NewSubmodelFromPlugin", header: "New Submodel", inputGesture: "Ctrl+Shift+M")) + .AddSeparator() + .AddWpf(name: "ConvertElement", header: "Convert ..") + .AddSeparator() + .AddMenu(header: "Buffer ..", childs: (new AasxMenu()) + .AddWpf(name: "BufferClear", header: "Clear internal paste buffer")) + .AddSeparator() + .AddMenu(header: "Events ..", childs: (new AasxMenu()) + .AddWpf(name: "EventsShowLogMenu", header: "_Event log", inputGesture: "Ctrl+L", isCheckable: true) + .AddWpf(name: "EventsResetLocks", header: "Reset interlocking"))); + + // + // Options + // + + menu.AddMenu(header: "Option", + childs: (new AasxMenu()) + .AddWpf(name: "ShowIriMenu", header: "Show id as IRI", inputGesture: "Ctrl+I", isCheckable: true) + .AddWpf(name: "VerboseConnect", header: "Verbose connect", isCheckable: true) + .AddWpf(name: "FileRepoLoadWoPrompt", header: "Load without prompt", isCheckable: true) + .AddWpf(name: "AnimateElements", header: "Animate elements", isCheckable: true) + .AddWpf(name: "ObserveEvents", header: "ObserveEvents", isCheckable: true) + .AddWpf(name: "CompressEvents", header: "Compress events", isCheckable: true)); + + // + // Help + // + + menu.AddMenu(header: "Help", + childs: (new AasxMenu()) + .AddWpf(name: "About", header: "About ..") + .AddWpf(name: "HelpGithub", header: "Help on Github ..") + .AddWpf(name: "FaqGithub", header: "FAQ on Github ..") + .AddWpf(name: "HelpIssues", header: "Issues on Github ..") + .AddWpf(name: "HelpOptionsInfo", header: "Available options ..")); + + // + // Hotkeys + // + + menu.AddHotkey(name: "", gesture: "") + .AddHotkey(name: "", gesture: ""); + + // + // End + // + + menu.DefaultActionAsync = CommandBinding_GeneralDispatch; + + return menu; + } + + // + // Rest + // + public void RememberForInitialDirectory(string fn) { this.lastFnForInitialDirectory = fn; @@ -214,7 +379,7 @@ private static string makeJsonLD(string json, int count) return jsonld; } - private async void CommandBinding_GeneralDispatch(string cmd) + private async Task CommandBinding_GeneralDispatch(string cmd) { if (cmd == null) { @@ -1204,13 +1369,13 @@ private async void CommandBinding_GeneralDispatch(string cmd) } if (cmd == "editkey") - MenuItemWorkspaceEdit.IsChecked = !MenuItemWorkspaceEdit.IsChecked; + _mainMenu?.SetChecked("EditMenu", !(_mainMenu?.IsChecked("EditMenu") == true)); if (cmd == "hintskey") - MenuItemWorkspaceHints.IsChecked = !MenuItemWorkspaceHints.IsChecked; + _mainMenu?.SetChecked("HintsMenu", !(_mainMenu?.IsChecked("HintsMenu") == true)); if (cmd == "showirikey") - MenuItemOptionsShowIri.IsChecked = !MenuItemOptionsShowIri.IsChecked; + _mainMenu?.SetChecked("ShowIriMenu", !(_mainMenu?.IsChecked("ShowIriMenu") == true)); if (cmd == "editmenu" || cmd == "editkey" || cmd == "hintsmenu" || cmd == "hintskey" @@ -1376,7 +1541,7 @@ private async void CommandBinding_GeneralDispatch(string cmd) } if (cmd == "eventsshowlogkey") - MenuItemWorkspaceEventsShowLog.IsChecked = !MenuItemWorkspaceEventsShowLog.IsChecked; + _mainMenu?.SetChecked("EventsShowLogMenu", !(_mainMenu?.IsChecked("ShowIriMenu") == true)); if (cmd == "eventsshowlogkey" || cmd == "eventsshowlogmenu") { @@ -1440,9 +1605,10 @@ public void CommandBinding_TDImport() if (Options.Curr.UseFlyovers) this.CloseFlyover(); } + public bool PanelConcurrentCheckIsVisible() { - return MenuItemWorkspaceEventsShowLog.IsChecked; + return _mainMenu?.IsChecked("WorkspaceEventsShowLog") == true; } public void PanelConcurrentSetVisibleIfRequired( diff --git a/src/AasxPackageExplorer/MainWindow.xaml b/src/AasxPackageExplorer/MainWindow.xaml index 773a731eb..f41595b39 100644 --- a/src/AasxPackageExplorer/MainWindow.xaml +++ b/src/AasxPackageExplorer/MainWindow.xaml @@ -326,7 +326,10 @@ - + + + + will will cause the browser to show the AAS as selected element // and -> this will update the left side of the screen correctly! - MenuItemWorkspaceEdit.IsChecked = false; + _mainMenu?.SetChecked("EditMenu", false); ClearAllViews(); RedrawAllAasxElements(); RedrawElementView(); @@ -244,7 +246,7 @@ private PackCntRuntimeOptions UiBuildRuntimeOptionsForMainAppLoad() ShowMesssageBox = (content, text, title, buttons) => { // not verbose - if (MenuItemOptionsVerboseConnect.IsChecked == false) + if (_mainMenu?.IsChecked("VerboseConnect") == false) { // give specific default answers if (title?.ToLower().Trim() == "Select certificate chain".ToLower()) @@ -662,9 +664,9 @@ public void RedrawElementView(DispEditHighlight.HighlightFieldInfo hightlightFie PrepareDispEditEntity( _packageCentral.Main, DisplayElements.SelectedItems, - MenuItemWorkspaceEdit.IsChecked, - MenuItemWorkspaceHints.IsChecked, - MenuItemOptionsShowIri.IsChecked, + _mainMenu?.IsChecked("EditMenu") == true, + _mainMenu?.IsChecked("HintsMenu") == true, + _mainMenu?.IsChecked("ShowIriMenu") == true, hightlightField: hightlightField); } @@ -679,6 +681,30 @@ private async void Window_Loaded(object sender, RoutedEventArgs e) this.AasId.Text = ""; this.AssetId.Text = ""; + // main menu + _mainMenu = new AasxMenuWpf(); + _mainMenu.LoadAndRender(CreateMainMenu(), MenuMain); + + + var cmd = new RoutedUICommand("Test", "NameOfTest", typeof(string)); + + this.CommandBindings.Add(new CommandBinding(cmd, (s3, e3) => { + // decode + var ruic = e3?.Command as RoutedUICommand; + if (ruic == null) + return; + var cmdname = ruic.Text?.Trim().ToLower(); + })); + + var kb = new KeyBinding() + { + //Key = Key.K, + //Modifiers = ModifierKeys.Control, + Gesture = (new KeyGestureConverter()).ConvertFromInvariantString("Ctrl+K") as KeyGesture, + Command = cmd + }; + this.InputBindings.Add(kb); + // display elements has a cache DisplayElements.ActivateElementStateCache(); @@ -766,7 +792,7 @@ private async void Window_Loaded(object sender, RoutedEventArgs e) return; // safety? - if (!MenuItemOptionsLoadWoPrompt.IsChecked) + if (_mainMenu?.IsChecked("FileRepoLoadWoPrompt") == false) { // ask double question if (AnyUiMessageBoxResult.OK != MessageBoxFlyoutShow( @@ -884,12 +910,12 @@ private async void Window_Loaded(object sender, RoutedEventArgs e) #endif // initialize menu - MenuItemOptionsLoadWoPrompt.IsChecked = Options.Curr.LoadWithoutPrompt; - MenuItemOptionsShowIri.IsChecked = Options.Curr.ShowIdAsIri; - MenuItemOptionsVerboseConnect.IsChecked = Options.Curr.VerboseConnect; - MenuItemOptionsAnimateElems.IsChecked = Options.Curr.AnimateElements; - MenuItemOptionsObserveEvents.IsChecked = Options.Curr.ObserveEvents; - MenuItemOptionsCompressEvents.IsChecked = Options.Curr.CompressEvents; + _mainMenu?.SetChecked("FileRepoLoadWoPrompt", Options.Curr.LoadWithoutPrompt); + _mainMenu?.SetChecked("ShowIriMenu", Options.Curr.ShowIdAsIri); + _mainMenu?.SetChecked("VerboseConnect", Options.Curr.VerboseConnect); + _mainMenu?.SetChecked("AnimateElements", Options.Curr.AnimateElements); + _mainMenu?.SetChecked("ObserveEvents", Options.Curr.ObserveEvents); + _mainMenu?.SetChecked("CompressEvents", Options.Curr.CompressEvents); // the UI application might receive events from items in the package central _packageCentral.ChangeEventHandler = (data) => @@ -954,7 +980,7 @@ private void ToolFindReplace_ResultSelected(AdminShellUtil.SearchResultItem resu return; // for valid display, app needs to be in edit mode - if (!MenuItemWorkspaceEdit.IsChecked) + if (_mainMenu.IsChecked("EditMenu") != true) { this.MessageBoxFlyoutShow( "The application needs to be in edit mode to show found entities correctly. Aborting.", @@ -1251,7 +1277,7 @@ private async Task MainTimer_HandleEntityPanel() else { // make sure the user wants to change - if (!MenuItemOptionsLoadWoPrompt.IsChecked) + if (_mainMenu?.IsChecked("FileRepoLoadWoPrompt") != false) { // ask double question if (AnyUiMessageBoxResult.OK != MessageBoxFlyoutShow( @@ -1626,7 +1652,7 @@ private void MainTimer_CheckAnimationElements( IndexOfSignificantAasElements significantElems) { // trivial - if (env == null || significantElems == null || !MenuItemOptionsAnimateElems.IsChecked) + if (env == null || significantElems == null || !(_mainMenu?.IsChecked("AnimateElements") == true)) return; // find elements? @@ -1670,7 +1696,7 @@ private void MainTimer_CheckDiaryDateToEmitEvents( bool directEmit) { // trivial - if (env == null || significantElems == null || !MenuItemOptionsObserveEvents.IsChecked) + if (env == null || significantElems == null || !(_mainMenu?.IsChecked("ObserveEvents") == true)) return; // do this twice @@ -2039,7 +2065,7 @@ private async Task MainTimer_Tick(object sender, EventArgs e) _mainTimer_LastCheckForDiaryEvents, _packageCentral.MainItem.Container.Env?.AasEnv, _packageCentral.MainItem.Container.SignificantElements, - directEmit: !MenuItemOptionsCompressEvents.IsChecked); + directEmit: !(_mainMenu?.IsChecked("CompressEvents") == true)); _mainTimer_LastCheckForDiaryEvents = DateTime.UtcNow; // do animation? @@ -2436,7 +2462,7 @@ private void ContentUndo_Click(object sender, RoutedEventArgs e) private void CheckIfToFlushEvents() { - if (MenuItemOptionsCompressEvents.IsChecked) + if (_mainMenu?.IsChecked("CompressEvents") == true) { var evs = _eventCompressor?.Flush(); if (evs != null) diff --git a/src/AasxWpfControlLibrary/AasxMenuWpf.cs b/src/AasxWpfControlLibrary/AasxMenuWpf.cs new file mode 100644 index 000000000..ddc239c42 --- /dev/null +++ b/src/AasxWpfControlLibrary/AasxMenuWpf.cs @@ -0,0 +1,105 @@ +/* +Copyright (c) 2018-2021 Festo AG & Co. KG +Author: Michael Hoffmeister + +This source code is licensed under the Apache License 2.0 (see LICENSE.txt). + +This source code may use other Open Source software components (see LICENSE.txt). +*/ + +using AasxIntegrationBase; +using AdminShellNS; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AasxWpfControlLibrary +{ + /// + /// This class "converts" the AasxMenu struncture into WPF menues + /// + public class AasxMenuWpf + { + // + // Private + // + protected DoubleSidedDict _menuItems + = new DoubleSidedDict(); + + protected DoubleSidedDict _wpfItems + = new DoubleSidedDict(); + + public AasxMenu Menu { get => _menu; } + private AasxMenu _menu = new AasxMenu(); + + private void RenderItemCollection(AasxMenu topMenu, AasxMenu menuItems, System.Windows.Controls.ItemCollection wpfItems) + { + foreach (var mi in menuItems) + { + if (mi == null) + continue; + + if (mi is AasxMenuSeparator mis) + { + // add separator + wpfItems.Add(new System.Windows.Controls.Separator()); + } + else if (mi is AasxMenuItem mii) + { + // remember for lambdas + var m_mii = mii; + + // add menu item + var wpf = new System.Windows.Controls.MenuItem() + { + Header = mii.Header, + InputGestureText = mii.InputGesture, + IsCheckable = mii.IsCheckable, + IsChecked = mii.IsChecked + }; + wpf.Click += (s, e) => + { + e.Handled = true; + topMenu?.ActivateAction(m_mii); + }; + wpfItems.Add(wpf); + + // remember in dictionaries + if (m_mii.Name?.HasContent() == true) + _menuItems.AddPair(m_mii.Name?.Trim().ToLower(), m_mii); + _wpfItems.AddPair(m_mii, wpf); + + // recurse + if (mii.Childs != null) + RenderItemCollection(topMenu, mii.Childs, wpf.Items); + } + } + } + + public void LoadAndRender(AasxMenu menuInfo, System.Windows.Controls.Menu wpfMenu) + { + _menu = menuInfo; + _menuItems.Clear(); + _wpfItems.Clear(); + wpfMenu.Items.Clear(); + RenderItemCollection(menuInfo, menuInfo, wpfMenu.Items); + } + + public bool IsChecked(string name) + { + var wpf = _wpfItems.Get2OrDefault(_menuItems.Get2OrDefault(name?.Trim().ToLower())); + if (wpf !=null) + return wpf.IsChecked; + return false; + } + + public void SetChecked(string name, bool state) + { + var wpf = _wpfItems.Get2OrDefault(_menuItems.Get2OrDefault(name?.Trim().ToLower())); + if (wpf != null) + wpf.IsChecked = state; + } + } +} From 85c6974ef4c0f62592558b478b6210bc6fe9a8aa Mon Sep 17 00:00:00 2001 From: MichaHofft Date: Mon, 7 Nov 2022 22:23:43 +0100 Subject: [PATCH 02/23] Update sources * work on script editor * include SSharp.NET * update APL2.0 license text --- LICENSE.txt | 209 +++ LICENSE.txt.bak | 1266 +++++++++++++++++ src/AASXPackageExplorerSetup/LICENSE.txt | 209 +++ src/AasxAmlImExport/LICENSE.txt | 209 +++ src/AasxBammRdfImExport/LICENSE.txt | 436 +++++- src/AasxCsharpLibrary.Tests/LICENSE.txt | 209 +++ src/AasxCsharpLibrary/LICENSE.txt | 209 +++ src/AasxDictionaryImport.Tests/LICENSE.txt | 209 +++ src/AasxDictionaryImport/LICENSE.txt | 209 +++ src/AasxFileServerRestLibrary/LICENSE.txt | 417 ++++++ src/AasxFormatCst/LICENSE.txt | 209 +++ src/AasxIntegrationBase/AasxMenu.cs | 67 +- src/AasxIntegrationBase/LICENSE.txt | 209 +++ src/AasxIntegrationBaseGdi/LICENSE.txt | 209 +++ src/AasxIntegrationBaseWpf/LICENSE.txt | 209 +++ src/AasxIntegrationEmptySample/LICENSE.txt | 209 +++ src/AasxMqtt/LICENSE.txt | 209 +++ src/AasxMqttClient/LICENSE.txt | 209 +++ src/AasxOpenidClient/LICENSE.txt | 209 +++ src/AasxPackageExplorer.GuiTests/LICENSE.txt | 209 +++ src/AasxPackageExplorer.Tests/LICENSE.txt | 209 +++ .../AasxPackageExplorer.csproj | 1 + src/AasxPackageExplorer/AasxScript.cs | 109 ++ src/AasxPackageExplorer/LICENSE.txt | 209 +++ .../MainWindow.CommandBindings.cs | 82 +- src/AasxPackageExplorer/MainWindow.xaml | 6 + src/AasxPackageExplorer/MainWindow.xaml.cs | 39 +- .../options-debug.MIHO.json | 477 ++++--- src/AasxPackageLogic/LICENSE.txt | 209 +++ src/AasxPackageLogic/Options.cs | 7 + src/AasxPluginAdvancedTextEditor/LICENSE.TXT | 209 +++ .../UserControlAdvancedTextEditor.xaml | 18 +- .../UserControlAdvancedTextEditor.xaml.cs | 30 + src/AasxPluginImageMap/LICENSE.TXT | 209 +++ src/AasxPluginKnownSubmodels/LICENSE.TXT | 209 +++ src/AasxPluginPlotting/LICENSE.TXT | 209 +++ src/AasxPluginSmdExporter/LICENSE.txt | 209 +++ src/AasxPredefinedConcepts/LICENSE.txt | 209 +++ src/AasxRestConsoleServer/LICENSE.txt | 209 +++ src/AasxRestServerLibrary/LICENSE.txt | 209 +++ src/AasxSignature/LICENSE.txt | 209 +++ src/AasxToolkit.Tests/LICENSE.txt | 209 +++ src/AasxToolkit/LICENSE.txt | 209 +++ src/AasxUANodesetImExport/LICENSE.txt | 209 +++ src/AasxUaNetConsoleServer/LICENSE.txt | 209 +++ src/AasxUaNetServer/LICENSE.txt | 209 +++ src/AasxWpfControlLibrary/AasxMenuWpf.cs | 83 +- .../Flyouts/TextEditorFlyout.xaml | 15 +- .../Flyouts/TextEditorFlyout.xaml.cs | 18 + src/AasxWpfControlLibrary/LICENSE.txt | 209 +++ src/AnyUi/AnyUiDialogueDataBase.cs | 7 + src/AnyUi/LICENSE.txt | 209 +++ src/BlazorUI/LICENSE.txt | 209 +++ src/CheckHeadersScript/LICENSE.txt | 209 +++ src/CheckScript/LICENSE.txt | 209 +++ src/LICENSE.txt | 209 +++ src/LICENSE.txt.bak | 1266 +++++++++++++++++ src/MsaglWpfControl/LICENSE.txt | 209 +++ src/RestClient/LICENSE.txt | 417 ++++++ src/SSIExtension/LICENSE.txt | 209 +++ src/UIComponents.Flags.Blazor/LICENSE.txt | 209 +++ src/WpfMtpControl/LICENSE.txt | 209 +++ src/WpfMtpVisuViewer/LICENSE.txt | 209 +++ src/WpfXamlTool/LICENSE.txt | 209 +++ src/es6numberserializer/LICENSE.txt | 417 ++++++ src/jsoncanonicalizer/LICENSE.txt | 417 ++++++ 66 files changed, 14687 insertions(+), 313 deletions(-) create mode 100644 LICENSE.txt.bak create mode 100644 src/AasxPackageExplorer/AasxScript.cs create mode 100644 src/LICENSE.txt.bak diff --git a/LICENSE.txt b/LICENSE.txt index cd3ff93ed..94281805d 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -94,6 +94,9 @@ Glob (https://www.nuget.org/packages/Glob/) is licensed under the MIT license The Magick.NET library is licensed under Apache License 2.0 (Apache-2.0, see below). +The SSharp.NET library (https://github.com/PetroProtsyk/SSharp) is licensed +under Apache License 2.0 (Apache-2.0, see below). + ------------------------------------------------------------------------------- @@ -1253,6 +1256,212 @@ With respect to Magick.NET Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +With respect to SSharp.NET library +================================== + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/LICENSE.txt.bak b/LICENSE.txt.bak new file mode 100644 index 000000000..cd3ff93ed --- /dev/null +++ b/LICENSE.txt.bak @@ -0,0 +1,1266 @@ +Copyright (c) 2018-2021 Festo AG & Co. KG +, +author: Michael Hoffmeister + +Copyright (c) 2019-2021 PHOENIX CONTACT GmbH & Co. KG +, +author: Andreas Orzelski + +Copyright (c) 2019-2020 Fraunhofer IOSB-INA Lemgo, + eine rechtlich nicht selbstaendige Einrichtung der Fraunhofer-Gesellschaft + zur Foerderung der angewandten Forschung e.V. + +Copyright (c) 2020 Schneider Electric Automation GmbH +, +author: Marco Mendes + +Copyright (c) 2020 SICK AG + +Copyright (c) 2021 KEB Automation KG + +Copyright (c) 2021 Lenze SE +author: Jonas Grote, Denis Göllner, Sebastian Bischof + +The AASX Package Explorer is licensed under the Apache License 2.0 +(Apache-2.0, see below). + +The AASX Package Explorer is a sample application for demonstration of the +features of the Asset Administration Shell. +The implementation uses the concepts of the document "Details of the Asset +Administration Shell" published on www.plattform-i40.de which is licensed +under Creative Commons CC BY-ND 3.0 DE. + +When using eCl@ss or IEC CDD data, please check the corresponding license +conditions. + +------------------------------------------------------------------------------- + +The components below are used in AASX Package Explorer. +The related licenses are listed for information purposes only. +Some licenses may only apply to their related plugins. + +The browser functionality is licensed under the cefSharp license (see below). + +The Newtonsoft.JSON serialization is licensed under the MIT License +(MIT, see below). + +The QR code generation is licensed under the MIT license (MIT, see below). + +The Zxing.Net Dot Matrix Code (DMC) generation is licensed under +the Apache License 2.0 (Apache-2.0, see below). + +The Grapevine REST server framework is licensed under Apache License 2.0 +(Apache-2.0, see below). + +The AutomationML.Engine is licensed under the MIT license (MIT, see below). + +The MQTT server and client is licensed under the MIT license (MIT, see below). + +The ClosedXML Excel reader/writer is licensed under the MIT license (MIT, +see below). + +The CountryFlag WPF control is licensed under the Code Project Open License +(CPOL, see below). + +The DocumentFormat.OpenXml SDK is licensed under the MIT license (MIT, +see below). + +The ExcelNumberFormat number parser is licensed under the MIT license (MIT, +see below). + +The FastMember reflection access is licensed under Apache License 2.0 +(Apache-2.0, see below). + +The IdentityModel OpenID client is licensed under Apache License 2.0 +(Apache-2.0, see below). + +The jose-jwt object signing and encryption is licensed under the +MIT license (MIT, see below). + +The ExcelDataReader is licensed under the MIT license (MIT, see below). + +Portions copyright (c) by OPC Foundation, Inc. and licensed under the +Reciprocal Community License (RCL, see below) + +The OPC UA Example Code of OPC UA Standard is licensed under the MIT license +(MIT, see below). + +The MSAGL (Microsoft Automatic Graph Layout) is licensed under the MIT license +(MIT, see below) + +Glob (https://www.nuget.org/packages/Glob/) is licensed under the MIT license +(MIT, see below). + +The Magick.NET library is licensed under Apache License 2.0 +(Apache-2.0, see below). + +------------------------------------------------------------------------------- + + +With respect to AASX Package Explorer +===================================== + +(http://www.apache.org/licenses/LICENSE-2.0) + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + +With respect to cefSharp +======================== + +(https://raw.githubusercontent.com/cefsharp/CefSharp/master/LICENSE) + +Copyright © The CefSharp Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + + * Neither the name of Google Inc. nor the name Chromium Embedded + Framework nor the name CefSharp nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +With respect to Newtonsoft.Json +=============================== + +(https://github.com/JamesNK/Newtonsoft.Json/blob/master/LICENSE.md) + +The MIT License (MIT) + +Copyright (c) 2007 James Newton-King + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +With respect to QRcoder +======================= + +(https://github.com/codebude/QRCoder/blob/master/LICENSE.txt) + +The MIT License (MIT) + +Copyright (c) 2013-2018 Raffael Herrmann + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +With respect to ZXing.Net +========================= +With respect to Grapevine +========================= +With respect to FastMember +========================== +With respect to IdentityModel +============================= + +(http://www.apache.org/licenses/LICENSE-2.0) + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + +With respect to AutomationML.Engine +=================================== + +(https://raw.githubusercontent.com/AutomationML/AMLEngine2.1/master/license.txt) + +The MIT License (MIT) + +Copyright 2017 AutomationML e.V. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + + +With respect to MQTTnet +======================= + +(https://github.com/chkr1011/MQTTnet/blob/master/LICENSE) + +MIT License + +MQTTnet Copyright (c) 2016-2019 Christian Kratky + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +With resepct to ClosedXML +========================= + +(https://github.com/ClosedXML/ClosedXML/blob/develop/LICENSE) + +MIT License + +Copyright (c) 2016 ClosedXML + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +With resepct to CountryFlag +=========================== + +(https://www.codeproject.com/Articles/190722/WPF-CountryFlag-Control) + +The Code Project Open License (CPOL) 1.02 + +Copyright © 2017 Meshack Musundi + +Preamble + +This License governs Your use of the Work. This License is intended to allow +developers to use the Source Code and Executable Files provided as part of +the Work in any application in any form. + +The main points subject to the terms of the License are: + + Source Code and Executable Files can be used in commercial applications; + Source Code and Executable Files can be redistributed; and + Source Code can be modified to create derivative works. + No claim of suitability, guarantee, or any warranty whatsoever is provided. + The software is provided "as-is". + The Article(s) accompanying the Work may not be distributed or republished + without the Author's consent + +This License is entered between You, the individual or other entity reading or +otherwise making use of the Work licensed pursuant to this License and the +individual or other entity which offers the Work under the terms of this +License ("Author"). + +License + +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS +CODE PROJECT OPEN LICENSE ("LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT +AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED +UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. + +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HEREIN, YOU ACCEPT AND AGREE +TO BE BOUND BY THE TERMS OF THIS LICENSE. THE AUTHOR GRANTS YOU THE RIGHTS +CONTAINED HEREIN IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND +CONDITIONS. IF YOU DO NOT AGREE TO ACCEPT AND BE BOUND BY THE TERMS OF THIS +LICENSE, YOU CANNOT MAKE ANY USE OF THE WORK. + +Definitions. + "Articles" means, collectively, all articles written by Author which +describes how the Source Code and Executable Files for the Work may +be used by a user. + "Author" means the individual or entity that offers the Work under +the terms of this License. + "Derivative Work" means a work based upon the Work or upon the Work +and other pre-existing works. + "Executable Files" refer to the executables, binary files, +configuration and any required data files included in the Work. + "Publisher" means the provider of the website, magazine, CD-ROM, +DVD or other medium from or by which the Work is obtained by You. + "Source Code" refers to the collection of source code and +configuration files used to create the Executable Files. + "Standard Version" refers to such a Work if it has not been modified, +or has been modified in accordance with the consent of the Author, +such consent being in the full discretion of the Author. + "Work" refers to the collection of files distributed by the Publisher, +including the Source Code, Executable Files, binaries, data files, +documentation, whitepapers and the Articles. + "You" is you, an individual or entity wishing to use the Work and +exercise your rights under this License. + +Fair Use/Fair Use Rights. Nothing in this License is intended to reduce, +limit, or restrict any rights arising from fair use, fair dealing, +first sale or other limitations on the exclusive rights of the +copyright owner under copyright law or other applicable laws. + +License Grant. Subject to the terms and conditions of this License, the +Author hereby grants You a worldwide, royalty-free, non-exclusive, +perpetual (for the duration of the applicable copyright) license +to exercise the rights in the Work as stated below: + You may use the standard version of the Source Code or Executable +Files in Your own applications. + You may apply bug fixes, portability fixes and other modifications +obtained from the Public Domain or from the Author. A Work modified +in such a way shall still be considered the standard version and will +be subject to this License. + You may otherwise modify Your copy of this Work (excluding the Articles) +in any way to create a Derivative Work, provided that You insert a prominent +notice in each changed file stating how, when and where You changed that file. + You may distribute the standard version of the Executable Files and Source +Code or Derivative Work in aggregate with other (possibly commercial) +programs as part of a larger (possibly commercial) software distribution. + The Articles discussing the Work published in any form by the author may +not be distributed or republished without the Author's consent. The author +retains copyright to any such Articles. You may use the Executable Files and +Source Code pursuant to this License but you may not repost or republish or +otherwise distribute or make available the Articles, without the prior written +consent of the Author. + +Any subroutines or modules supplied by You and linked into the Source Code +or Executable Files of this Work shall not be considered part of this Work +and will not be subject to the terms of this License. + +Patent License. Subject to the terms and conditions of this License, each +Author hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, +royalty-free, irrevocable (except as stated in this section) patent license +to make, have made, use, import, and otherwise transfer the Work. + +Restrictions. The license granted in Section 3 above is expressly made subject +to and limited by the following restrictions: + You agree not to remove any of the original copyright, patent, trademark, +and attribution notices and associated disclaimers that may appear in the +Source Code or Executable Files. + You agree not to advertise or in any way imply that this Work is a product +of Your own. + The name of the Author may not be used to endorse or promote products +derived from the Work without the prior written consent of the Author. + You agree not to sell, lease, or rent any part of the Work. This does +not restrict you from including the Work or any part of the Work inside +a larger software distribution that itself is being sold. The Work by itself, +though, cannot be sold, leased or rented. + You may distribute the Executable Files and Source Code only under the terms +of this License, and You must include a copy of, or the Uniform Resource +Identifier for, this License with every copy of the Executable Files or +Source Code You distribute and ensure that anyone receiving such Executable +Files and Source Code agrees that the terms of this License apply to such +Executable Files and/or Source Code. You may not offer or impose any terms +on the Work that alter or restrict the terms of this License or the +recipients' exercise of the rights granted hereunder. You may not sublicense +the Work. You must keep intact all notices that refer to this License and to +the disclaimer of warranties. You may not distribute the Executable Files or +Source Code with any technological measures that control access or use of the +Work in a manner inconsistent with the terms of this License. + You agree not to use the Work for illegal, immoral or improper +purposes, or on pages containing illegal, immoral or improper material. +The Work is subject to applicable export laws. You agree to comply with all +such laws and regulations that may apply to the Work after Your receipt of +the Work. + +Representations, Warranties and Disclaimer. THIS WORK IS PROVIDED "AS IS", +"WHERE IS" AND "AS AVAILABLE", WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES OR +CONDITIONS OR GUARANTEES. YOU, THE USER, ASSUME ALL RISK IN ITS USE, +INCLUDING COPYRIGHT INFRINGEMENT, PATENT INFRINGEMENT, SUITABILITY, ETC. +AUTHOR EXPRESSLY DISCLAIMS ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES +OR CONDITIONS, INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS +OF MERCHANTABILITY, MERCHANTABLE QUALITY OR FITNESS FOR A PARTICULAR +PURPOSE, OR ANY WARRANTY OF TITLE OR NON-INFRINGEMENT, OR THAT THE WORK +(OR ANY PORTION THEREOF) IS CORRECT, USEFUL, BUG-FREE OR FREE OF VIRUSES. +YOU MUST PASS THIS DISCLAIMER ON WHENEVER YOU DISTRIBUTE THE WORK OR DERIVATIVE +WORKS. + +Indemnity. You agree to defend, indemnify and hold harmless the Author and the +Publisher from and against any claims, suits, losses, damages, liabilities, +costs, and expenses (including reasonable legal or attorneys’ fees) +resulting from or relating to any use of the Work by You. + +Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, +IN NO EVENT WILL THE AUTHOR OR THE PUBLISHER BE LIABLE TO YOU ON ANY LEGAL +THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY +DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK OR OTHERWISE, +EVEN IF THE AUTHOR OR THE PUBLISHER HAS BEEN ADVISED OF THE POSSIBILITY +OF SUCH DAMAGES. + +Termination. + This License and the rights granted hereunder will terminate +automatically upon any breach by You of any term of this License. +Individuals or entities who have received Derivative Works from You under +this License, however, will not have their licenses terminated provided such +individuals or entities remain in full compliance with those licenses. +Sections 1, 2, 6, 7, 8, 9, 10 and 11 will survive any termination of +this License. + If You bring a copyright, trademark, patent or any other infringement +claim against any contributor over infringements You claim are made by the +Work, your License from such contributor to the Work ends automatically. + Subject to the above terms and conditions, this License is perpetual +(for the duration of the applicable copyright in the Work). +Notwithstanding the above, the Author reserves the right to release the Work +under different license terms or to stop distributing the Work at any time; +provided, however that any such election will not serve to withdraw this +License (or any other license that has been, or is required to be, +granted under the terms of this License), and this License will continue +in full force and effect unless terminated as stated above. + +Publisher. The parties hereby confirm that the Publisher shall not, under +any circumstances, be responsible for and shall not have any liability +in respect of the subject matter of this License. The Publisher makes no +warranty whatsoever in connection with the Work and shall not be liable +to You or any party on any legal theory for any damages whatsoever, including +without limitation any general, special, incidental or consequential damages +arising in connection to this license. The Publisher reserves the right to +cease making the Work available to You at any time without notice + +Miscellaneous + This License shall be governed by the laws of the location of the head +office of the Author or if the Author is an individual, the laws of +location of the principal place of residence of the Author. + If any provision of this License is invalid or unenforceable under +applicable law, it shall not affect the validity or enforceability of the +remainder of the terms of this License, and without further action by the +parties to this License, such provision shall be reformed to the minimum +extent necessary to make such provision valid and enforceable. + No term or provision of this License shall be deemed waived and no +breach consented to unless such waiver or consent shall be in writing +and signed by the party to be charged with such waiver or consent. + This License constitutes the entire agreement between the parties +with respect to the Work licensed herein. There are no understandings, +agreements or representations with respect to the Work not specified herein. +The Author shall not be bound by any additional provisions that may appear +in any communication from You. This License may not be modified without +the mutual written agreement of the Author and You. + + +With respect to DocumentFormat.OpenXml +====================================== + +(https://github.com/OfficeDev/Open-XML-SDK/blob/master/LICENSE) + +The MIT License (MIT) + +Copyright (c) Microsoft Corporation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +With respect to ExcelNumberFormat +================================= + +(https://github.com/andersnm/ExcelNumberFormat/blob/master/LICENSE) + +The MIT License (MIT) + +Copyright (c) 2017 andersnm + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +With respect to jose-jwt +======================== + +(https://github.com/dvsekhvalnov/jose-jwt/blob/master/LICENSE) + +The MIT License (MIT) + +Copyright (c) 2014-2019 dvsekhvalnov + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +With resepect to ExcelDataReader +================================ + +(https://github.com/ExcelDataReader/ExcelDataReader/blob/develop/LICENSE) + +The MIT License (MIT) + +Copyright (c) 2014 ExcelDataReader + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +With resepect to OPC UA Example Code +==================================== + + * Copyright (c) 2005-2019 The OPC Foundation, Inc. All rights reserved. + * + * OPC Foundation MIT License 1.00 + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * The complete license agreement can be found here: + * http://opcfoundation.org/License/MIT/1.00/ + + +With respect to OPC Foundation +============================== + +RCL License +Reciprocal Community License 1.00 (RCL1.00) +Version 1.00, June 24, 2009 +Copyright (C) 2008,2009 OPC Foundation, Inc., All Rights Reserved. + +https://opcfoundation.org/license/rcl.html + +Remark: PHOENIX CONTACT GmbH & Co. KG and Festo SE & Co. KG are members +of OPC foundation. + +With respect to MSAGL (Microsoft Automatic Graph Layout) +======================================================== +(see: https://github.com/microsoft/automatic-graph-layout/blob/master/LICENSE) + +Microsoft Automatic Graph Layout, MSAGL + +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +""Software""), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +With respect to Glob (https://www.nuget.org/packages/Glob/) +=========================================================== +(see: https://raw.githubusercontent.com/kthompson/glob/master/LICENSE) + +The MIT License (MIT) + +Copyright (c) 2013-2019 Kevin Thompson + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +With respect to Magick.NET +========================== + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/src/AASXPackageExplorerSetup/LICENSE.txt b/src/AASXPackageExplorerSetup/LICENSE.txt index cd3ff93ed..94281805d 100644 --- a/src/AASXPackageExplorerSetup/LICENSE.txt +++ b/src/AASXPackageExplorerSetup/LICENSE.txt @@ -94,6 +94,9 @@ Glob (https://www.nuget.org/packages/Glob/) is licensed under the MIT license The Magick.NET library is licensed under Apache License 2.0 (Apache-2.0, see below). +The SSharp.NET library (https://github.com/PetroProtsyk/SSharp) is licensed +under Apache License 2.0 (Apache-2.0, see below). + ------------------------------------------------------------------------------- @@ -1253,6 +1256,212 @@ With respect to Magick.NET Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +With respect to SSharp.NET library +================================== + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/src/AasxAmlImExport/LICENSE.txt b/src/AasxAmlImExport/LICENSE.txt index cd3ff93ed..94281805d 100644 --- a/src/AasxAmlImExport/LICENSE.txt +++ b/src/AasxAmlImExport/LICENSE.txt @@ -94,6 +94,9 @@ Glob (https://www.nuget.org/packages/Glob/) is licensed under the MIT license The Magick.NET library is licensed under Apache License 2.0 (Apache-2.0, see below). +The SSharp.NET library (https://github.com/PetroProtsyk/SSharp) is licensed +under Apache License 2.0 (Apache-2.0, see below). + ------------------------------------------------------------------------------- @@ -1253,6 +1256,212 @@ With respect to Magick.NET Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +With respect to SSharp.NET library +================================== + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/src/AasxBammRdfImExport/LICENSE.txt b/src/AasxBammRdfImExport/LICENSE.txt index 1f535ee2c..94281805d 100644 --- a/src/AasxBammRdfImExport/LICENSE.txt +++ b/src/AasxBammRdfImExport/LICENSE.txt @@ -1,8 +1,8 @@ -Copyright (c) 2018-2020 Festo AG & Co. KG +Copyright (c) 2018-2021 Festo AG & Co. KG , author: Michael Hoffmeister -Copyright (c) 2019-2020 PHOENIX CONTACT GmbH & Co. KG +Copyright (c) 2019-2021 PHOENIX CONTACT GmbH & Co. KG , author: Andreas Orzelski @@ -16,8 +16,10 @@ author: Marco Mendes Copyright (c) 2020 SICK AG -Copyright (c) 2021 Robert Bosch Manufacturing Solutions GmbH -author: Monisha Macharla Vasu +Copyright (c) 2021 KEB Automation KG + +Copyright (c) 2021 Lenze SE +author: Jonas Grote, Denis Göllner, Sebastian Bischof The AASX Package Explorer is licensed under the Apache License 2.0 (Apache-2.0, see below). @@ -89,7 +91,12 @@ The MSAGL (Microsoft Automatic Graph Layout) is licensed under the MIT license Glob (https://www.nuget.org/packages/Glob/) is licensed under the MIT license (MIT, see below). -The dotNetRDF is licensed under the MIT license (MIT, see below). +The Magick.NET library is licensed under Apache License 2.0 +(Apache-2.0, see below). + +The SSharp.NET library (https://github.com/PetroProtsyk/SSharp) is licensed +under Apache License 2.0 (Apache-2.0, see below). + ------------------------------------------------------------------------------- @@ -281,7 +288,7 @@ With respect to cefSharp (https://raw.githubusercontent.com/cefsharp/CefSharp/master/LICENSE) -Copyright ┬® The CefSharp Authors. All rights reserved. +Copyright © The CefSharp Authors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -644,7 +651,7 @@ With resepct to CountryFlag The Code Project Open License (CPOL) 1.02 -Copyright ┬® 2017 Meshack Musundi +Copyright © 2017 Meshack Musundi Preamble @@ -785,7 +792,7 @@ WORKS. Indemnity. You agree to defend, indemnify and hold harmless the Author and the Publisher from and against any claims, suits, losses, damages, liabilities, -costs, and expenses (including reasonable legal or attorneysÔÇÖ fees) +costs, and expenses (including reasonable legal or attorneys’ fees) resulting from or relating to any use of the Work by You. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, @@ -985,6 +992,7 @@ With resepect to OPC UA Example Code * The complete license agreement can be found here: * http://opcfoundation.org/License/MIT/1.00/ + With respect to OPC Foundation ============================== @@ -1029,6 +1037,7 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + With respect to Glob (https://www.nuget.org/packages/Glob/) =========================================================== (see: https://raw.githubusercontent.com/kthompson/glob/master/LICENSE) @@ -1053,3 +1062,414 @@ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +With respect to Magick.NET +========================== + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +With respect to SSharp.NET library +================================== + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/src/AasxCsharpLibrary.Tests/LICENSE.txt b/src/AasxCsharpLibrary.Tests/LICENSE.txt index cd3ff93ed..94281805d 100644 --- a/src/AasxCsharpLibrary.Tests/LICENSE.txt +++ b/src/AasxCsharpLibrary.Tests/LICENSE.txt @@ -94,6 +94,9 @@ Glob (https://www.nuget.org/packages/Glob/) is licensed under the MIT license The Magick.NET library is licensed under Apache License 2.0 (Apache-2.0, see below). +The SSharp.NET library (https://github.com/PetroProtsyk/SSharp) is licensed +under Apache License 2.0 (Apache-2.0, see below). + ------------------------------------------------------------------------------- @@ -1253,6 +1256,212 @@ With respect to Magick.NET Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +With respect to SSharp.NET library +================================== + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/src/AasxCsharpLibrary/LICENSE.txt b/src/AasxCsharpLibrary/LICENSE.txt index cd3ff93ed..94281805d 100644 --- a/src/AasxCsharpLibrary/LICENSE.txt +++ b/src/AasxCsharpLibrary/LICENSE.txt @@ -94,6 +94,9 @@ Glob (https://www.nuget.org/packages/Glob/) is licensed under the MIT license The Magick.NET library is licensed under Apache License 2.0 (Apache-2.0, see below). +The SSharp.NET library (https://github.com/PetroProtsyk/SSharp) is licensed +under Apache License 2.0 (Apache-2.0, see below). + ------------------------------------------------------------------------------- @@ -1253,6 +1256,212 @@ With respect to Magick.NET Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +With respect to SSharp.NET library +================================== + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/src/AasxDictionaryImport.Tests/LICENSE.txt b/src/AasxDictionaryImport.Tests/LICENSE.txt index cd3ff93ed..94281805d 100644 --- a/src/AasxDictionaryImport.Tests/LICENSE.txt +++ b/src/AasxDictionaryImport.Tests/LICENSE.txt @@ -94,6 +94,9 @@ Glob (https://www.nuget.org/packages/Glob/) is licensed under the MIT license The Magick.NET library is licensed under Apache License 2.0 (Apache-2.0, see below). +The SSharp.NET library (https://github.com/PetroProtsyk/SSharp) is licensed +under Apache License 2.0 (Apache-2.0, see below). + ------------------------------------------------------------------------------- @@ -1253,6 +1256,212 @@ With respect to Magick.NET Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +With respect to SSharp.NET library +================================== + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/src/AasxDictionaryImport/LICENSE.txt b/src/AasxDictionaryImport/LICENSE.txt index cd3ff93ed..94281805d 100644 --- a/src/AasxDictionaryImport/LICENSE.txt +++ b/src/AasxDictionaryImport/LICENSE.txt @@ -94,6 +94,9 @@ Glob (https://www.nuget.org/packages/Glob/) is licensed under the MIT license The Magick.NET library is licensed under Apache License 2.0 (Apache-2.0, see below). +The SSharp.NET library (https://github.com/PetroProtsyk/SSharp) is licensed +under Apache License 2.0 (Apache-2.0, see below). + ------------------------------------------------------------------------------- @@ -1253,6 +1256,212 @@ With respect to Magick.NET Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +With respect to SSharp.NET library +================================== + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/src/AasxFileServerRestLibrary/LICENSE.txt b/src/AasxFileServerRestLibrary/LICENSE.txt index 72844134f..94281805d 100644 --- a/src/AasxFileServerRestLibrary/LICENSE.txt +++ b/src/AasxFileServerRestLibrary/LICENSE.txt @@ -91,6 +91,12 @@ The MSAGL (Microsoft Automatic Graph Layout) is licensed under the MIT license Glob (https://www.nuget.org/packages/Glob/) is licensed under the MIT license (MIT, see below). +The Magick.NET library is licensed under Apache License 2.0 +(Apache-2.0, see below). + +The SSharp.NET library (https://github.com/PetroProtsyk/SSharp) is licensed +under Apache License 2.0 (Apache-2.0, see below). + ------------------------------------------------------------------------------- @@ -1056,3 +1062,414 @@ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +With respect to Magick.NET +========================== + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +With respect to SSharp.NET library +================================== + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/src/AasxFormatCst/LICENSE.txt b/src/AasxFormatCst/LICENSE.txt index cd3ff93ed..94281805d 100644 --- a/src/AasxFormatCst/LICENSE.txt +++ b/src/AasxFormatCst/LICENSE.txt @@ -94,6 +94,9 @@ Glob (https://www.nuget.org/packages/Glob/) is licensed under the MIT license The Magick.NET library is licensed under Apache License 2.0 (Apache-2.0, see below). +The SSharp.NET library (https://github.com/PetroProtsyk/SSharp) is licensed +under Apache License 2.0 (Apache-2.0, see below). + ------------------------------------------------------------------------------- @@ -1253,6 +1256,212 @@ With respect to Magick.NET Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +With respect to SSharp.NET library +================================== + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/src/AasxIntegrationBase/AasxMenu.cs b/src/AasxIntegrationBase/AasxMenu.cs index 2f745bcb6..8b13953d0 100644 --- a/src/AasxIntegrationBase/AasxMenu.cs +++ b/src/AasxIntegrationBase/AasxMenu.cs @@ -29,16 +29,16 @@ public enum AasxMenuFilter /// AASX menu items might call this action when activated. /// /// Name of menu item in lower case - public delegate void AasxMenuActionDelegate(string nameLower); + public delegate void AasxMenuActionDelegate(string nameLower, AasxMenuItemBase item); /// /// AASX menu items might call this action when activated. /// /// Name of menu item in lower case - public delegate Task AasxMenuActionAsyncDelegate(string nameLower); + public delegate Task AasxMenuActionAsyncDelegate(string nameLower, AasxMenuItemBase item); /// - /// Base class for menuitems. + /// Base class for menu items with a possible action. /// public abstract class AasxMenuItemBase { @@ -59,12 +59,29 @@ public abstract class AasxMenuItemBase public AasxMenuActionAsyncDelegate ActionAsync = null; } + /// + /// Menu item equipped with a possible hotkey + /// + public abstract class AasxMenuItemHotkeyed : AasxMenuItemBase + { + /// + /// Contains the gesture in form of "Ctrl+Shift+F" stuff. + /// see: https://learn.microsoft.com/en-us/dotnet/api/system.windows.input.keygesture + /// + public string InputGesture; + + /// + /// Displays gesture, but not auto-create a hotkey for it + /// + public bool GestureOnlyDisplay = false; + } + /// /// By this information, menu items for AASX Package Explorer, Blazor and Toolkit /// shall be described. Goal is to build up menu systems dynamically. /// Shall be also usable for plugins. /// - public class AasxMenuItem : AasxMenuItemBase + public class AasxMenuItem : AasxMenuItemHotkeyed { /// /// For which application is this menu item applicable. @@ -92,11 +109,6 @@ public class AasxMenuItem : AasxMenuItemBase /// public bool IsChecked = false; - /// - /// Keyboard shortcut in GUI based applications. - /// - public string InputGesture = null; - /// /// Command name in command line based applications. Typically lower case with /// dashes in between. No dask at front. @@ -133,15 +145,10 @@ public void Add(AasxMenuItemBase item) /// - /// Represents a single hotkey which could activate an action + /// Represents a single hotkey which is not a visible menu item /// - public class AasxHotkey : AasxMenuItemBase + public class AasxHotkey : AasxMenuItemHotkeyed { - /// - /// Contains the gesture in form of "Ctrl+Shift+F" stuff. - /// see: https://learn.microsoft.com/en-us/dotnet/api/system.windows.input.keygesture - /// - public string Gesture; } /// @@ -174,6 +181,7 @@ public AasxMenu AddWpf( AasxMenuActionAsyncDelegate actionAsync = null, AasxMenuFilter filter = AasxMenuFilter.WPF, string inputGesture = null, + bool onlyDisplay = false, bool isCheckable = false, bool isChecked = false) { this.Add(new AasxMenuItem() @@ -184,6 +192,7 @@ public AasxMenu AddWpf( ActionAsync = actionAsync, Filter = filter, InputGesture = inputGesture, + GestureOnlyDisplay = onlyDisplay, IsCheckable = isCheckable, IsChecked = isChecked }); @@ -196,6 +205,7 @@ public AasxMenu AddWpfBlazor( AasxMenuActionAsyncDelegate actionAsync = null, AasxMenuFilter filter = AasxMenuFilter.WpfBlazor, string inputGesture = null, + bool onlyDisplay = false, bool isCheckable = false, bool isChecked = false) { this.Add(new AasxMenuItem() @@ -206,6 +216,7 @@ public AasxMenu AddWpfBlazor( ActionAsync = actionAsync, Filter = filter, InputGesture = inputGesture, + GestureOnlyDisplay = onlyDisplay, IsCheckable = isCheckable, IsChecked = isChecked }); @@ -218,7 +229,8 @@ public AasxMenu AddAll( AasxMenuActionDelegate action = null, AasxMenuActionAsyncDelegate actionAsync = null, AasxMenuFilter filter = AasxMenuFilter.All, - string inputGesture = null) + string inputGesture = null, + bool onlyDisplay = false) { this.Add(new AasxMenuItem() { @@ -229,7 +241,8 @@ public AasxMenu AddAll( Action = action, ActionAsync = actionAsync, Filter = filter, - InputGesture = inputGesture + InputGesture = inputGesture, + GestureOnlyDisplay = onlyDisplay, }); return this; } @@ -261,7 +274,7 @@ public AasxMenu AddHotkey( this.Add(new AasxHotkey() { Name = name, - Gesture = gesture + InputGesture = gesture }); return this; } @@ -270,18 +283,18 @@ public AasxMenu AddHotkey( // Operate // - public void ActivateAction(AasxMenuItem mii) + public void ActivateAction(AasxMenuItemBase mi) { - var name = mii?.Name?.Trim()?.ToLower(); + var name = mi?.Name?.Trim()?.ToLower(); - if (mii?.ActionAsync != null) - mii.ActionAsync(name); - else if (mii?.Action != null) - mii.Action(name); + if (mi?.ActionAsync != null) + mi.ActionAsync(name, mi); + else if (mi?.Action != null) + mi.Action(name, mi); else if (this.DefaultActionAsync != null) - this.DefaultActionAsync(name); + this.DefaultActionAsync(name, mi); else if (this.DefaultAction != null) - this.DefaultAction(name); + this.DefaultAction(name, mi); } } diff --git a/src/AasxIntegrationBase/LICENSE.txt b/src/AasxIntegrationBase/LICENSE.txt index cd3ff93ed..94281805d 100644 --- a/src/AasxIntegrationBase/LICENSE.txt +++ b/src/AasxIntegrationBase/LICENSE.txt @@ -94,6 +94,9 @@ Glob (https://www.nuget.org/packages/Glob/) is licensed under the MIT license The Magick.NET library is licensed under Apache License 2.0 (Apache-2.0, see below). +The SSharp.NET library (https://github.com/PetroProtsyk/SSharp) is licensed +under Apache License 2.0 (Apache-2.0, see below). + ------------------------------------------------------------------------------- @@ -1253,6 +1256,212 @@ With respect to Magick.NET Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +With respect to SSharp.NET library +================================== + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/src/AasxIntegrationBaseGdi/LICENSE.txt b/src/AasxIntegrationBaseGdi/LICENSE.txt index cd3ff93ed..94281805d 100644 --- a/src/AasxIntegrationBaseGdi/LICENSE.txt +++ b/src/AasxIntegrationBaseGdi/LICENSE.txt @@ -94,6 +94,9 @@ Glob (https://www.nuget.org/packages/Glob/) is licensed under the MIT license The Magick.NET library is licensed under Apache License 2.0 (Apache-2.0, see below). +The SSharp.NET library (https://github.com/PetroProtsyk/SSharp) is licensed +under Apache License 2.0 (Apache-2.0, see below). + ------------------------------------------------------------------------------- @@ -1253,6 +1256,212 @@ With respect to Magick.NET Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +With respect to SSharp.NET library +================================== + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/src/AasxIntegrationBaseWpf/LICENSE.txt b/src/AasxIntegrationBaseWpf/LICENSE.txt index cd3ff93ed..94281805d 100644 --- a/src/AasxIntegrationBaseWpf/LICENSE.txt +++ b/src/AasxIntegrationBaseWpf/LICENSE.txt @@ -94,6 +94,9 @@ Glob (https://www.nuget.org/packages/Glob/) is licensed under the MIT license The Magick.NET library is licensed under Apache License 2.0 (Apache-2.0, see below). +The SSharp.NET library (https://github.com/PetroProtsyk/SSharp) is licensed +under Apache License 2.0 (Apache-2.0, see below). + ------------------------------------------------------------------------------- @@ -1253,6 +1256,212 @@ With respect to Magick.NET Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +With respect to SSharp.NET library +================================== + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/src/AasxIntegrationEmptySample/LICENSE.txt b/src/AasxIntegrationEmptySample/LICENSE.txt index cd3ff93ed..94281805d 100644 --- a/src/AasxIntegrationEmptySample/LICENSE.txt +++ b/src/AasxIntegrationEmptySample/LICENSE.txt @@ -94,6 +94,9 @@ Glob (https://www.nuget.org/packages/Glob/) is licensed under the MIT license The Magick.NET library is licensed under Apache License 2.0 (Apache-2.0, see below). +The SSharp.NET library (https://github.com/PetroProtsyk/SSharp) is licensed +under Apache License 2.0 (Apache-2.0, see below). + ------------------------------------------------------------------------------- @@ -1253,6 +1256,212 @@ With respect to Magick.NET Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +With respect to SSharp.NET library +================================== + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/src/AasxMqtt/LICENSE.txt b/src/AasxMqtt/LICENSE.txt index cd3ff93ed..94281805d 100644 --- a/src/AasxMqtt/LICENSE.txt +++ b/src/AasxMqtt/LICENSE.txt @@ -94,6 +94,9 @@ Glob (https://www.nuget.org/packages/Glob/) is licensed under the MIT license The Magick.NET library is licensed under Apache License 2.0 (Apache-2.0, see below). +The SSharp.NET library (https://github.com/PetroProtsyk/SSharp) is licensed +under Apache License 2.0 (Apache-2.0, see below). + ------------------------------------------------------------------------------- @@ -1253,6 +1256,212 @@ With respect to Magick.NET Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +With respect to SSharp.NET library +================================== + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/src/AasxMqttClient/LICENSE.txt b/src/AasxMqttClient/LICENSE.txt index cd3ff93ed..94281805d 100644 --- a/src/AasxMqttClient/LICENSE.txt +++ b/src/AasxMqttClient/LICENSE.txt @@ -94,6 +94,9 @@ Glob (https://www.nuget.org/packages/Glob/) is licensed under the MIT license The Magick.NET library is licensed under Apache License 2.0 (Apache-2.0, see below). +The SSharp.NET library (https://github.com/PetroProtsyk/SSharp) is licensed +under Apache License 2.0 (Apache-2.0, see below). + ------------------------------------------------------------------------------- @@ -1253,6 +1256,212 @@ With respect to Magick.NET Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +With respect to SSharp.NET library +================================== + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/src/AasxOpenidClient/LICENSE.txt b/src/AasxOpenidClient/LICENSE.txt index cd3ff93ed..94281805d 100644 --- a/src/AasxOpenidClient/LICENSE.txt +++ b/src/AasxOpenidClient/LICENSE.txt @@ -94,6 +94,9 @@ Glob (https://www.nuget.org/packages/Glob/) is licensed under the MIT license The Magick.NET library is licensed under Apache License 2.0 (Apache-2.0, see below). +The SSharp.NET library (https://github.com/PetroProtsyk/SSharp) is licensed +under Apache License 2.0 (Apache-2.0, see below). + ------------------------------------------------------------------------------- @@ -1253,6 +1256,212 @@ With respect to Magick.NET Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +With respect to SSharp.NET library +================================== + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/src/AasxPackageExplorer.GuiTests/LICENSE.txt b/src/AasxPackageExplorer.GuiTests/LICENSE.txt index cd3ff93ed..94281805d 100644 --- a/src/AasxPackageExplorer.GuiTests/LICENSE.txt +++ b/src/AasxPackageExplorer.GuiTests/LICENSE.txt @@ -94,6 +94,9 @@ Glob (https://www.nuget.org/packages/Glob/) is licensed under the MIT license The Magick.NET library is licensed under Apache License 2.0 (Apache-2.0, see below). +The SSharp.NET library (https://github.com/PetroProtsyk/SSharp) is licensed +under Apache License 2.0 (Apache-2.0, see below). + ------------------------------------------------------------------------------- @@ -1253,6 +1256,212 @@ With respect to Magick.NET Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +With respect to SSharp.NET library +================================== + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/src/AasxPackageExplorer.Tests/LICENSE.txt b/src/AasxPackageExplorer.Tests/LICENSE.txt index cd3ff93ed..94281805d 100644 --- a/src/AasxPackageExplorer.Tests/LICENSE.txt +++ b/src/AasxPackageExplorer.Tests/LICENSE.txt @@ -94,6 +94,9 @@ Glob (https://www.nuget.org/packages/Glob/) is licensed under the MIT license The Magick.NET library is licensed under Apache License 2.0 (Apache-2.0, see below). +The SSharp.NET library (https://github.com/PetroProtsyk/SSharp) is licensed +under Apache License 2.0 (Apache-2.0, see below). + ------------------------------------------------------------------------------- @@ -1253,6 +1256,212 @@ With respect to Magick.NET Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +With respect to SSharp.NET library +================================== + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/src/AasxPackageExplorer/AasxPackageExplorer.csproj b/src/AasxPackageExplorer/AasxPackageExplorer.csproj index 328c494ec..ba351c0d6 100644 --- a/src/AasxPackageExplorer/AasxPackageExplorer.csproj +++ b/src/AasxPackageExplorer/AasxPackageExplorer.csproj @@ -119,6 +119,7 @@ + diff --git a/src/AasxPackageExplorer/AasxScript.cs b/src/AasxPackageExplorer/AasxScript.cs new file mode 100644 index 000000000..175536ab4 --- /dev/null +++ b/src/AasxPackageExplorer/AasxScript.cs @@ -0,0 +1,109 @@ +/* +Copyright (c) 2018-2022 Festo AG & Co. KG +Author: Michael Hoffmeister + +This source code is licensed under the Apache License 2.0 (see LICENSE.txt). + +This source code may use other Open Source software components (see LICENSE.txt). +*/ + +using Scripting.SSharp.Runtime; +using Scripting.SSharp; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using AasxIntegrationBase; +using AasxPackageLogic; +using AdminShellNS; +using System.ComponentModel; + +namespace AasxPackageExplorer +{ + public class AasxScript + { + public class MessageBox + { + public static void Show(string caption) + { + Console.WriteLine(caption); + } + + public static void Tool(string cmd, params string[] args) + { + Console.WriteLine($"Execute {cmd} " + string.Join(",", args)); + } + } + + public class Script_Tool : IInvokable + { + bool IInvokable.CanInvoke() => true; + + object IInvokable.Invoke(IScriptContext context, object[] args) + { + Console.WriteLine($"Execute tool" + string.Join(",", args)); + return 0; + } + } + + public class Script_WriteLine : IInvokable + { + bool IInvokable.CanInvoke() => true; + + object IInvokable.Invoke(IScriptContext context, object[] args) + { + Log.Singleton.Info("Script: " + string.Join(",", args)); + return 0; + } + } + + public static void StartEnginBackground(string script) + { + // access + if (script?.HasContent() != true) + return; + Log.Singleton.Info(StoredPrint.Color.Blue, "Starting script with len {0} hash 0x{1:x}", + script.Length, script.GetHashCode()); + + // use BackgroundWorker + var worker = new BackgroundWorker(); + AdminShellPackageEnv envToload = null; + worker.DoWork += (s1, e1) => + { + try + { + // runtime + RuntimeHost.Initialize(); + Log.Singleton.Info("Script: Runtime initialized."); + + // types + RuntimeHost.AddType("MessageBox", typeof(MessageBox)); + Log.Singleton.Info("Script: Typed added."); + + // compile + Script s = Script.Compile(script); + Log.Singleton.Info("Script: Compiled."); + + // scope + s.Context.Scope.SetItem("Tool", new Script_Tool()); + s.Context.Scope.SetItem("WriteLine", new Script_WriteLine()); + Log.Singleton.Info("Script: Scope extened."); + + // execute + Log.Singleton.Info("Script: Starting execution of custom script .."); + s.Execute(); + Log.Singleton.Info("Script: .. execution ended."); + } + catch (Exception ex) { + Log.Singleton.Error(ex, "Script: "); + } + }; + worker.RunWorkerCompleted += (s1, e1) => + { + Log.Singleton.Info("Script: BackgroundWorker completed."); + }; + worker.RunWorkerAsync(); + } + } +} diff --git a/src/AasxPackageExplorer/LICENSE.txt b/src/AasxPackageExplorer/LICENSE.txt index cd3ff93ed..94281805d 100644 --- a/src/AasxPackageExplorer/LICENSE.txt +++ b/src/AasxPackageExplorer/LICENSE.txt @@ -94,6 +94,9 @@ Glob (https://www.nuget.org/packages/Glob/) is licensed under the MIT license The Magick.NET library is licensed under Apache License 2.0 (Apache-2.0, see below). +The SSharp.NET library (https://github.com/PetroProtsyk/SSharp) is licensed +under Apache License 2.0 (Apache-2.0, see below). + ------------------------------------------------------------------------------- @@ -1253,6 +1256,212 @@ With respect to Magick.NET Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +With respect to SSharp.NET library +================================== + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/src/AasxPackageExplorer/MainWindow.CommandBindings.cs b/src/AasxPackageExplorer/MainWindow.CommandBindings.cs index 07a2195f3..327b1103d 100644 --- a/src/AasxPackageExplorer/MainWindow.CommandBindings.cs +++ b/src/AasxPackageExplorer/MainWindow.CommandBindings.cs @@ -154,8 +154,10 @@ public AasxMenu CreateMainMenu() menu.AddMenu(header: "Workspace", childs: (new AasxMenu()) - .AddWpf(name: "EditMenu", header: "_Edit", inputGesture: "Ctrl+E", isCheckable: true) - .AddWpf(name: "HintsMenu", header: "_Hints", inputGesture: "Ctrl+H", isCheckable: true, isChecked: true) + .AddWpf(name: "EditMenu", header: "_Edit", inputGesture: "Ctrl+E", + onlyDisplay: true, isCheckable: true) + .AddWpf(name: "HintsMenu", header: "_Hints", inputGesture: "Ctrl+H", + onlyDisplay: true, isCheckable: true, isChecked: true) .AddWpf(name: "Test", header: "Test") .AddSeparator() .AddWpf(name: "ToolsFindText", header: "Find ...") @@ -169,8 +171,11 @@ public AasxMenu CreateMainMenu() .AddWpf(name: "BufferClear", header: "Clear internal paste buffer")) .AddSeparator() .AddMenu(header: "Events ..", childs: (new AasxMenu()) - .AddWpf(name: "EventsShowLogMenu", header: "_Event log", inputGesture: "Ctrl+L", isCheckable: true) - .AddWpf(name: "EventsResetLocks", header: "Reset interlocking"))); + .AddWpf(name: "EventsShowLogMenu", header: "_Event log", inputGesture: "Ctrl+L", + onlyDisplay: true, isCheckable: true) + .AddWpf(name: "EventsResetLocks", header: "Reset interlocking")) + .AddMenu(header: "Scripts ..", childs: (new AasxMenu()) + .AddWpf(name: "ScriptEditLaunch", header: "Edit & launch ..", inputGesture: "Ctrl+Shift+L"))); // // Options @@ -201,8 +206,13 @@ public AasxMenu CreateMainMenu() // Hotkeys // - menu.AddHotkey(name: "", gesture: "") - .AddHotkey(name: "", gesture: ""); + menu.AddHotkey(name: "EditKey", gesture: "Ctrl+E") + .AddHotkey(name: "HintsKey", gesture: "Ctrl+H") + .AddHotkey(name: "ShowIriKey", gesture: "Ctrl+I") + .AddHotkey(name: "EventsShowLogKey", gesture: "Ctrl+L"); + + for (int i = 0; i < 9; i++) + menu.AddHotkey(name: $"LaunchScript{i}", gesture: $"Ctrl+Shift+{i}"); // // End @@ -379,7 +389,7 @@ private static string makeJsonLD(string json, int count) return jsonld; } - private async Task CommandBinding_GeneralDispatch(string cmd) + private async Task CommandBinding_GeneralDispatch(string cmd, AasxMenuItemBase menuItem) { if (cmd == null) { @@ -1541,12 +1551,17 @@ private async Task CommandBinding_GeneralDispatch(string cmd) } if (cmd == "eventsshowlogkey") - _mainMenu?.SetChecked("EventsShowLogMenu", !(_mainMenu?.IsChecked("ShowIriMenu") == true)); + _mainMenu?.SetChecked("EventsShowLogMenu", !(_mainMenu?.IsChecked("EventsShowLogMenu") == true)); if (cmd == "eventsshowlogkey" || cmd == "eventsshowlogmenu") { PanelConcurrentSetVisibleIfRequired(PanelConcurrentCheckIsVisible()); } + + if (cmd == "scripteditlaunch" || cmd.StartsWith("launchscript")) + { + CommandBinding_ScriptEditLaunch(cmd, menuItem); + } } public void CommandBinding_TDImport() @@ -1608,7 +1623,7 @@ public void CommandBinding_TDImport() public bool PanelConcurrentCheckIsVisible() { - return _mainMenu?.IsChecked("WorkspaceEventsShowLog") == true; + return _mainMenu?.IsChecked("EventsShowLogMenu") == true; } public void PanelConcurrentSetVisibleIfRequired( @@ -3787,5 +3802,54 @@ public void CommandBinding_ExportSMD() RedrawAllAasxElements(); //----------------------------------- } + + protected string _currentScriptText = ""; + + public void CommandBinding_ScriptEditLaunch(string cmd, AasxMenuItemBase menuItem) + { + if (cmd == "scripteditlaunch") + { + // trivial things + if (!_packageCentral.MainAvailable) + { + MessageBoxFlyoutShow( + "An AASX package needs to be available", "Error" + , AnyUiMessageBoxButton.OK, AnyUiMessageBoxImage.Exclamation); + return; + } + + // prompt for the script + var uc = new TextEditorFlyout(); + uc.DiaData.MimeType = "application/C#"; + uc.DiaData.Caption = "Edit script to be launched .."; + uc.DiaData.Presets = Options.Curr.ScriptPresets; + uc.DiaData.Text = _currentScriptText; + this.StartFlyoverModal(uc); + _currentScriptText = uc.DiaData.Text; + if (uc.DiaData.Result && uc.DiaData.Text.HasContent()) + { + try + { + // executing + AasxScript.StartEnginBackground(uc.DiaData.Text); + + // redisplay; add to "normal" event quoue + DispEditEntityPanel.AddWishForOutsideAction(new AnyUiLambdaActionRedrawAllElements(null)); + } + catch (Exception ex) + { + Log.Singleton.Error(ex, "when executing script"); + } + } + } + + for (int i=0;i<9; i++) + if (cmd == $"launchscript{i}" + && Options.Curr.ScriptPresets != null + && i < Options.Curr.ScriptPresets.Count) + { + ; + } + } } } diff --git a/src/AasxPackageExplorer/MainWindow.xaml b/src/AasxPackageExplorer/MainWindow.xaml index f41595b39..7b7f9bece 100644 --- a/src/AasxPackageExplorer/MainWindow.xaml +++ b/src/AasxPackageExplorer/MainWindow.xaml @@ -30,6 +30,7 @@ + @@ -176,6 +178,7 @@ + + diff --git a/src/AasxPackageExplorer/MainWindow.xaml.cs b/src/AasxPackageExplorer/MainWindow.xaml.cs index b7b5af677..964a74837 100644 --- a/src/AasxPackageExplorer/MainWindow.xaml.cs +++ b/src/AasxPackageExplorer/MainWindow.xaml.cs @@ -683,7 +683,7 @@ private async void Window_Loaded(object sender, RoutedEventArgs e) // main menu _mainMenu = new AasxMenuWpf(); - _mainMenu.LoadAndRender(CreateMainMenu(), MenuMain); + _mainMenu.LoadAndRender(CreateMainMenu(), MenuMain, this.CommandBindings, this.InputBindings); var cmd = new RoutedUICommand("Test", "NameOfTest", typeof(string)); @@ -2276,27 +2276,26 @@ IEnumerable Prints() } } - private void CommandBinding_Executed(object sender, ExecutedRoutedEventArgs e) - { - // decode - var ruic = e?.Command as RoutedUICommand; - if (ruic == null) - return; - var cmd = ruic.Text?.Trim().ToLower(); + //private void CommandBinding_Executed(object sender, ExecutedRoutedEventArgs e) + //{ + // // decode + // var ruic = e?.Command as RoutedUICommand; + // if (ruic == null) + // return; + // var cmd = ruic.Text?.Trim().ToLower(); - // see: MainWindow.CommandBindings.cs - try - { - this.CommandBinding_GeneralDispatch(cmd); - } - catch (Exception err) - { - throw new InvalidOperationException( - $"Failed to execute the command {cmd}: {err}"); - } - - } + // // see: MainWindow.CommandBindings.cs + // try + // { + // this.CommandBinding_GeneralDispatch(cmd); + // } + // catch (Exception err) + // { + // throw new InvalidOperationException( + // $"Failed to execute the command {cmd}: {err}"); + // } + //} private void DisplayElements_SelectedItemChanged(object sender, EventArgs e) { diff --git a/src/AasxPackageExplorer/options-debug.MIHO.json b/src/AasxPackageExplorer/options-debug.MIHO.json index 601167a82..3683583de 100644 --- a/src/AasxPackageExplorer/options-debug.MIHO.json +++ b/src/AasxPackageExplorer/options-debug.MIHO.json @@ -1,74 +1,74 @@ { - /* "AasxToLoad" : "sample-techdata.aasx", */ - /* "AasxToLoad": "..\\..\\..\\..\\AasxToolkit\\bin\\Debug\\sample.aasx", */ - /* "AasxToLoad": "sample-hsu.aasx", */ - /* "AasxToLoad": "MTPsample.aasx", */ - /* "AasxToLoad": "sample-generated-modified.aasx", */ - /* "AasxToLoad": "..\\..\\..\\..\\..\\..\\aasx-sample-data\\Develop_AAS\\Sample-Fluiddraw.aasx", */ - /* "AasxRepositoryFn": "..\\..\\..\\..\\..\\Sample_AAS\\aasxrepo-new.json", */ - /* "AasxRepositoryFn": "C:\\Users\\miho\\Desktop\\201112_Festo_AAS_Demo_Koffer\\repo\\FestoDemoBox-RepositoryViaHTTP.json", */ - "AasxRepositoryFn": "C:\\Users\\miho\\Desktop\\201112_Festo_AAS_Demo_Koffer\\repo3\\Festo-DemoBox-repo-local.json", - /* "AasxRepositoryFn": "C:\\Users\\miho\\Desktop\\201112_Festo_AAS_Demo_Koffer\\Festo_Demo_Box\\Festo-DemoBox-repo-CPX_E.json", */ - /* "AasxRepositoryFn": "C:\\Users\\miho\\Desktop\\new-aasx-repo.json", */ - /* "AasxToLoad": "C:\\Users\\miho\\Desktop\\200806_Sample_Repo_with_Fluidic_Plan\\MTPsample.aasx", */ - /* "AasxToLoad": "http://localhost:51310/server/getaasx/0", */ - /* "AasxToLoad": "C:\\MIHO\\Develop\\Aasx\\AasxFesto\\AasxFesto\\AasxFctTool\\bin\\Debug\\net472\\test.aasx", */ - /* "AasxToLoad": "C:\\Users\\miho\\Desktop\\Festo_SPAU_VR3_UA.aasx", */ - "AasxToLoad": "C:\\MIHO\\Develop\\Aasx\\repo\\Festo_SPAU_VR3.aasx", - "WindowLeft": -1, - "WindowTop": -1, - "WindowWidth": 900, - "WindowHeight": 600, - "WindowMaximized": false, - "TemplateIdAas": "www.example.com/ids/aas/DDDD_DDDD_DDDD_DDDD", - "TemplateIdAsset": "www.example.com/ids/asset/DDDD_DDDD_DDDD_DDDD", - "TemplateIdSubmodelInstance": "www.example.com/ids/sm/DDDD_DDDD_DDDD_DDDD", - "TemplateIdSubmodelTemplate": "www.example.com/ids/sm/DDDD_DDDD_DDDD_DDDD", - "TemplateIdConceptDescription": "www.example.com/ids/cd/DDDD_DDDD_DDDD_DDDD", - "EclassDir": ".\\eclass\\", - /* "LogoFile": "SpecPI40_t.png", */ - "LogoFile": "SpecPI40_t.png", - "QualifiersFile": "qualifier-presets.json", - "ContentHome": "https://github.com/admin-shell/io/blob/master/README.md", - "UseFlyovers": true, - "SplashTime": 1000, - "InternalBrowser": false, - "EclassTwoPass": true, - "BackupDir": ".\\backup", - "BackupFiles": 10, - "RestServerHost": "localhost", - "RestServerPort": "1111", - "WriteDefaultOptionsFN": null /* "options-written.json" */, - "IndirectLoadSave": true, - "AccentColors": {}, - "LoadWithoutPrompt": true, - "ShowIdAsIri": false, - "VerboseConnect": true, - "DefaultStayConnected": true, - "DefaultUpdatePeriod": 1000, - "StayConnectOptions": "REST-QUEUE", // SIM - /* "DefaultConnectRepositoryLocation": "http://localhost:51310", */ - /* "DefaultConnectRepositoryLocation": "http://admin-shell-io.com:51510", */ - /* "DefaultConnectRepositoryLocation": "https://admin-shell-io.com:51711", */ - "DefaultConnectRepositoryLocation": "https://admin-shell-io.com/51711", - "MqttPublisherOptions": { - "BrokerUrl": "192.168.178.97:1883", - "MqttRetain": false, - "EnableFirstPublish": true, - "FirstTopicAAS": "AAS", - "FirstTopicSubmodel": "{aas}/Submodel_{sm}", - "EnableEventPublish": true, - "EventTopic": "Events/aas/{aas}/sm/{sm}/{path}", - "SingleValuePublish": true, - "SingleValueFirstTime": true, - "SingleValueTopic": "Values/aas/{aas}/sm/{sm}/{path}" - }, - "Remarks": [ - "This JSON file might contain special settings for debugging purposes of Michael Hoffmeisters setup." - ], - "PluginPrefer" : "ANYUI", - "PluginDll": [ - /* + /* "AasxToLoad" : "sample-techdata.aasx", */ + /* "AasxToLoad": "..\\..\\..\\..\\AasxToolkit\\bin\\Debug\\sample.aasx", */ + /* "AasxToLoad": "sample-hsu.aasx", */ + /* "AasxToLoad": "MTPsample.aasx", */ + /* "AasxToLoad": "sample-generated-modified.aasx", */ + /* "AasxToLoad": "..\\..\\..\\..\\..\\..\\aasx-sample-data\\Develop_AAS\\Sample-Fluiddraw.aasx", */ + /* "AasxRepositoryFn": "..\\..\\..\\..\\..\\Sample_AAS\\aasxrepo-new.json", */ + /* "AasxRepositoryFn": "C:\\Users\\miho\\Desktop\\201112_Festo_AAS_Demo_Koffer\\repo\\FestoDemoBox-RepositoryViaHTTP.json", */ + "AasxRepositoryFn": "C:\\Users\\miho\\Desktop\\201112_Festo_AAS_Demo_Koffer\\repo3\\Festo-DemoBox-repo-local.json", + /* "AasxRepositoryFn": "C:\\Users\\miho\\Desktop\\201112_Festo_AAS_Demo_Koffer\\Festo_Demo_Box\\Festo-DemoBox-repo-CPX_E.json", */ + /* "AasxRepositoryFn": "C:\\Users\\miho\\Desktop\\new-aasx-repo.json", */ + /* "AasxToLoad": "C:\\Users\\miho\\Desktop\\200806_Sample_Repo_with_Fluidic_Plan\\MTPsample.aasx", */ + /* "AasxToLoad": "http://localhost:51310/server/getaasx/0", */ + /* "AasxToLoad": "C:\\MIHO\\Develop\\Aasx\\AasxFesto\\AasxFesto\\AasxFctTool\\bin\\Debug\\net472\\test.aasx", */ + /* "AasxToLoad": "C:\\Users\\miho\\Desktop\\Festo_SPAU_VR3_UA.aasx", */ + "AasxToLoad": "C:\\MIHO\\Develop\\Aasx\\repo\\Festo_SPAU_VR3.aasx", + "WindowLeft": -1, + "WindowTop": -1, + "WindowWidth": 900, + "WindowHeight": 600, + "WindowMaximized": false, + "TemplateIdAas": "www.example.com/ids/aas/DDDD_DDDD_DDDD_DDDD", + "TemplateIdAsset": "www.example.com/ids/asset/DDDD_DDDD_DDDD_DDDD", + "TemplateIdSubmodelInstance": "www.example.com/ids/sm/DDDD_DDDD_DDDD_DDDD", + "TemplateIdSubmodelTemplate": "www.example.com/ids/sm/DDDD_DDDD_DDDD_DDDD", + "TemplateIdConceptDescription": "www.example.com/ids/cd/DDDD_DDDD_DDDD_DDDD", + "EclassDir": ".\\eclass\\", + /* "LogoFile": "SpecPI40_t.png", */ + "LogoFile": "SpecPI40_t.png", + "QualifiersFile": "qualifier-presets.json", + "ContentHome": "https://github.com/admin-shell/io/blob/master/README.md", + "UseFlyovers": true, + "SplashTime": 1000, + "InternalBrowser": false, + "EclassTwoPass": true, + "BackupDir": ".\\backup", + "BackupFiles": 10, + "RestServerHost": "localhost", + "RestServerPort": "1111", + "WriteDefaultOptionsFN": null /* "options-written.json" */, + "IndirectLoadSave": true, + "AccentColors": {}, + "LoadWithoutPrompt": true, + "ShowIdAsIri": false, + "VerboseConnect": true, + "DefaultStayConnected": true, + "DefaultUpdatePeriod": 1000, + "StayConnectOptions": "REST-QUEUE", // SIM + /* "DefaultConnectRepositoryLocation": "http://localhost:51310", */ + /* "DefaultConnectRepositoryLocation": "http://admin-shell-io.com:51510", */ + /* "DefaultConnectRepositoryLocation": "https://admin-shell-io.com:51711", */ + "DefaultConnectRepositoryLocation": "https://admin-shell-io.com/51711", + "MqttPublisherOptions": { + "BrokerUrl": "192.168.178.97:1883", + "MqttRetain": false, + "EnableFirstPublish": true, + "FirstTopicAAS": "AAS", + "FirstTopicSubmodel": "{aas}/Submodel_{sm}", + "EnableEventPublish": true, + "EventTopic": "Events/aas/{aas}/sm/{sm}/{path}", + "SingleValuePublish": true, + "SingleValueFirstTime": true, + "SingleValueTopic": "Values/aas/{aas}/sm/{sm}/{path}" + }, + "Remarks": [ + "This JSON file might contain special settings for debugging purposes of Michael Hoffmeisters setup." + ], + "PluginPrefer": "ANYUI", + "PluginDll": [ + /* { "Path": "..\\..\\..\\..\\..\\AasxPluginUaNetServer\\bin\\Debug\\net472\\AasxPluginUaNetServer.dll", "Args": [ @@ -86,50 +86,50 @@ "Args": [], "Options": null }, */ - { - "Path": "..\\..\\..\\..\\..\\AasxPluginBomStructure\\bin\\Debug\\net472\\AasxPluginBomStructure.dll", - "Args": [] - }, - { - "Path": "..\\..\\..\\..\\..\\AasxPluginExportTable\\bin\\Debug\\net472\\AasxPluginExportTable.dll", - "Args": [] - }, - { - "Path": "..\\..\\..\\..\\..\\AasxPluginWebBrowser\\bin\\x64\\Debug\\net472\\AasxPluginWebBrowser.dll", - "Args": [] - }, - { - "Path": "..\\..\\..\\..\\..\\AasxPluginTechnicalData\\bin\\Debug\\net472\\AasxPluginTechnicalData.dll", - "Args": [] - }, - { - "Path": "..\\..\\..\\..\\..\\AasxPluginMtpViewer\\bin\\Debug\\net472\\AasxPluginMtpViewer.dll", - "Args": [] - }, - { - "Path": "..\\..\\..\\..\\..\\AasxPluginDocumentShelf\\bin\\Debug\\net472\\AasxPluginDocumentShelf.dll", - "Args": [] - }, - { - "Path": "..\\..\\..\\..\\..\\AasxPluginGenericForms\\bin\\Debug\\net472\\AasxPluginGenericForms.dll", - "Args": [] - }, - { - "Path": "..\\..\\..\\..\\..\\AasxPluginImageMap\\bin\\Debug\\net472\\AasxPluginImageMap.dll", - "Args": [] - }, - { - "Path": "..\\..\\..\\..\\..\\AasxPluginKnownSubmodels\\bin\\Debug\\net472\\AasxPluginKnownSubmodels.dll", - "Args": [] - }, - { - "Path": "..\\..\\..\\..\\..\\AasxPluginPlotting\\bin\\Debug\\net472\\AasxPluginPlotting.dll", - "Args": [] - }, - { - "Path": "..\\..\\..\\..\\..\\AasxPluginAdvancedTextEditor\\bin\\Debug\\net472\\AasxPluginAdvancedTextEditor.dll", - "Args": [] - } /*, + { + "Path": "..\\..\\..\\..\\..\\AasxPluginBomStructure\\bin\\Debug\\net472\\AasxPluginBomStructure.dll", + "Args": [] + }, + { + "Path": "..\\..\\..\\..\\..\\AasxPluginExportTable\\bin\\Debug\\net472\\AasxPluginExportTable.dll", + "Args": [] + }, + { + "Path": "..\\..\\..\\..\\..\\AasxPluginWebBrowser\\bin\\x64\\Debug\\net472\\AasxPluginWebBrowser.dll", + "Args": [] + }, + { + "Path": "..\\..\\..\\..\\..\\AasxPluginTechnicalData\\bin\\Debug\\net472\\AasxPluginTechnicalData.dll", + "Args": [] + }, + { + "Path": "..\\..\\..\\..\\..\\AasxPluginMtpViewer\\bin\\Debug\\net472\\AasxPluginMtpViewer.dll", + "Args": [] + }, + { + "Path": "..\\..\\..\\..\\..\\AasxPluginDocumentShelf\\bin\\Debug\\net472\\AasxPluginDocumentShelf.dll", + "Args": [] + }, + { + "Path": "..\\..\\..\\..\\..\\AasxPluginGenericForms\\bin\\Debug\\net472\\AasxPluginGenericForms.dll", + "Args": [] + }, + { + "Path": "..\\..\\..\\..\\..\\AasxPluginImageMap\\bin\\Debug\\net472\\AasxPluginImageMap.dll", + "Args": [] + }, + { + "Path": "..\\..\\..\\..\\..\\AasxPluginKnownSubmodels\\bin\\Debug\\net472\\AasxPluginKnownSubmodels.dll", + "Args": [] + }, + { + "Path": "..\\..\\..\\..\\..\\AasxPluginPlotting\\bin\\Debug\\net472\\AasxPluginPlotting.dll", + "Args": [] + }, + { + "Path": "..\\..\\..\\..\\..\\AasxPluginAdvancedTextEditor\\bin\\Debug\\net472\\AasxPluginAdvancedTextEditor.dll", + "Args": [] + } /*, // Festo specific from here on { "Path": "..\\..\\..\\..\\..\\..\\..\\AasxFesto\\AasxFesto\\AasxPluginFluiddrawViewer\\bin\\Debug\\AasxPluginFluiddrawViewer.dll", @@ -140,123 +140,134 @@ "Args": [] } */ - ], - "SecureConnectPresets": [ - { - "Name": "Internet Demo", - "Protocol": { - "Value": "Azure", - "Choices": [ - "Unprotected", - "OpenID Connect", - "Azure" - ] - }, - "AuthorizationServer": { - "Value": "http://auth1.phoenix.com", - "Choices": [ - "http://auth2.phoenix.com", - "http://auth1.phoenix.com", - "http://auth3.phoenix.com" - ] - }, - "AasServer": { - "Value": "http://aas2.phoenix.com", - "Choices": [ - "http://aas3.phoenix.com", - "http://aas2.phoenix.com", - "http://aas1.phoenix.com" - ] - }, - "CertificateFile": { - "Value": "wieso.txt", - "Choices": [ - "C:\\FILE1.TXT", - "C:\\FILE2.TXT", - "C:\\FILE3_dsnchdsbcjbdsjhcbdsjhcbjdsbcjhdsbhjcbdshjcjdshjhcbjhdsbcjhcdsjhbcdsbhjcshjdbcjhdsbjcbdshjcbhsjdbcdsbchjdscbhjdsbhcjhdsb.TXT" - ] - }, - "Password": { - "Value": "sescret", - "Choices": [ - "geheim", - "hidden", - "Pand0ra" - ] - } - }, - { - "Name": "Only Intranet", - "Protocol": { - "Value": "Unprotected", - "Choices": [ - "Unprotected", - "OpenID Connect", - "Azure" - ] - }, - "AuthorizationServer": { - "Value": "http://auth3.phoenix.com", - "Choices": [ - "http://auth2.phoenix.com", - "http://auth1.phoenix.com", - "http://auth3.phoenix.com" - ] - }, - "AasServer": { - "Value": "http://aas1.phoenix.com", - "Choices": [ - "http://aas3.phoenix.com", - "http://aas2.phoenix.com", - "http://aas1.phoenix.com" - ] - }, - "CertificateFile": { - "Value": "wieso22.txt", - "Choices": [ - "C:\\FILE1.TXT", - "C:\\FILE2.TXT", - "C:\\FILE3_dsnchdsbcjbdsjhcbdsjhcbjdsbcjhdsbhjcbdshjcjdshjhcbjhdsbcjhcdsjhbcdsbhjcshjdbcjhdsbjcbdshjcbhsjdbcdsbchjdscbhjdsbhcjhdsb.TXT" - ] - } - } - ], - "IntegratedConnectPresets": [ - { - "Name": "Empty", - "Location": "", - "Username": "", - "Password": "" - }, - { - "Name": "First of admin-shell-io.com", - "Location": "http://admin-shell-io.com:51310/server/getaasx/0", - "Username": "", - "Password": "", - "StayConnected": true - }, - { - "Name": "DEMO", - "Location": "http://demo/", - "Username": "Foo", - "Password": "Bar", - "AutoClose": false - }, - { - "Name": "Long loading of admin-shell-io.com", - "Location": "http://admin-shell-io.com:51410/server/getaasx/3", - "Username": "", - "Password": "", - "StayConnected": true, - "AutoClose": false - }, - { - "Name": "Latest testing", - "Location": "http://admin-shell-io.com:52001/server/getaasx/0", - "Username": "", - "Password": "", - "StayConnected": true, - "AutoClose": false - } - ] + ], + "SecureConnectPresets": [ + { + "Name": "Internet Demo", + "Protocol": { + "Value": "Azure", + "Choices": [ + "Unprotected", + "OpenID Connect", + "Azure" + ] + }, + "AuthorizationServer": { + "Value": "http://auth1.phoenix.com", + "Choices": [ + "http://auth2.phoenix.com", + "http://auth1.phoenix.com", + "http://auth3.phoenix.com" + ] + }, + "AasServer": { + "Value": "http://aas2.phoenix.com", + "Choices": [ + "http://aas3.phoenix.com", + "http://aas2.phoenix.com", + "http://aas1.phoenix.com" + ] + }, + "CertificateFile": { + "Value": "wieso.txt", + "Choices": [ + "C:\\FILE1.TXT", + "C:\\FILE2.TXT", + "C:\\FILE3_dsnchdsbcjbdsjhcbdsjhcbjdsbcjhdsbhjcbdshjcjdshjhcbjhdsbcjhcdsjhbcdsbhjcshjdbcjhdsbjcbdshjcbhsjdbcdsbchjdscbhjdsbhcjhdsb.TXT" + ] + }, + "Password": { + "Value": "sescret", + "Choices": [ + "geheim", + "hidden", + "Pand0ra" + ] + } + }, + { + "Name": "Only Intranet", + "Protocol": { + "Value": "Unprotected", + "Choices": [ + "Unprotected", + "OpenID Connect", + "Azure" + ] + }, + "AuthorizationServer": { + "Value": "http://auth3.phoenix.com", + "Choices": [ + "http://auth2.phoenix.com", + "http://auth1.phoenix.com", + "http://auth3.phoenix.com" + ] + }, + "AasServer": { + "Value": "http://aas1.phoenix.com", + "Choices": [ + "http://aas3.phoenix.com", + "http://aas2.phoenix.com", + "http://aas1.phoenix.com" + ] + }, + "CertificateFile": { + "Value": "wieso22.txt", + "Choices": [ + "C:\\FILE1.TXT", + "C:\\FILE2.TXT", + "C:\\FILE3_dsnchdsbcjbdsjhcbdsjhcbjdsbcjhdsbhjcbdshjcjdshjhcbjhdsbcjhcdsjhbcdsbhjcshjdbcjhdsbjcbdshjcbhsjdbcdsbchjdscbhjdsbhcjhdsb.TXT" + ] + } + } + ], + "IntegratedConnectPresets": [ + { + "Name": "Empty", + "Location": "", + "Username": "", + "Password": "" + }, + { + "Name": "First of admin-shell-io.com", + "Location": "http://admin-shell-io.com:51310/server/getaasx/0", + "Username": "", + "Password": "", + "StayConnected": true + }, + { + "Name": "DEMO", + "Location": "http://demo/", + "Username": "Foo", + "Password": "Bar", + "AutoClose": false + }, + { + "Name": "Long loading of admin-shell-io.com", + "Location": "http://admin-shell-io.com:51410/server/getaasx/3", + "Username": "", + "Password": "", + "StayConnected": true, + "AutoClose": false + }, + { + "Name": "Latest testing", + "Location": "http://admin-shell-io.com:52001/server/getaasx/0", + "Username": "", + "Password": "", + "StayConnected": true, + "AutoClose": false + } + ], + "FontSizePreset" : 16, + "ScriptPresets": [ + { + "Name": "Test1", + "Text": "WriteLine(\"Hallo\");" + }, + { + "Name": "Test2", + "Text": "c=1;\nd=2;" + } + ] } diff --git a/src/AasxPackageLogic/LICENSE.txt b/src/AasxPackageLogic/LICENSE.txt index cd3ff93ed..94281805d 100644 --- a/src/AasxPackageLogic/LICENSE.txt +++ b/src/AasxPackageLogic/LICENSE.txt @@ -94,6 +94,9 @@ Glob (https://www.nuget.org/packages/Glob/) is licensed under the MIT license The Magick.NET library is licensed under Apache License 2.0 (Apache-2.0, see below). +The SSharp.NET library (https://github.com/PetroProtsyk/SSharp) is licensed +under Apache License 2.0 (Apache-2.0, see below). + ------------------------------------------------------------------------------- @@ -1253,6 +1256,212 @@ With respect to Magick.NET Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +With respect to SSharp.NET library +================================== + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/src/AasxPackageLogic/Options.cs b/src/AasxPackageLogic/Options.cs index 6840d2918..a99022d0f 100644 --- a/src/AasxPackageLogic/Options.cs +++ b/src/AasxPackageLogic/Options.cs @@ -415,6 +415,13 @@ public AnyUiColor GetColor(ColorNames c) [OptionDescription(Description = "Preset shown in the file repo connect to AAS repository dialogue")] public string DefaultConnectRepositoryLocation = ""; + [OptionDescription(Description ="List of tuples (Name, Text) with presets for available scripts.")] + public List ScriptPresets; + + [OptionDescription(Description = "Determins if user is prompted before strarting a script..", + Cmd = "-launch-without-prompt")] + public bool LaunchWithoutPrompt = false; + [OptionDescription(Description = "May contain different string-based options for stay connect, " + "event update mechanisms")] public string StayConnectOptions = ""; diff --git a/src/AasxPluginAdvancedTextEditor/LICENSE.TXT b/src/AasxPluginAdvancedTextEditor/LICENSE.TXT index cd3ff93ed..94281805d 100644 --- a/src/AasxPluginAdvancedTextEditor/LICENSE.TXT +++ b/src/AasxPluginAdvancedTextEditor/LICENSE.TXT @@ -94,6 +94,9 @@ Glob (https://www.nuget.org/packages/Glob/) is licensed under the MIT license The Magick.NET library is licensed under Apache License 2.0 (Apache-2.0, see below). +The SSharp.NET library (https://github.com/PetroProtsyk/SSharp) is licensed +under Apache License 2.0 (Apache-2.0, see below). + ------------------------------------------------------------------------------- @@ -1253,6 +1256,212 @@ With respect to Magick.NET Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +With respect to SSharp.NET library +================================== + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/src/AasxPluginAdvancedTextEditor/UserControlAdvancedTextEditor.xaml b/src/AasxPluginAdvancedTextEditor/UserControlAdvancedTextEditor.xaml index 42c1cd04c..d967cff7e 100644 --- a/src/AasxPluginAdvancedTextEditor/UserControlAdvancedTextEditor.xaml +++ b/src/AasxPluginAdvancedTextEditor/UserControlAdvancedTextEditor.xaml @@ -7,7 +7,8 @@ xmlns:forms="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms" xmlns:local="clr-namespace:AasxPluginAdvancedTextEditor" mc:Ignorable="d" - d:DesignHeight="450" d:DesignWidth="800" Loaded="UserControl_Loaded"> + d:DesignHeight="450" d:DesignWidth="800" Loaded="UserControl_Loaded" + PreviewKeyDown="UserControl_PreviewKeyDown"> + + + + + + + diff --git a/src/AasxPackageExplorer/MessageReportWindow.xaml.cs b/src/AasxPackageExplorer/MessageReportWindow.xaml.cs index 47a671088..f0c2adf02 100644 --- a/src/AasxPackageExplorer/MessageReportWindow.xaml.cs +++ b/src/AasxPackageExplorer/MessageReportWindow.xaml.cs @@ -8,8 +8,11 @@ This source code may use other Open Source software components (see LICENSE.txt) */ using System.Collections.Generic; +using System.Drawing; using System.Windows; +using System.Windows.Controls; using System.Windows.Documents; +using System.Windows.Media; using AasxIntegrationBase; using AasxPackageLogic; @@ -23,12 +26,49 @@ public MessageReportWindow(IEnumerable storedPrints, string windowT if (windowTitle != null) this.Title = windowTitle; + FlowDocViewer.Document = new FlowDocument(); + //FlowDocViewer.Document.FontFamily = new System.Windows.Media.FontFamily("Lucida Console"); + //FlowDocViewer.Document.FontSize = 12; + //FlowDocViewer.Document.Background = System.Windows.Media.Brushes.LightGray; + + FlowDocViewer.Document.PageWidth = 1000; + foreach (var sp in storedPrints) { +#if __disabled // Add to rich text box AasxWpfBaseUtils.StoredPrintToRichTextBox( this.RichTextTextReport, sp, AasxWpfBaseUtils.DarkPrintColors, linkClickHandler: link_Click); +#endif + // Add to flow document + AasxWpfBaseUtils.StoredPrintToFloqDoc( + FlowDocViewer.Document, sp, AasxWpfBaseUtils.DarkPrintColors, + linkClickHandler: link_Click); + } + } + + protected ScrollViewer FindScrollViewer(FlowDocumentScrollViewer flowDocumentScrollViewer) + { + if (VisualTreeHelper.GetChildrenCount(flowDocumentScrollViewer) == 0) + { + return null; + } + + // Border is the first child of first child of a ScrolldocumentViewer + DependencyObject firstChild = VisualTreeHelper.GetChild(flowDocumentScrollViewer, 0); + if (firstChild == null) + { + return null; + } + + Decorator border = VisualTreeHelper.GetChild(firstChild, 0) as Decorator; + + if (border == null) + { + return null; } + + return border.Child as ScrollViewer; } public MessageReportWindow(string fullText, string windowTitle = null) @@ -37,8 +77,12 @@ public MessageReportWindow(string fullText, string windowTitle = null) if (windowTitle != null) this.Title = windowTitle; +#if __disabled this.RichTextTextReport.Document.Blocks.Clear(); this.RichTextTextReport.Document.Blocks.Add(new Paragraph(new Run(fullText))); +#endif + this.FlowDocViewer.Document.Blocks.Clear(); + this.FlowDocViewer.Document.Blocks.Add(new Paragraph(new Run(fullText))); } protected void link_Click(object sender, RoutedEventArgs e) @@ -54,6 +98,13 @@ protected void link_Click(object sender, RoutedEventArgs e) System.Diagnostics.Process.Start(uri); } + private void Window_Loaded(object sender, RoutedEventArgs e) + { + // scroll + FindScrollViewer(FlowDocViewer)?.ScrollToEnd(); + } + +#if __disabled private void ButtonCopyToClipboard_Click(object sender, RoutedEventArgs e) { var tr = new TextRange( @@ -63,6 +114,22 @@ private void ButtonCopyToClipboard_Click(object sender, RoutedEventArgs e) Clipboard.SetText(tr.Text); this.DialogResult = true; } +#endif + + public void AddStoredPrint(StoredPrint sp) + { + // access + if (FlowDocViewer?.Document == null || sp == null) + return; + + // Add to flow document + AasxWpfBaseUtils.StoredPrintToFloqDoc( + FlowDocViewer.Document, sp, AasxWpfBaseUtils.DarkPrintColors, + linkClickHandler: link_Click); + + // scroll + FindScrollViewer(FlowDocViewer)?.ScrollToEnd(); + } } } diff --git a/src/AasxPackageExplorer/options-debug.MIHO.json b/src/AasxPackageExplorer/options-debug.MIHO.json index c3ea66c7a..3c3580319 100644 --- a/src/AasxPackageExplorer/options-debug.MIHO.json +++ b/src/AasxPackageExplorer/options-debug.MIHO.json @@ -14,8 +14,8 @@ /* "AasxToLoad": "http://localhost:51310/server/getaasx/0", */ /* "AasxToLoad": "C:\\MIHO\\Develop\\Aasx\\AasxFesto\\AasxFesto\\AasxFctTool\\bin\\Debug\\net472\\test.aasx", */ /* "AasxToLoad": "C:\\Users\\miho\\Desktop\\Festo_SPAU_VR3_UA.aasx", */ - // "AasxToLoad": "C:\\MIHO\\Develop\\Aasx\\repo\\Festo_SPAU_VR3.aasx", - "AasxToLoad": "C:\\HOMI\\Develop\\Aasx\\repo\\01_Festo_SPAU_VR3.aasx", + "AasxToLoad": "C:\\MIHO\\Develop\\Aasx\\repo\\Festo_SPAU_VR3.aasx", + // "AasxToLoad": "C:\\HOMI\\Develop\\Aasx\\repo\\01_Festo_SPAU_VR3.aasx", "WindowLeft": -1, "WindowTop": -1, "WindowWidth": 900, From 23f9ad5444235a2b27127e76f982d3802f713dbc Mon Sep 17 00:00:00 2001 From: MichaHofft Date: Fri, 11 Nov 2022 07:56:38 +0100 Subject: [PATCH 07/23] Update sources * message report buttons --- .../MessageReportWindow.xaml | 13 +++++-- .../MessageReportWindow.xaml.cs | 35 ++++++++++++++++--- 2 files changed, 41 insertions(+), 7 deletions(-) diff --git a/src/AasxPackageExplorer/MessageReportWindow.xaml b/src/AasxPackageExplorer/MessageReportWindow.xaml index 4ad7249c9..7ccf67e14 100644 --- a/src/AasxPackageExplorer/MessageReportWindow.xaml +++ b/src/AasxPackageExplorer/MessageReportWindow.xaml @@ -20,8 +20,8 @@ - - + + @@ -41,7 +41,14 @@ --> - + + public AdminShell.SubmodelElementWrapper.AdequateElementEnum SelectAdequateEnum( string caption, AdminShell.SubmodelElementWrapper.AdequateElementEnum[] excludeValues = null, - AdminShell.SubmodelElementWrapper.AdequateElementEnum[] includeValues = null) + AdminShell.SubmodelElementWrapper.AdequateElementEnum[] includeValues = null, + AasxMenuActionTicket ticket = null) { // prepare a list var fol = new List(); foreach (var en in AdminShell.SubmodelElementWrapper.GetAdequateEnums(excludeValues, includeValues)) fol.Add(new AnyUiDialogueListItem(AdminShell.SubmodelElementWrapper.GetAdequateName(en), en)); + // argument in ticket? + var arg = ticket?["Kind"] as string; + if (arg != null) + foreach (var foli in fol) + if (foli.Text.Trim().ToLower() == arg.Trim().ToLower()) + return (AdminShell.SubmodelElementWrapper.AdequateElementEnum) foli.Tag; + // prompt for this list var uc = new AnyUiDialogueDataSelectFromList( caption: caption); @@ -1787,7 +1795,7 @@ public void QualifierHelper( repo: repo, superMenu: superMenu, ticketMenu: new AasxMenu() - .AddAction("qualifier-blank", "Add blink", + .AddAction("qualifier-blank", "Add blank", "Adds an empty qualifier.") .AddAction("qualifier-preset", "Add preset", "Adds an qualifier given from the list of presets.") diff --git a/src/AasxPackageLogic/DispEditHelperCopyPaste.cs b/src/AasxPackageLogic/DispEditHelperCopyPaste.cs index 2e40356ea..426415da8 100644 --- a/src/AasxPackageLogic/DispEditHelperCopyPaste.cs +++ b/src/AasxPackageLogic/DispEditHelperCopyPaste.cs @@ -685,7 +685,8 @@ public void DispSubmodelCutCopyPasteHelper( AdminShell.Submodel sm, string label = "Buffer:", Func checkEquality = null, - Action extraAction = null) where T : new() + Action extraAction = null, + AasxMenu superMenu = null) where T : new() { // access if (parentContainer == null || cpbInternal == null || sm == null || cloneEntity == null) @@ -698,10 +699,27 @@ public void DispSubmodelCutCopyPasteHelper( // ReSharper enable RedundantCast // use an action - this.AddAction( + AddAction( stack, label, - new[] { "Cut", "Copy", "Paste above", "Paste below", "Paste into" }, repo, - (buttonNdx) => + repo: repo, + superMenu: superMenu, + ticketMenu: new AasxMenu() + .AddAction("aas-elem-cut", "Cut", + "Removes the currently selected element and places it in the paste buffer.", + inputGesture: "Ctrl+X") + .AddAction("aas-elem-copy", "Copy", + "Places the currently selected element in the paste buffer.", + inputGesture: "Ctrl+C") + .AddAction("aas-elem-paste-above", "Paste above", + "Adds the content of the paste buffer before (above) the currently selected element.", + inputGesture: "Ctrl+Shift+V") + .AddAction("aas-elem-paste-below", "Paste below", + "Adds the content of the paste buffer after (below) the currently selected element.", + inputGesture: "Ctrl+V") + .AddAction("aas-elem-paste-into", "Paste into", + "Adds the content of the paste buffer into the currently selected collection-like element.", + inputGesture: "Ctrl+Alt+V"), + ticketAction: (buttonNdx, ticket) => { if (buttonNdx == 0 || buttonNdx == 1) { @@ -909,7 +927,8 @@ public void DispPlainIdentifiableCutCopyPasteHelper( Func cloneEntity, string label = "Buffer:", Func checkPasteInfo = null, - Func doPasteInto = null) + Func doPasteInto = null, + AasxMenu superMenu = null) where T : AdminShell.Identifiable, new() { // access @@ -917,10 +936,27 @@ public void DispPlainIdentifiableCutCopyPasteHelper( return; // use an action - this.AddAction( + AddAction( stack, label, - new[] { "Cut", "Copy", "Paste above", "Paste below", "Paste into" }, repo, - (buttonNdx) => + repo: repo, + superMenu: superMenu, + ticketMenu: new AasxMenu() + .AddAction("aas-elem-cut", "Cut", + "Removes the currently selected element and places it in the paste buffer.", + inputGesture: "Ctrl+X") + .AddAction("aas-elem-copy", "Copy", + "Places the currently selected element in the paste buffer.", + inputGesture: "Ctrl+C") + .AddAction("aas-elem-paste-above", "Paste above", + "Adds the content of the paste buffer before (above) the currently selected element.", + inputGesture: "Ctrl+Shift+V") + .AddAction("aas-elem-paste-below", "Paste below", + "Adds the content of the paste buffer after (below) the currently selected element.", + inputGesture: "Ctrl+V") + .AddAction("aas-elem-paste-into", "Paste into", + "Adds the content of the paste buffer into the currently selected collection-like element.", + inputGesture: "Ctrl+Alt+V"), + ticketAction: (buttonNdx, ticket) => { if (buttonNdx == 0 || buttonNdx == 1) { @@ -1085,7 +1121,8 @@ public void DispPlainListOfIdentifiablePasteHelper( ModifyRepo repo, CopyPasteBuffer cpbInternal, string label = "Buffer:", - Func lambdaPasteInto = null) + Func lambdaPasteInto = null, + AasxMenu superMenu = null) where T : AdminShell.Identifiable, new() { // access @@ -1093,10 +1130,15 @@ public void DispPlainListOfIdentifiablePasteHelper( return; // use an action - this.AddAction( + AddAction( stack, label, - new[] { "Paste into" }, repo, - (buttonNdx) => + repo: repo, + superMenu: superMenu, + ticketMenu: new AasxMenu() + .AddAction("aas-elem-paste-into", "Paste into", + "Adds the content of the paste buffer into the currently selected collection-like element.", + inputGesture: "Ctrl+Alt+V"), + ticketAction: (buttonNdx, ticket) => { if (buttonNdx == 0) { diff --git a/src/AasxPackageLogic/DispEditHelperEntities.cs b/src/AasxPackageLogic/DispEditHelperEntities.cs index e915307fc..45cb1eb48 100644 --- a/src/AasxPackageLogic/DispEditHelperEntities.cs +++ b/src/AasxPackageLogic/DispEditHelperEntities.cs @@ -49,7 +49,8 @@ public class UploadAssistance public void DisplayOrEditAasEntityAsset( PackageCentral.PackageCentral packages, AdminShell.AdministrationShellEnv env, AdminShell.Asset asset, bool editMode, ModifyRepo repo, AnyUiStackPanel stack, bool embedded = false, - bool hintMode = false) + bool hintMode = false, + AasxMenu superMenu = null) { this.AddGroup(stack, "Asset", this.levelColors.MainSection); @@ -67,12 +68,19 @@ public void DisplayOrEditAasEntityAsset( this.DispPlainIdentifiableCutCopyPasteHelper( stack, repo, this.theCopyPaste, env.Assets, asset, (o) => { return new AdminShell.Asset(o); }, - label: "Buffer:"); + label: "Buffer:", + superMenu: superMenu); } // print code sheet - this.AddAction(stack, "Actions:", new[] { "Print asset code sheet .." }, repo, (buttonNdx) => - { + AddAction(stack, "Actions:", + repo: repo, + superMenu: superMenu, + ticketMenu: new AasxMenu() + .AddAction("print-code-sheet", "Print asset code sheet ..", + "Prints an sheet with 2D codes for the asset id."), + ticketAction: (buttonNdx, ticket) => + { if (buttonNdx == 0) { var uc = new AnyUiDialogueDataEmpty(); @@ -95,7 +103,7 @@ public void DisplayOrEditAasEntityAsset( // hasDataSpecification are MULTIPLE references. That is: multiple x multiple keys! this.DisplayOrEditEntityHasDataSpecificationReferences(stack, asset.hasDataSpecification, - (ds) => { asset.hasDataSpecification = ds; }, relatedReferable: asset); + (ds) => { asset.hasDataSpecification = ds; }, relatedReferable: asset, superMenu: superMenu); // Identifiable this.DisplayOrEditEntityIdentifiable( @@ -198,7 +206,8 @@ public void DisplayOrEditAasEntityAsset( public void DisplayOrEditAasEntityAasEnv( PackageCentral.PackageCentral packages, AdminShell.AdministrationShellEnv env, VisualElementEnvironmentItem ve, bool editMode, AnyUiStackPanel stack, - bool hintMode = false) + bool hintMode = false, + AasxMenu superMenu = null) { this.AddGroup(stack, "Environment of Asset Administration Shells", this.levelColors.MainSection); if (env == null) @@ -254,9 +263,17 @@ public void DisplayOrEditAasEntityAasEnv( }); // let the user control the number of entities - this.AddAction( - stack, "Entities:", new[] { "Add Asset", "Add AAS", "Add ConceptDescription" }, repo, - (buttonNdx) => + AddAction( + stack, "Entities:", + superMenu: superMenu, + ticketMenu: new AasxMenu() + .AddAction("add-asset", "Add Asset", + "Adds an asset with blank information.") + .AddAction("add-aas", "Add AAS", + "Adds an AAS with blank information.") + .AddAction("add-cd", "Add ConceptDescription", + "Adds an ConceptDescription with blank information."), + ticketAction: (buttonNdx, ticket) => { if (buttonNdx == 0) { @@ -301,11 +318,19 @@ public void DisplayOrEditAasEntityAasEnv( severityLevel: HintCheck.Severity.Notice) }); - this.AddAction( + AddAction( stack, "Copy from existing AAS:", - new[] { "Copy single entity ", "Copy recursively", "Copy rec. w/ suppl. files" }, - repo, - (buttonNdx) => + repo: repo, + superMenu: superMenu, + ticketMenu: new AasxMenu() + .AddAction("copy-single", "Copy single", + "Copy single selected entity from another AAS, caring for ConceptDescriptions.") + .AddAction("copy-recurse", "Copy recursively", + "Copy selected entity and children from another AAS, caring for ConceptDescriptions.") + .AddAction("copy-with-files", "Copy rec. w/ suppl. files", + "Copy selected entity and children from another AAS, caring for ConceptDescriptions " + + "and supplementary files."), + ticketAction: (buttonNdx, ticket) => { if (buttonNdx == 0 || buttonNdx == 1 || buttonNdx == 2) { @@ -490,6 +515,7 @@ public void DisplayOrEditAasEntityAasEnv( this.DispPlainListOfIdentifiablePasteHelper( stack, repo, this.theCopyPaste, label: "Buffer:", + superMenu: superMenu, lambdaPasteInto: (cpi, del) => { // access @@ -613,10 +639,14 @@ public void DisplayOrEditAasEntityAasEnv( "You have opened an auxiliary AASX package. You can copy elements from it!", severityLevel: HintCheck.Severity.Notice) }); - this.AddAction( + AddAction( stack, "Copy from existing ConceptDescription:", - new[] { "Copy single entity" }, repo, - (buttonNdx) => + repo: repo, + superMenu: superMenu, + ticketMenu: new AasxMenu() + .AddAction("copy-single", "Copy single", + "Copy single selected entity from another AAS."), + ticketAction: (buttonNdx, ticket) => { if (buttonNdx == 0) { @@ -882,7 +912,8 @@ public void DisplayOrEditAasEntitySupplementaryFile( PackageCentral.PackageCentral packages, VisualElementSupplementalFile entity, AdminShellPackageSupplementaryFile psf, bool editMode, - AnyUiStackPanel stack) + AnyUiStackPanel stack, + AasxMenu superMenu = null) { // // Package @@ -891,47 +922,53 @@ public void DisplayOrEditAasEntitySupplementaryFile( if (editMode && packages.MainStorable && psf != null) { - this.AddAction(stack, "Action", new[] { "Delete" }, repo, (buttonNdx) => - { - if (buttonNdx == 0) - if (AnyUiMessageBoxResult.Yes == this.context.MessageBoxFlyoutShow( - "Delete selected entity? This operation can not be reverted!", "AAS-ENV", - AnyUiMessageBoxButton.YesNo, AnyUiMessageBoxImage.Warning)) - { - // try remember where we are - var sibling = entity.FindSibling()?.GetDereferencedMainDataObject(); - - // delete - try - { - packages.Main.DeleteSupplementaryFile(psf); - Log.Singleton.Info( - "Added {0} to pending package items to be deleted. " + - "A save-operation might be required.", PackageSourcePath); - } - catch (Exception ex) + AddAction(stack, "Action", + repo: repo, + superMenu: superMenu, + ticketMenu: new AasxMenu() + .AddAction("file-delete", "Delete", + "Deletes the supplementary file from the respective AAS environment."), + ticketAction: (buttonNdx, ticket) => + { + if (buttonNdx == 0) + if (AnyUiMessageBoxResult.Yes == this.context.MessageBoxFlyoutShow( + "Delete selected entity? This operation can not be reverted!", "AAS-ENV", + AnyUiMessageBoxButton.YesNo, AnyUiMessageBoxImage.Warning)) { - Log.Singleton.Error(ex, "Deleting file in package"); - } + // try remember where we are + var sibling = entity.FindSibling()?.GetDereferencedMainDataObject(); - // try to re-focus to a sibling - if (sibling != null) - { - // stay around - return new AnyUiLambdaActionRedrawAllElements( - nextFocus: sibling); - } - else - { - // jump to root - return new AnyUiLambdaActionRedrawAllElements( - nextFocus: VisualElementEnvironmentItem.GiveAliasDataObject( - VisualElementEnvironmentItem.ItemType.Package)); + // delete + try + { + packages.Main.DeleteSupplementaryFile(psf); + Log.Singleton.Info( + "Added {0} to pending package items to be deleted. " + + "A save-operation might be required.", PackageSourcePath); + } + catch (Exception ex) + { + Log.Singleton.Error(ex, "Deleting file in package"); + } + + // try to re-focus to a sibling + if (sibling != null) + { + // stay around + return new AnyUiLambdaActionRedrawAllElements( + nextFocus: sibling); + } + else + { + // jump to root + return new AnyUiLambdaActionRedrawAllElements( + nextFocus: VisualElementEnvironmentItem.GiveAliasDataObject( + VisualElementEnvironmentItem.ItemType.Package)); + } } - } - return new AnyUiLambdaActionNone(); - }); + return new AnyUiLambdaActionNone(); + }); } } @@ -944,7 +981,8 @@ public void DisplayOrEditAasEntitySupplementaryFile( public void DisplayOrEditAasEntityAas( PackageCentral.PackageCentral packages, AdminShell.AdministrationShellEnv env, AdminShell.AdministrationShell aas, - bool editMode, AnyUiStackPanel stack, bool hintMode = false) + bool editMode, AnyUiStackPanel stack, bool hintMode = false, + AasxMenu superMenu = null) { this.AddGroup(stack, "Asset Administration Shell", this.levelColors.MainSection); if (aas == null) @@ -957,7 +995,8 @@ public void DisplayOrEditAasEntityAas( // Up/ down/ del this.EntityListUpDownDeleteHelper( - stack, repo, env.AdministrationShells, aas, env, "AAS:"); + stack, repo, env.AdministrationShells, aas, env, "AAS:", + superMenu: superMenu); // Cut, copy, paste within list of AASes this.DispPlainIdentifiableCutCopyPasteHelper( @@ -1015,15 +1054,18 @@ public void DisplayOrEditAasEntityAas( "(see 'File' menu) to copy structures from.", severityLevel: HintCheck.Severity.Notice) });// adding submodels - this.AddAction( + AddAction( stack, "SubmodelRef:", - new[] { - "Reference to existing Submodel", - "Create new Submodel of kind Template", - "Create new Submodel of kind Instance" - }, - repo, - (buttonNdx) => + repo: repo, + superMenu: superMenu, + ticketMenu: new AasxMenu() + .AddAction("ref-existing", "Reference to existing Submodel", + "Links the SubmodelReference to an existing Submodel.") + .AddAction("create-template", "Create new Submodel of kind Template", + "Creates a new Submodel of kind Template and link to this SubmodelReference.") + .AddAction("create-instance", "Create new Submodel of kind Instance", + "Creates a new Submodel of kind Instance and link to this SubmodelReference."), + ticketAction: (buttonNdx, ticket) => { if (buttonNdx == 0) { @@ -1101,10 +1143,18 @@ public void DisplayOrEditAasEntityAas( "You have opened an auxiliary AASX package. You can copy elements from it!", severityLevel: HintCheck.Severity.Notice) }); - this.AddAction( + AddAction( stack, "Copy from existing Submodel:", - new[] { "Copy single entity ", "Copy recursively" }, repo, - (buttonNdx) => + repo: repo, + superMenu: superMenu, + ticketMenu: new AasxMenu() + .AddAction("copy-single", "Copy single", + "Copy selected Submodel without children from another AAS, " + + "caring for ConceptDescriptions.") + .AddAction("copy-recurse", "Copy recursively", + "Copy selected Submodel and children from another AAS, " + + "caring for ConceptDescriptions."), + ticketAction: (buttonNdx, ticket) => { if (buttonNdx == 0 || buttonNdx == 1) { @@ -1180,18 +1230,22 @@ public void DisplayOrEditAasEntityAas( }); // let the user control the number of entities - this.AddAction(stack, "Entities:", new[] { "Add View" }, repo, (buttonNdx) => - { - if (buttonNdx == 0) + AddAction(stack, "Entities:", + repo: repo, superMenu: superMenu, + ticketMenu: new AasxMenu() + .AddAction("add-view", "Add View", "Adds a new View to the AAS."), + ticketAction: (buttonNdx, ticket) => { - var view = new AdminShell.View(); - aas.AddView(view); - this.AddDiaryEntry(aas, new DiaryEntryStructChange()); - return new AnyUiLambdaActionRedrawAllElements(nextFocus: view); - } + if (buttonNdx == 0) + { + var view = new AdminShell.View(); + aas.AddView(view); + this.AddDiaryEntry(aas, new DiaryEntryStructChange()); + return new AnyUiLambdaActionRedrawAllElements(nextFocus: view); + } - return new AnyUiLambdaActionNone(); - }); + return new AnyUiLambdaActionNone(); + }); } // Referable @@ -1199,7 +1253,7 @@ public void DisplayOrEditAasEntityAas( // hasDataSpecification are MULTIPLE references. That is: multiple x multiple keys! this.DisplayOrEditEntityHasDataSpecificationReferences(stack, aas.hasDataSpecification, - (ds) => { aas.hasDataSpecification = ds; }, relatedReferable: aas); + (ds) => { aas.hasDataSpecification = ds; }, relatedReferable: aas, superMenu: superMenu); // Identifiable this.DisplayOrEditEntityIdentifiable( @@ -1290,7 +1344,8 @@ public void DisplayOrEditAasEntityAas( if (asset != null) { DisplayOrEditAasEntityAsset( - packages, env, asset, editMode, repo, stack, hintMode: hintMode); + packages, env, asset, editMode, repo, stack, hintMode: hintMode, + superMenu: superMenu); } } @@ -1350,21 +1405,27 @@ public void DisplayOrEditAasEntitySubmodelOrRef( stack, "Editing of entities (environment's Submodel collection)", this.levelColors.MainSection); - this.AddAction(stack, "Submodel:", new[] { "Delete" }, repo, (buttonNdx) => - { - if (buttonNdx == 0) - if (AnyUiMessageBoxResult.Yes == this.context.MessageBoxFlyoutShow( - "Delete selected Submodel? This operation can not be reverted!", "AAS-ENV", - AnyUiMessageBoxButton.YesNo, AnyUiMessageBoxImage.Warning)) - { - if (env.Submodels.Contains(submodel)) - env.Submodels.Remove(submodel); - this.AddDiaryEntry(submodel, new DiaryEntryStructChange(StructuralChangeReason.Delete)); - return new AnyUiLambdaActionRedrawAllElements(nextFocus: null, isExpanded: null); - } + AddAction(stack, "Submodel:", + repo: repo, superMenu: superMenu, + ticketMenu: new AasxMenu() + .AddAction("aas-elem-del", "Delete", + "Deletes the currently selected element.", + inputGesture: "Delete"), + ticketAction: (buttonNdx, ticket) => + { + if (buttonNdx == 0) + if (AnyUiMessageBoxResult.Yes == this.context.MessageBoxFlyoutShow( + "Delete selected Submodel? This operation can not be reverted!", "AAS-ENV", + AnyUiMessageBoxButton.YesNo, AnyUiMessageBoxImage.Warning)) + { + if (env.Submodels.Contains(submodel)) + env.Submodels.Remove(submodel); + this.AddDiaryEntry(submodel, new DiaryEntryStructChange(StructuralChangeReason.Delete)); + return new AnyUiLambdaActionRedrawAllElements(nextFocus: null, isExpanded: null); + } - return new AnyUiLambdaActionNone(); - }); + return new AnyUiLambdaActionNone(); + }); } // Cut, copy, paste within an aas @@ -1374,7 +1435,7 @@ public void DisplayOrEditAasEntitySubmodelOrRef( // cut/ copy / paste this.DispSubmodelCutCopyPasteHelper(stack, repo, this.theCopyPaste, aas.submodelRefs, smref, (sr) => { return new AdminShell.SubmodelRef(sr); }, - smref, submodel, + smref, submodel, superMenu: superMenu, label: "Buffer:", checkEquality: (r1, r2) => { @@ -1407,7 +1468,7 @@ public void DisplayOrEditAasEntitySubmodelOrRef( // cut/ copy / paste this.DispSubmodelCutCopyPasteHelper(stack, repo, this.theCopyPaste, env.Submodels, submodel, (sm) => { return new AdminShell.Submodel(sm, shallowCopy: false); }, - null, submodel, + null, submodel, superMenu: superMenu, label: "Buffer:"); } @@ -1424,11 +1485,21 @@ public void DisplayOrEditAasEntitySubmodelOrRef( "you could add meaning by relating it to a ConceptDefinition.", severityLevel: HintCheck.Severity.Notice) }); - this.AddAction( + AddAction( stack, "SubmodelElement:", - new[] { "Add Property", "Add MultiLang.Prop.", "Add Collection", "Add other .." }, - repo, - (buttonNdx) => + repo: repo, superMenu: superMenu, + ticketMenu: new AasxMenu() + .AddAction("add-prop", "Add Property", + "Adds a new Property to the containing collection.") + .AddAction("add-mlp", "Add MultiLang.Prop.", + "Adds a new MultiLanguageProperty to the containing collection.") + .AddAction("add-smc", "Add Collection", + "Adds a new SubmodelElementCollection to the containing collection.") + .AddAction("add-named", "Add other ..", + "Adds a selected kind of SubmodelElement to the containing collection.", + args: new AasxMenuListOfArgDefs() + .Add("Kind", "Name (not abbreviated) of kind of SubmodelElement.")), + ticketAction: (buttonNdx, ticket) => { if (buttonNdx >= 0 && buttonNdx <= 3) { @@ -1441,7 +1512,7 @@ public void DisplayOrEditAasEntitySubmodelOrRef( if (buttonNdx == 2) en = AdminShell.SubmodelElementWrapper.AdequateElementEnum.SubmodelElementCollection; if (buttonNdx == 3) - en = this.SelectAdequateEnum("Select SubmodelElement to create .."); + en = this.SelectAdequateEnum("Select SubmodelElement to create ..", ticket: ticket); // ok? if (en != AdminShell.SubmodelElementWrapper.AdequateElementEnum.Unknown) @@ -1472,10 +1543,18 @@ public void DisplayOrEditAasEntitySubmodelOrRef( "You have opened an auxiliary AASX package. You can copy elements from it!", severityLevel: HintCheck.Severity.Notice) }); - this.AddAction( + AddAction( stack, "Copy from existing SubmodelElement:", - new[] { "Copy single entity", "Copy recursively" }, repo, - (buttonNdx) => + repo: repo, + superMenu: superMenu, + ticketMenu: new AasxMenu() + .AddAction("copy-single", "Copy single", + "Copy selected Submodel without children from another AAS, " + + "caring for ConceptDescriptions.") + .AddAction("copy-recurse", "Copy recursively", + "Copy selected Submodel and children from another AAS, " + + "caring for ConceptDescriptions."), + ticketAction: (buttonNdx, ticket) => { if (buttonNdx == 0 || buttonNdx == 1) { @@ -1532,11 +1611,13 @@ public void DisplayOrEditAasEntitySubmodelOrRef( "Consider importing ConceptDescriptions from ECLASS for existing SubmodelElements.", severityLevel: HintCheck.Severity.Notice) }); - this.AddAction( + AddAction( stack, "ConceptDescriptions from ECLASS:", - new[] { "Import missing" }, - repo, - (buttonNdx) => + repo: repo, superMenu: superMenu, + ticketMenu: new AasxMenu() + .AddAction("import-missing", "Import missing", + "Removes the currently selected element and places it in the paste buffer."), + ticketAction: (buttonNdx, ticket) => { if (buttonNdx == 0) { @@ -1549,15 +1630,22 @@ public void DisplayOrEditAasEntitySubmodelOrRef( return new AnyUiLambdaActionNone(); }); - this.AddAction( + AddAction( stack, "Submodel & -elements:", - new[] { "Turn to kind Template", "Turn to kind Instance", "Remove qualifiers" }, - repo, - (buttonNdx) => + repo: repo, superMenu: superMenu, + ticketMenu: new AasxMenu() + .AddAction("convert-template", "Turn to kind Template", + "Sets all kind attributes in element and children to kind Template.") + .AddAction("convert-instance", "Turn to kind Instance", + "Sets all kind attributes in element and children to kind Instance.") + .AddAction("remove-qualifiers", "Remove qualifiers", + "Removes all qualifiers for selected element."), + ticketAction: (buttonNdx, ticket) => { if (buttonNdx == 0 || buttonNdx == 1) { - if (AnyUiMessageBoxResult.Yes != this.context.MessageBoxFlyoutShow( + if (ticket?.ScriptMode != true + && AnyUiMessageBoxResult.Yes != this.context.MessageBoxFlyoutShow( "This operation will affect all Kind attributes of " + "the Submodel and all of its SubmodelElements. Do you want to proceed?", "Setting Kind", @@ -1586,9 +1674,10 @@ public void DisplayOrEditAasEntitySubmodelOrRef( if (buttonNdx == 2) { - if (AnyUiMessageBoxResult.Yes != this.context.MessageBoxFlyoutShow( + if (ticket?.ScriptMode != true + && AnyUiMessageBoxResult.Yes != this.context.MessageBoxFlyoutShow( "This operation will affect all Qualifers of " + - "the Submodel and all of its SubmodelElements. Do you want to proceed?", + "the Submodel and all of its SubmodelElements. Do you want to proceed?", "Remove qualifiers", AnyUiMessageBoxButton.YesNo, AnyUiMessageBoxImage.Warning)) return new AnyUiLambdaActionNone(); @@ -1716,7 +1805,7 @@ public void DisplayOrEditAasEntitySubmodelOrRef( // HasDataSpecification are MULTIPLE references. That is: multiple x multiple keys! this.DisplayOrEditEntityHasDataSpecificationReferences(stack, submodel.hasDataSpecification, (ds) => { submodel.hasDataSpecification = ds; }, - relatedReferable: submodel); + relatedReferable: submodel, superMenu: superMenu); } } @@ -1731,7 +1820,8 @@ public void DisplayOrEditAasEntityConceptDescription( PackageCentral.PackageCentral packages, AdminShell.AdministrationShellEnv env, AdminShell.Referable parentContainer, AdminShell.ConceptDescription cd, bool editMode, ModifyRepo repo, - AnyUiStackPanel stack, bool embedded = false, bool hintMode = false, bool preventMove = false) + AnyUiStackPanel stack, bool embedded = false, bool hintMode = false, bool preventMove = false, + AasxMenu superMenu = null) { this.AddGroup(stack, "ConceptDescription", this.levelColors.MainSection); @@ -1758,7 +1848,8 @@ public void DisplayOrEditAasEntityConceptDescription( this.DispPlainIdentifiableCutCopyPasteHelper( stack, repo, this.theCopyPaste, env.ConceptDescriptions, cd, (o) => { return new AdminShell.ConceptDescription(o); }, - label: "Buffer:"); + label: "Buffer:", + superMenu: superMenu); } // Referable @@ -1856,7 +1947,7 @@ public void DisplayOrEditAasEntityConceptDescription( // isCaseOf are MULTIPLE references. That is: multiple x multiple keys! this.DisplayOrEditEntityListOfReferences(stack, cd.IsCaseOf, (ico) => { cd.IsCaseOf = ico; }, - "isCaseOf", relatedReferable: cd); + "isCaseOf", relatedReferable: cd, superMenu: superMenu); // joint header for data spec ref and content this.AddGroup(stack, "HasDataSpecification:", this.levelColors.SubSection); @@ -1880,7 +1971,7 @@ public void DisplayOrEditAasEntityConceptDescription( addPresetNames: new[] { "IEC61360" }, addPresetKeyLists: new[] { AdminShell.KeyList.CreateNew( AdminShell.DataSpecificationIEC61360.GetKey() )}, - dataSpecRefsAreUsual: true, relatedReferable: cd); + dataSpecRefsAreUsual: true, relatedReferable: cd, superMenu: superMenu); // the IEC61360 Content @@ -1920,7 +2011,8 @@ public void DisplayOrEditAasEntityConceptDescription( public void DisplayOrEditAasEntityOperationVariable( PackageCentral.PackageCentral packages, AdminShell.AdministrationShellEnv env, AdminShell.Referable parentContainer, AdminShell.OperationVariable ov, bool editMode, - AnyUiStackPanel stack, bool hintMode = false) + AnyUiStackPanel stack, bool hintMode = false, + AasxMenu superMenu = null) { // // Submodel Element GENERAL @@ -1961,11 +2053,21 @@ public void DisplayOrEditAasEntityOperationVariable( if (editMode) { - this.AddAction( + AddAction( stack, "value:", - new[] { "Add Property", "Add MultiLang.Prop.", "Add Collection", "Add other .." }, - repo, - (buttonNdx) => + repo: repo, superMenu: superMenu, + ticketMenu: new AasxMenu() + .AddAction("add-prop", "Add Property", + "Adds a new Property to the containing collection.") + .AddAction("add-mlp", "Add MultiLang.Prop.", + "Adds a new MultiLanguageProperty to the containing collection.") + .AddAction("add-smc", "Add Collection", + "Adds a new SubmodelElementCollection to the containing collection.") + .AddAction("add-named", "Add other ..", + "Adds a selected kind of SubmodelElement to the containing collection.", + args: new AasxMenuListOfArgDefs() + .Add("Kind", "Name (not abbreviated) of kind of SubmodelElement.")), + ticketAction: (buttonNdx, ticket) => { if (buttonNdx >= 0 && buttonNdx <= 3) { @@ -1987,7 +2089,8 @@ public void DisplayOrEditAasEntityOperationVariable( en = this.SelectAdequateEnum( "Select SubmodelElement to create ..", excludeValues: new[] { - AdminShell.SubmodelElementWrapper.AdequateElementEnum.Operation }); + AdminShell.SubmodelElementWrapper.AdequateElementEnum.Operation }, + ticket: ticket); // ok? if (en != AdminShell.SubmodelElementWrapper.AdequateElementEnum.Unknown) @@ -2047,8 +2150,13 @@ public void DisplayOrEditAasEntityOperationVariable( }); this.AddAction( stack, "Copy from existing SubmodelElement:", - new[] { "Copy single", "Copy recursively" }, repo, - (buttonNdx) => + repo: repo, superMenu: superMenu, + ticketMenu: new AasxMenu() + .AddAction("copy-single", "Copy single", + "Copy single selected entity from another AAS, caring for ConceptDescriptions.") + .AddAction("copy-recurse", "Copy recursively", + "Copy selected entity and children from another AAS, caring for ConceptDescriptions."), + ticketAction: (buttonNdx, ticket) => { if (buttonNdx == 0 || buttonNdx == 1) { @@ -2167,8 +2275,12 @@ public void DisplayOrEditAasEntitySubmodelElement( if (parentContainer != null && parentContainer is AdminShell.IManageSubmodelElements) this.AddAction( horizStack, "Refactoring:", - new[] { "Refactor" }, repo, - (buttonNdx) => + + repo: repo, superMenu: superMenu, + ticketMenu: new AasxMenu() + .AddAction("refactor", "Refactor", + "Takes the selected AAS element and converts it to a new kind, keeping most of the attributes."), + ticketAction: (buttonNdx, ticket) => { if (buttonNdx == 0) { @@ -2229,11 +2341,18 @@ public void DisplayOrEditAasEntitySubmodelElement( "the SubmodelElement to an ConceptDescription.", severityLevel: HintCheck.Severity.Notice) }); - this.AddAction( + AddAction( stack, "Concept Description:", - new[] { "Assign to existing CD", "Create empty and assign", "Create and assign from ECLASS" }, - repo, - (buttonNdx) => + repo: repo, superMenu: superMenu, + ticketMenu: new AasxMenu() + .AddAction("assign-existing", "Assign to existing CD", + "Assign the SubmodelElement to an semanticId of an existing ConceptDescription.") + .AddAction("create-empty", "Create empty and assign", + "Creates an empty ConceptDescription and assigns the SubmodelElement to it.") + .AddAction("create-eclass", "Create and assign from ECLASS", + "Selects an concept from ECLASS, creates an ConceptDescription and " + + "assigns the SubmodelElement to it."), + ticketAction: (buttonNdx, ticket) => { if (buttonNdx == 0) { @@ -2366,17 +2485,21 @@ public void DisplayOrEditAasEntitySubmodelElement( severityLevel: HintCheck.Severity.Notice) }); this.AddAction( - stack, "ConceptDescriptions from ECLASS:", new[] { "Import missing" }, repo, - (buttonNdx) => + stack, "ConceptDescriptions from ECLASS:", + repo: repo, superMenu: superMenu, + ticketMenu: new AasxMenu() + .AddAction("import-missing", "Import missing", + "Checks for the element and its children, if semanticIds link to missing CD " + + "and imports those from ECLASS."), + ticketAction: (buttonNdx, ticket) => { if (buttonNdx == 0) { this.ImportEclassCDsForTargets(env, sme, targets); + return new AnyUiLambdaActionRedrawAllElements(nextFocus: sme); } - return new AnyUiLambdaActionNone(); }); - } if (editMode && (sme is AdminShell.SubmodelElementCollection || sme is AdminShell.Entity)) @@ -2403,9 +2526,19 @@ public void DisplayOrEditAasEntitySubmodelElement( }); this.AddAction( stack, "SubmodelElement:", - new[] { "Add Property", "Add MultiLang.Prop.", "Add Collection", "Add other .." }, - repo, - (buttonNdx) => + repo: repo, superMenu: superMenu, + ticketMenu: new AasxMenu() + .AddAction("add-prop", "Add Property", + "Adds a new Property to the containing collection.") + .AddAction("add-mlp", "Add MultiLang.Prop.", + "Adds a new MultiLanguageProperty to the containing collection.") + .AddAction("add-smc", "Add Collection", + "Adds a new SubmodelElementCollection to the containing collection.") + .AddAction("add-named", "Add other ..", + "Adds a selected kind of SubmodelElement to the containing collection.", + args: new AasxMenuListOfArgDefs() + .Add("Kind", "Name (not abbreviated) of kind of SubmodelElement.")), + ticketAction: (buttonNdx, ticket) => { if (buttonNdx >= 0 && buttonNdx <= 3) { @@ -2452,8 +2585,14 @@ public void DisplayOrEditAasEntitySubmodelElement( severityLevel: HintCheck.Severity.Notice) }); this.AddAction( - stack, "Copy from existing SubmodelElement:", new[] { "Copy single", "Copy recursively" }, repo, - (buttonNdx) => + stack, "Copy from existing SubmodelElement:", + repo: repo, superMenu: superMenu, + ticketMenu: new AasxMenu() + .AddAction("copy-single", "Copy single", + "Copy single selected entity from another AAS, caring for ConceptDescriptions.") + .AddAction("copy-recurse", "Copy recursively", + "Copy selected entity and children from another AAS, caring for ConceptDescriptions."), + ticketAction: (buttonNdx, ticket) => { if (buttonNdx == 0 || buttonNdx == 1) { @@ -2496,15 +2635,20 @@ public void DisplayOrEditAasEntitySubmodelElement( { this.AddGroup(stack, "Navigation of entities", this.levelColors.MainSection); - this.AddAction(stack, "Navigate to:", new[] { "Concept Description" }, repo, (buttonNdx) => - { - if (buttonNdx == 0) + AddAction(stack, "Navigate to:", + repo: repo, superMenu: superMenu, + ticketMenu: new AasxMenu() + .AddAction("navigate-cd", "ConceptDescription", + "Finds the associated ConceptDescription by semanticId and visually selects it."), + ticketAction: (buttonNdx, ticket) => { - return new AnyUiLambdaActionRedrawAllElements(nextFocus: jumpToCD, isExpanded: true); - } - return new AnyUiLambdaActionNone(); - }); - } + if (buttonNdx == 0) + { + return new AnyUiLambdaActionRedrawAllElements(nextFocus: jumpToCD, isExpanded: true); + } + return new AnyUiLambdaActionNone(); + }); + } if (editMode && sme is AdminShell.Operation smo) { @@ -2534,9 +2678,16 @@ public void DisplayOrEditAasEntitySubmodelElement( "Please check, which in- and out-variables are required.", severityLevel: HintCheck.Severity.Notice) }); - this.AddAction( - substack, "OperationVariable:", new[] { "Add", "Paste into" }, repo, - (buttonNdx) => + AddAction( + substack, "OperationVariable:", + + repo: repo, superMenu: superMenu, + ticketMenu: new AasxMenu() + .AddAction("operation-add", "Add", + "Adds an empty operation variable to the selected operation variable(s).") + .AddAction("operation-paste", "Paste into", + "Pastes an SubmodelElement from the paste buffer into the operation variable(s)."), + ticketAction: (buttonNdx, ticket) => { if (buttonNdx == 0) { @@ -2606,10 +2757,15 @@ public void DisplayOrEditAasEntitySubmodelElement( "You have opened an auxiliary AASX package. You can copy elements from it!", severityLevel: HintCheck.Severity.Notice) }); - this.AddAction( - substack, "Copy from existing OperationVariable:", new[] { "Copy single", "Copy recursively" }, - repo, - (buttonNdx) => + AddAction( + substack, "Copy from existing OperationVariable:", + repo: repo, superMenu: superMenu, + ticketMenu: new AasxMenu() + .AddAction("copy-single", "Copy single", + "Copy single selected entity from another AAS, caring for ConceptDescriptions.") + .AddAction("copy-recurse", "Copy recursively", + "Copy selected entity and children from another AAS, caring for ConceptDescriptions."), + ticketAction: (buttonNdx, ticket) => { if (buttonNdx == 0 || buttonNdx == 1) { @@ -2661,10 +2817,21 @@ public void DisplayOrEditAasEntitySubmodelElement( "Consider add DataElements or refactor to ordinary RelationshipElement.", severityLevel: HintCheck.Severity.Notice) }); - this.AddAction( - stack, "annotation:", new[] { "Add Property", "Add MultiLang.Prop.", "Add Range", "Add other .." }, - repo, - (buttonNdx) => + AddAction( + stack, "annotation:", + repo: repo, superMenu: superMenu, + ticketMenu: new AasxMenu() + .AddAction("add-prop", "Add Property", + "Adds a new Property to the containing collection.") + .AddAction("add-mlp", "Add MultiLang.Prop.", + "Adds a new MultiLanguageProperty to the containing collection.") + .AddAction("add-smc", "Add Collection", + "Adds a new SubmodelElementCollection to the containing collection.") + .AddAction("add-named", "Add other ..", + "Adds a selected kind of SubmodelElement to the containing collection.", + args: new AasxMenuListOfArgDefs() + .Add("Kind", "Name (not abbreviated) of kind of SubmodelElement.")), + ticketAction: (buttonNdx, ticket) => { if (buttonNdx >= 0 && buttonNdx <= 3) { @@ -2679,7 +2846,8 @@ public void DisplayOrEditAasEntitySubmodelElement( if (buttonNdx == 3) en = this.SelectAdequateEnum( "Select SubmodelElement to create ..", - includeValues: AdminShell.SubmodelElementWrapper.AdequateElementsDataElement); + includeValues: AdminShell.SubmodelElementWrapper.AdequateElementsDataElement, + ticket: ticket); // ok? if (en != AdminShell.SubmodelElementWrapper.AdequateElementEnum.Unknown) @@ -2711,9 +2879,13 @@ public void DisplayOrEditAasEntitySubmodelElement( "You have opened an auxiliary AASX package. You can copy elements from it!", severityLevel: HintCheck.Severity.Notice) }); - this.AddAction( - substack, "Copy from existing DataElement:", new[] { "Copy single" }, repo, - (buttonNdx) => + AddAction( + substack, "Copy from existing DataElement:", + repo: repo, superMenu: superMenu, + ticketMenu: new AasxMenu() + .AddAction("copy-single", "Copy single", + "Copy single selected entity from another AAS, caring for ConceptDescriptions."), + ticketAction: (buttonNdx, ticket) => { if (buttonNdx == 0) { @@ -2829,7 +3001,7 @@ public void DisplayOrEditAasEntitySubmodelElement( // HasDataSpecification are MULTIPLE references. That is: multiple x multiple keys! this.DisplayOrEditEntityHasDataSpecificationReferences(stack, sme.hasDataSpecification, - (ds) => { sme.hasDataSpecification = ds; }, relatedReferable: sme); + (ds) => { sme.hasDataSpecification = ds; }, relatedReferable: sme, superMenu: superMenu); // // ConceptDescription <- via semantic ID ?! @@ -3153,7 +3325,7 @@ public void DisplayOrEditAasEntitySubmodelElement( if (editMode && uploadAssistance != null && packages.Main != null) { // More file actions - this.AddAction( + AddAction( stack, "Action", new[] { "Remove existing file", "Create text file", "Edit text file" }, repo, (buttonNdx) => @@ -3364,10 +3536,15 @@ public void DisplayOrEditAasEntitySubmodelElement( return new AnyUiLambdaActionRedrawEntity(); }, minHeight: 40); - this.AddAction( - stack, "Action", new[] { "Select source file", "Add or update to AASX" }, - repo, - (buttonNdx) => + AddAction( + stack, "Action", + repo: repo, superMenu: superMenu, + ticketMenu: new AasxMenu() + .AddAction("select-source", "Select source file", + "Select a filename to be added later.") + .AddAction("select-source", "Add or update to AASX", + "Add or update file given by selected filename to the AAS environment."), + ticketAction: (buttonNdx, ticket) => { if (buttonNdx == 0) { @@ -3748,10 +3925,16 @@ It shall be replaced (after intergrating AnyUI) by a better repo handling */ // group this.AddGroup(stack, "Invocation of Events", this.levelColors.SubSection); - this.AddAction( - stack, "Emit Event:", new[] { "Emit directly", "Emit with JSON payload" }, repo, + AddAction( + stack, "Emit Event:", + repo: repo, superMenu: superMenu, + ticketMenu: new AasxMenu() + .AddAction("emit-direct", "Emit directly", + "Emits selected event without user-defined payload.") + .AddAction("emit-json", "Emit with JSON payload", + "Emits selected event after editing user-defined payload."), addWoEdit: new[] { true, true }, - action: (buttonNdx) => + ticketAction: (buttonNdx, ticket) => { string PayloadsRaw = null; @@ -3810,7 +3993,8 @@ public void DisplayOrEditAasEntityView( PackageCentral.PackageCentral packages, AdminShell.AdministrationShellEnv env, AdminShell.AdministrationShell shell, AdminShell.View view, bool editMode, AnyUiStackPanel stack, - bool hintMode = false) + bool hintMode = false, + AasxMenu superMenu = null) { // // View @@ -3833,9 +4017,13 @@ public void DisplayOrEditAasEntityView( "You could create them by clicking the 'Add ..' button below.", severityLevel: HintCheck.Severity.Notice) }); - this.AddAction( - stack, "containedElements:", new[] { "Add Reference to SubmodelElement", }, repo, - (buttonNdx) => + AddAction( + stack, "containedElements:", + repo: repo, superMenu: superMenu, + ticketMenu: new AasxMenu() + .AddAction("add-reference", "Add Reference to SubmodelElement", + "Selects a SubmodelElements and add a reference to it to the View."), + ticketAction: (buttonNdx, ticket) => { if (buttonNdx == 0) { @@ -3877,7 +4065,7 @@ public void DisplayOrEditAasEntityView( // HasDataSpecification are MULTIPLE references. That is: multiple x multiple keys! this.DisplayOrEditEntityHasDataSpecificationReferences(stack, view.hasDataSpecification, (ds) => { view.hasDataSpecification = ds; }, - relatedReferable: view); + relatedReferable: view, superMenu: superMenu); } diff --git a/src/AasxPackageLogic/DispEditHelperModules.cs b/src/AasxPackageLogic/DispEditHelperModules.cs index 845458d15..fe22bacb5 100644 --- a/src/AasxPackageLogic/DispEditHelperModules.cs +++ b/src/AasxPackageLogic/DispEditHelperModules.cs @@ -382,7 +382,8 @@ public void DisplayOrEditEntityHasDataSpecificationReferences(AnyUiStackPanel st Action setOutput, string[] addPresetNames = null, AdminShell.KeyList[] addPresetKeyLists = null, bool dataSpecRefsAreUsual = false, - AdminShell.Referable relatedReferable = null) + AdminShell.Referable relatedReferable = null, + AasxMenu superMenu = null) { // access if (stack == null) @@ -410,10 +411,15 @@ public void DisplayOrEditEntityHasDataSpecificationReferences(AnyUiStackPanel st if (editMode) { // let the user control the number of references - this.AddAction( + AddAction( stack, "Specifications:", - new[] { "Add Reference", "Delete last reference" }, repo, - (buttonNdx) => + repo: repo, superMenu: superMenu, + ticketMenu: new AasxMenu() + .AddAction("add-reference", "Add Reference", + "Adds a reference to a data specification.") + .AddAction("delete-reference", "Delete last reference", + "Deletes the last reference in the list."), + ticketAction: (buttonNdx, ticket) => { if (buttonNdx == 0) hasDataSpecification.Add( @@ -454,7 +460,8 @@ public void DisplayOrEditEntityListOfReferences(AnyUiStackPanel stack, Action> setOutput, string entityName, string[] addPresetNames = null, AdminShell.Key[] addPresetKeys = null, - AdminShell.Referable relatedReferable = null) + AdminShell.Referable relatedReferable = null, + AasxMenu superMenu = null) { // access if (stack == null) @@ -474,9 +481,15 @@ public void DisplayOrEditEntityListOfReferences(AnyUiStackPanel stack, if (editMode) { // let the user control the number of references - this.AddAction( - stack, $"{entityName}:", new[] { "Add Reference", "Delete last reference" }, repo, - (buttonNdx) => + AddAction( + stack, $"{entityName}:", + repo: repo, superMenu: superMenu, + ticketMenu: new AasxMenu() + .AddAction("add-reference", "Add Reference", + "Adds a reference to the list.") + .AddAction("delete-reference", "Delete last reference", + "Deletes the last reference in the list."), + ticketAction: (buttonNdx, ticket) => { if (buttonNdx == 0) references.Add(new AdminShell.Reference()); diff --git a/src/AasxPackageLogic/DispEditHelperMultiElement.cs b/src/AasxPackageLogic/DispEditHelperMultiElement.cs index 2acfe06e9..24275edb4 100644 --- a/src/AasxPackageLogic/DispEditHelperMultiElement.cs +++ b/src/AasxPackageLogic/DispEditHelperMultiElement.cs @@ -35,18 +35,25 @@ public void DispMultiElementCutCopyPasteHelper( AdminShell.IAasElement parentContainer, CopyPasteBuffer cpb, ListOfVisualElementBasic entities, - string label = "Buffer:") + string label = "Buffer:", + AasxMenu superMenu = null) { // access if (parentContainer == null || cpb == null || entities == null) return; // use an action - this.AddAction( + AddAction( stack, label, - new[] { "Cut", "Copy" }, repo, - actionTags: new[] { "aas-multi-elem-cut", "aas-multi-elem-copy" }, - action: (buttonNdx) => + repo: repo, superMenu: superMenu, + ticketMenu: new AasxMenu() + .AddAction("aas-multi-elem-cut", "Cut", + "Removes the currently selected element and places it in the paste buffer.", + inputGesture: "Ctrl+X") + .AddAction("aas-multi-elem-copy", "Copy", + "Places the currently selected element in the paste buffer.", + inputGesture: "Ctrl+C"), + ticketAction: (buttonNdx, ticket) => { if (buttonNdx == 0 || buttonNdx == 1) { @@ -125,7 +132,8 @@ public void EntityListMultipleUpDownDeleteHelper( AnyUiPanel stack, ModifyRepo repo, List list, List entities, ListOfVisualElementBasic.IndexInfo indexInfo, object alternativeFocus = null, string label = "Entities:", - PackCntChangeEventData sendUpdateEvent = null, bool preventMove = false, bool reFocus = false) + PackCntChangeEventData sendUpdateEvent = null, bool preventMove = false, bool reFocus = false, + AasxMenu superMenu = null) { // access if (entities == null || indexInfo == null || list == null) @@ -134,11 +142,25 @@ public void EntityListMultipleUpDownDeleteHelper( // ask AddAction( stack, label, - new[] { "Move up", "Move down", "Move top", "Move end", "Delete" }, - actionTags: new[] { "aas-elem-move-up", "aas-elem-move-down", - "aas-elem-move-top", "aas-elem-move-end", "aas-elem-delete" }, repo: repo, - action: (buttonNdx) => + superMenu: superMenu, + ticketMenu: new AasxMenu() + .AddAction("aas-multi-elem-move-up", "Move up", + "Moves the currently selected element up in containing collection.", + inputGesture: "Shift+Ctrl+Up") + .AddAction("aas-multi-elem-move-down", "Move down", + "Moves the currently selected element down in containing collection.", + inputGesture: "Shift+Ctrl+Down") + .AddAction("aas-multi-elem-move-top", "Move top", + "Moves the currently selected element to the top in containing collection.", + inputGesture: "Shift+Ctrl+Home") + .AddAction("aas-multi-elem-move-end", "Move end", + "Moves the currently selected element to the end in containing collection.", + inputGesture: "Shift+Ctrl+End") + .AddAction("aas-multi-elem-delete", "Delete", + "Deletes the currently selected element.", + inputGesture: "Delete"), + ticketAction: (buttonNdx, ticket) => { if (buttonNdx >= 0 && buttonNdx <= 3) { @@ -324,7 +346,8 @@ public void ChangeElementAttributes(AdminShell.IAasElement el, AnyUiDialogueData public void EntityListSupplementaryFileHelper( AnyUiPanel stack, ModifyRepo repo, ListOfVisualElementBasic entities, - object alternativeFocus = null, string label = "Entities:") + object alternativeFocus = null, string label = "Entities:", + AasxMenu superMenu = null) { // access if (entities == null) @@ -333,10 +356,12 @@ public void EntityListSupplementaryFileHelper( // ask AddAction( stack, label, - new[] { "Delete" }, - actionTags: new[] { "aas-elem-delete" }, - repo: repo, - action: (buttonNdx) => + repo: repo, superMenu: superMenu, + ticketMenu: new AasxMenu() + .AddAction("aas-multi-elem-del", "Delete", + "Deletes currently selected element(s).", + inputGesture: "Delete"), + ticketAction: (buttonNdx, ticket) => { if (buttonNdx == 0) @@ -380,7 +405,8 @@ public void DisplayOrEditAasEntityMultipleElements( PackageCentral.PackageCentral packages, ListOfVisualElementBasic entities, bool editMode, AnyUiStackPanel stack, - VisualElementEnvironmentItem.ConceptDescSortOrder? cdSortOrder = null) + VisualElementEnvironmentItem.ConceptDescSortOrder? cdSortOrder = null, + AasxMenu superMenu = null) { // // View @@ -436,10 +462,11 @@ public void DisplayOrEditAasEntityMultipleElements( // up down delete var bos = entities.GetListOfBusinessObjects(); EntityListMultipleUpDownDeleteHelper(stack, repo, - vesm.theEnv?.Submodels, bos, indexInfo, reFocus: true); + vesm.theEnv?.Submodels, bos, indexInfo, reFocus: true, superMenu: superMenu); // cut copy - DispMultiElementCutCopyPasteHelper(stack, repo, vesm.theEnv, parent, this.theCopyPaste, entities); + DispMultiElementCutCopyPasteHelper(stack, repo, vesm.theEnv, parent, this.theCopyPaste, entities, + superMenu: superMenu); } if (first is VisualElementSubmodelRef vesmr && parent is AdminShell.AdministrationShell aas @@ -449,10 +476,11 @@ public void DisplayOrEditAasEntityMultipleElements( var bos = entities.GetListOfMapResults((ve) => ve?.theSubmodelRef); EntityListMultipleUpDownDeleteHelper(stack, repo, - aas.submodelRefs, bos, indexInfo, reFocus: true); + aas.submodelRefs, bos, indexInfo, reFocus: true, superMenu: superMenu); // cut copy - DispMultiElementCutCopyPasteHelper(stack, repo, vesmr.theEnv, parent, this.theCopyPaste, entities); + DispMultiElementCutCopyPasteHelper(stack, repo, vesmr.theEnv, parent, this.theCopyPaste, entities, + superMenu: superMenu); } if (first is VisualElementSubmodelElement sme) @@ -463,13 +491,14 @@ public void DisplayOrEditAasEntityMultipleElements( if (bos.Count > 0 && parent is AdminShell.Submodel sm) EntityListMultipleUpDownDeleteHelper(stack, repo, - sm.submodelElements, bos, indexInfo, reFocus: true); + sm.submodelElements, bos, indexInfo, reFocus: true, superMenu: superMenu); if (bos.Count > 0 && parent is AdminShell.SubmodelElementCollection smec) EntityListMultipleUpDownDeleteHelper(stack, repo, - smec.value, bos, indexInfo, reFocus: true); + smec.value, bos, indexInfo, reFocus: true, superMenu: superMenu); - DispMultiElementCutCopyPasteHelper(stack, repo, sme.theEnv, parent, this.theCopyPaste, entities); + DispMultiElementCutCopyPasteHelper(stack, repo, sme.theEnv, parent, this.theCopyPaste, entities, + superMenu: superMenu); } if (first is VisualElementOperationVariable opv && parent is AdminShell.Operation oppa) @@ -488,11 +517,12 @@ public void DisplayOrEditAasEntityMultipleElements( VisualElementOperationVariable>((ve) => ve?.theOpVar); EntityListMultipleUpDownDeleteHelper(stack, repo, oppa[opv.theDir], bos, indexInfo, reFocus: true, - alternativeFocus: oppa); + alternativeFocus: oppa, superMenu: superMenu); } // cut copy - DispMultiElementCutCopyPasteHelper(stack, repo, opv.theEnv, parent, this.theCopyPaste, entities); + DispMultiElementCutCopyPasteHelper(stack, repo, opv.theEnv, parent, this.theCopyPaste, entities, + superMenu: superMenu); } if (first is VisualElementConceptDescription vecd) @@ -502,6 +532,7 @@ public void DisplayOrEditAasEntityMultipleElements( EntityListMultipleUpDownDeleteHelper(stack, repo, vecd.theEnv?.ConceptDescriptions, bos, indexInfo, + superMenu: superMenu, preventMove: cdSortOrder.HasValue && cdSortOrder.Value != VisualElementEnvironmentItem.ConceptDescSortOrder.None, sendUpdateEvent: new PackCntChangeEventData() @@ -513,7 +544,7 @@ public void DisplayOrEditAasEntityMultipleElements( // cut copy paste DispMultiElementCutCopyPasteHelper(stack, repo, vecd.theEnv, vecd.theEnv?.ConceptDescriptions, - this.theCopyPaste, entities); + this.theCopyPaste, entities, superMenu: superMenu); } if (first is VisualElementAsset veass) @@ -523,6 +554,7 @@ public void DisplayOrEditAasEntityMultipleElements( EntityListMultipleUpDownDeleteHelper(stack, repo, veass.theEnv?.Assets, bos, indexInfo, + superMenu: superMenu, sendUpdateEvent: new PackCntChangeEventData() { Container = packages?.GetAllContainer((cnr) => cnr?.Env?.AasEnv == veass.theEnv) @@ -532,7 +564,7 @@ public void DisplayOrEditAasEntityMultipleElements( // cut copy paste DispMultiElementCutCopyPasteHelper(stack, repo, veass.theEnv, veass.theEnv?.Assets, - this.theCopyPaste, entities); + this.theCopyPaste, entities, superMenu: superMenu); } if (first is VisualElementAdminShell veaas) @@ -542,6 +574,7 @@ public void DisplayOrEditAasEntityMultipleElements( EntityListMultipleUpDownDeleteHelper(stack, repo, veaas.theEnv?.AdministrationShells, bos, indexInfo, + superMenu: superMenu, sendUpdateEvent: new PackCntChangeEventData() { Container = packages?.GetAllContainer((cnr) => cnr?.Env?.AasEnv == veaas.theEnv) @@ -551,7 +584,7 @@ public void DisplayOrEditAasEntityMultipleElements( // cut copy paste DispMultiElementCutCopyPasteHelper(stack, repo, veaas.theEnv, veaas.theEnv?.AdministrationShells, - this.theCopyPaste, entities); + this.theCopyPaste, entities, superMenu: superMenu); } // @@ -562,24 +595,29 @@ public void DisplayOrEditAasEntityMultipleElements( if (bos.Count > 0 && !(first is VisualElementSupplementalFile)) { - this.AddAction(stack, "Actions:", new[] { "Change attribute .." }, repo, (buttonNdx) => - { - if (buttonNdx == 0) + AddAction(stack, "Actions:", + repo: repo, superMenu: superMenu, + ticketMenu: new AasxMenu() + .AddAction("aas-elem-cut", "Change attribute ..", + "Changes common attributes of multiple selected elements."), + ticketAction: (buttonNdx, ticket) => { - var uc = new AnyUiDialogueDataChangeElementAttributes(); - if (this.context.StartFlyoverModal(uc)) + if (buttonNdx == 0) { - object nf = null; - foreach (var bo in bos) + var uc = new AnyUiDialogueDataChangeElementAttributes(); + if (this.context.StartFlyoverModal(uc)) { - ChangeElementAttributes(bo, uc); - nf = bo; + object nf = null; + foreach (var bo in bos) + { + ChangeElementAttributes(bo, uc); + nf = bo; + } + return new AnyUiLambdaActionRedrawAllElements(nextFocus: nf); } - return new AnyUiLambdaActionRedrawAllElements(nextFocus: nf); } - } - return new AnyUiLambdaActionNone(); - }); + return new AnyUiLambdaActionNone(); + }); } } @@ -590,6 +628,7 @@ public void DisplayOrEditAasEntityMultipleElements( { // Delete EntityListSupplementaryFileHelper(stack, repo, entities, + superMenu: superMenu, alternativeFocus: VisualElementEnvironmentItem.GiveAliasDataObject( VisualElementEnvironmentItem.ItemType.SupplFiles)); } diff --git a/src/AasxWpfControlLibrary/DispEditAasxEntity.xaml.cs b/src/AasxWpfControlLibrary/DispEditAasxEntity.xaml.cs index fd53e64b0..eaea591e0 100644 --- a/src/AasxWpfControlLibrary/DispEditAasxEntity.xaml.cs +++ b/src/AasxWpfControlLibrary/DispEditAasxEntity.xaml.cs @@ -346,17 +346,20 @@ public DisplayRenderHints DisplayOrEditVisualAasxElement( if (entity is VisualElementEnvironmentItem veei) { _helper.DisplayOrEditAasEntityAasEnv( - packages, veei.theEnv, veei, editMode, stack, hintMode: hintMode); + packages, veei.theEnv, veei, editMode, stack, hintMode: hintMode, + superMenu: superMenu); } else if (entity is VisualElementAdminShell veaas) { _helper.DisplayOrEditAasEntityAas( - packages, veaas.theEnv, veaas.theAas, editMode, stack, hintMode: hintMode); + packages, veaas.theEnv, veaas.theAas, editMode, stack, hintMode: hintMode, + superMenu: superMenu); } else if (entity is VisualElementAsset veas) { _helper.DisplayOrEditAasEntityAsset( - packages, veas.theEnv, veas.theAsset, editMode, repo, stack, hintMode: hintMode); + packages, veas.theEnv, veas.theAsset, editMode, repo, stack, hintMode: hintMode, + superMenu: superMenu); } else if (entity is VisualElementSubmodelRef vesmref) { @@ -389,12 +392,13 @@ public DisplayRenderHints DisplayOrEditVisualAasxElement( { _helper.DisplayOrEditAasEntityOperationVariable( packages, vepv.theEnv, vepv.theContainer, vepv.theOpVar, editMode, - stack, hintMode: hintMode); + stack, hintMode: hintMode, superMenu: superMenu); } else if (entity is VisualElementConceptDescription vecd) { _helper.DisplayOrEditAasEntityConceptDescription( packages, vecd.theEnv, null, vecd.theCD, editMode, repo, stack, hintMode: hintMode, + superMenu: superMenu, preventMove: cdSortOrder.HasValue && cdSortOrder.Value != VisualElementEnvironmentItem.ConceptDescSortOrder.None); } @@ -403,7 +407,7 @@ public DisplayRenderHints DisplayOrEditVisualAasxElement( if (vevw.Parent != null && vevw.Parent is VisualElementAdminShell xpaas) _helper.DisplayOrEditAasEntityView( packages, vevw.theEnv, xpaas.theAas, vevw.theView, editMode, stack, - hintMode: hintMode); + hintMode: hintMode, superMenu: superMenu); else _helper.AddGroup(stack, "View is corrupted!", _helper.levelColors.MainSection); } @@ -419,7 +423,8 @@ public DisplayRenderHints DisplayOrEditVisualAasxElement( else if (entity is VisualElementSupplementalFile vesf) { - _helper.DisplayOrEditAasEntitySupplementaryFile(packages, vesf, vesf.theFile, editMode, stack); + _helper.DisplayOrEditAasEntitySupplementaryFile(packages, vesf, vesf.theFile, editMode, stack, + superMenu: superMenu); } else if (entity is VisualElementPluginExtension vepe) { @@ -531,7 +536,8 @@ public DisplayRenderHints DisplayOrEditVisualAasxElement( // // Dispatch: MULTIPLE items // - _helper.DisplayOrEditAasEntityMultipleElements(packages, entities, editMode, stack, cdSortOrder); + _helper.DisplayOrEditAasEntityMultipleElements(packages, entities, editMode, stack, cdSortOrder, + superMenu: superMenu); } // now render master stack From 387a6d9e4a533e6a38dbaf091d4aeb6bb178edd6 Mon Sep 17 00:00:00 2001 From: Michael Hoffmeister Date: Thu, 15 Dec 2022 16:43:03 +0100 Subject: [PATCH 21/23] Update sources * bug fix --- src/AasxWpfControlLibrary/AasxMenuWpf.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/AasxWpfControlLibrary/AasxMenuWpf.cs b/src/AasxWpfControlLibrary/AasxMenuWpf.cs index a980e470a..ca80d3757 100644 --- a/src/AasxWpfControlLibrary/AasxMenuWpf.cs +++ b/src/AasxWpfControlLibrary/AasxMenuWpf.cs @@ -152,6 +152,8 @@ public AnyUiLambdaActionBase HandleGlobalKeyDown(KeyEventArgs e, bool preview) foreach (var mi in Menu.FindAll()) { + if (mi.InputGesture == null) + continue; var g = kgConv.ConvertFromInvariantString(mi.InputGesture) as KeyGesture; if (g != null && g.Key == e.Key From fa37b56a77c59f026dca514678af32dace575650 Mon Sep 17 00:00:00 2001 From: Michael Hoffmeister Date: Fri, 16 Dec 2022 09:28:19 +0100 Subject: [PATCH 22/23] Update sources * make fit for Check.ps1 --- .../AdminShellCollections.cs | 4 +- src/AasxIntegrationBase/AasxMenu.cs | 25 ++++--- src/AasxPackageExplorer/AasxScript.cs | 31 ++++---- .../ExportTableFlyout.xaml.cs | 3 +- .../MainWindow.CommandBindings.cs | 74 ++++++++----------- src/AasxPackageExplorer/MainWindow.xaml.cs | 17 +++-- .../MainWindowScripting.cs | 20 ++--- .../MessageReportWindow.xaml.cs | 6 +- src/AasxPackageLogic/DispEditHelperBasics.cs | 17 +++-- .../DispEditHelperEntities.cs | 32 ++++---- src/AasxPackageLogic/MainWindowDispatch.cs | 23 +++--- src/AasxPackageLogic/MainWindowLogic.cs | 2 +- src/AasxPackageLogic/Options.cs | 2 +- .../ExportTableProcessor.cs | 2 +- src/AasxPluginSmdExporter/Plugin.cs | 2 +- .../AasxHttpContextHelper.cs | 6 +- src/AasxSignature/AasxSignature.cs | 13 ++-- src/AasxWpfControlLibrary/AasxMenuWpf.cs | 27 +++---- .../DispEditAasxEntity.xaml.cs | 2 +- .../Flyouts/TextEditorFlyout.xaml.cs | 6 +- .../ToolControlFindReplace.xaml.cs | 2 +- src/AnyUi/AnyUiDialogueDataBase.cs | 2 +- src/CheckFormat.ps1 | 15 +++- 23 files changed, 167 insertions(+), 166 deletions(-) diff --git a/src/AasxCsharpLibrary/AdminShellCollections.cs b/src/AasxCsharpLibrary/AdminShellCollections.cs index 4b43b2ec6..26fc3f837 100644 --- a/src/AasxCsharpLibrary/AdminShellCollections.cs +++ b/src/AasxCsharpLibrary/AdminShellCollections.cs @@ -56,9 +56,9 @@ public void AddPair(T1 item1, T2 item2) public T2 Get2(T1 key1) => _forward[key1]; public T1 Get1(T2 key2) => _backward[key2]; - public T2 Get2OrDefault(T1 key1) + public T2 Get2OrDefault(T1 key1) => (key1 != null && _forward.ContainsKey(key1)) ? _forward[key1] : default(T2); - public T1 Get1OrDefault(T2 key2) + public T1 Get1OrDefault(T2 key2) => (key2 != null && _backward.ContainsKey(key2)) ? _backward[key2] : default(T1); public void Clear() { _forward.Clear(); _backward.Clear(); } diff --git a/src/AasxIntegrationBase/AasxMenu.cs b/src/AasxIntegrationBase/AasxMenu.cs index d7228ace5..65c61ae4f 100644 --- a/src/AasxIntegrationBase/AasxMenu.cs +++ b/src/AasxIntegrationBase/AasxMenu.cs @@ -36,11 +36,12 @@ public enum AasxMenuFilter /// /// Special information requirement to an AASX menu item /// - public enum AasxMenuArgReqInfo { + public enum AasxMenuArgReqInfo + { None = 0x00, - AAS = 0x01, - Submodel = 0x02, - SubmodelRef = 0x04, + AAS = 0x01, + Submodel = 0x02, + SubmodelRef = 0x04, SME = 0x08, SmSmrSme = 0x02 | 0x04 | 0x08 }; @@ -95,7 +96,7 @@ public class AasxMenuListOfArgDefs : List public AasxMenuListOfArgDefs Add( string name, string help, bool hidden = false) { - this.Add(new AasxMenuArgDef() { Name = name, Help = help, Hidden = hidden }); + this.Add(new AasxMenuArgDef() { Name = name, Help = help, Hidden = hidden }); return this; } @@ -153,7 +154,7 @@ public bool PopulateObjectFromArgs(object o) var name = f.Name; if (!name.HasContent()) name = t.Name; - + foreach (var ad in this) if (ad.Key?.Name?.Trim().ToLower() == name.ToLower()) { @@ -173,7 +174,7 @@ public bool PopulateObjectFromArgs(object o) /// /// Name of menu item in lower case public delegate void AasxMenuActionDelegate( - string nameLower, + string nameLower, AasxMenuItemBase item, AasxMenuActionTicket ticket); @@ -182,7 +183,7 @@ public delegate void AasxMenuActionDelegate( /// /// Name of menu item in lower case public delegate Task AasxMenuActionAsyncDelegate( - string nameLower, + string nameLower, AasxMenuItemBase item, AasxMenuActionTicket ticket); @@ -312,7 +313,7 @@ public class AasxMenuItem : AasxMenuItemHotkeyed public AasxMenuItem() { } - + // // more // @@ -320,7 +321,7 @@ public AasxMenuItem() public void Add(AasxMenuItemBase item) { Childs.Add(item); - } + } } @@ -528,7 +529,7 @@ public IEnumerable FindAll(Func pred = } } - public IEnumerable FindAll(Func pred = null) + public IEnumerable FindAll(Func pred = null) where T : AasxMenuItemBase { foreach (var ch in this) @@ -681,7 +682,7 @@ public object this[string name] if (av.Key?.Name?.Trim().ToLower() == name?.Trim().ToLower()) return av.Value; return null; - } + } set { if (ArgValue != null) diff --git a/src/AasxPackageExplorer/AasxScript.cs b/src/AasxPackageExplorer/AasxScript.cs index 5164282f1..450d80251 100644 --- a/src/AasxPackageExplorer/AasxScript.cs +++ b/src/AasxPackageExplorer/AasxScript.cs @@ -70,12 +70,12 @@ public static void Tool(string cmd, params string[] args) Console.WriteLine($"Execute {cmd} " + string.Join(",", args)); } - public static void Flex(int a=0, int b=0, int c=0) + public static void Flex(int a = 0, int b = 0, int c = 0) { Console.WriteLine($"Flex a {a} b {b} c{c}"); } } - + public class ScriptInvokableBase : IInvokable { protected AasxScript _script = null; @@ -95,7 +95,7 @@ public virtual object Invoke(IScriptContext context, object[] args) public class Script_WriteLine : ScriptInvokableBase { - public Script_WriteLine(AasxScript script) : base(script) + public Script_WriteLine(AasxScript script) : base(script) { script?.AddHelpInfo("WriteLine", "Outputs all arguments to script log messages and starts new line.", @@ -112,7 +112,7 @@ public override object Invoke(IScriptContext context, object[] args) public class Script_Sleep : ScriptInvokableBase { - public Script_Sleep(AasxScript script) : base(script) + public Script_Sleep(AasxScript script) : base(script) { script?.AddHelpInfo("Sleep", "Pauses the execution for a number of given milli seconds.", @@ -256,7 +256,7 @@ public override object Invoke(IScriptContext context, object[] args) // debug if (_script._logLevel >= 2) Console.WriteLine($"Execute Select " + string.Join(",", args)); - + // invoke action // https://stackoverflow.com/questions/39438441/ var x = Application.Current.Dispatcher.Invoke(() => @@ -265,7 +265,7 @@ public override object Invoke(IScriptContext context, object[] args) }); if (x != null) Log.Singleton.Silent("" + x.idShort); - + // done return x; } @@ -273,7 +273,7 @@ public override object Invoke(IScriptContext context, object[] args) public class Script_Location : ScriptInvokableBase { - public Script_Location(AasxScript script) : base(script) + public Script_Location(AasxScript script) : base(script) { script?.AddHelpInfo("Location", "Stores (\"Push\") or retrieves (\"Pop\") the currently selected item from a stack.", @@ -291,7 +291,7 @@ public override object Invoke(IScriptContext context, object[] args) { _script.ScriptLog?.Error("Script: Location: Command is missing!"); return -1; - } + } // check for allowed commands var cmdtl = cmd.Trim().ToLower(); @@ -320,7 +320,7 @@ public override object Invoke(IScriptContext context, object[] args) public class Script_System : ScriptInvokableBase { - public Script_System(AasxScript script) : base(script) + public Script_System(AasxScript script) : base(script) { script?.AddHelpInfo("System", "Executes a command-line given by the arguments on the operating system prompt.", @@ -362,7 +362,7 @@ public override object Invoke(IScriptContext context, object[] args) p.Start(); // Do not wait for the child process to exit before // reading to the end of its redirected stream. - // p.WaitForExit(); + //// p.WaitForExit(); // Read the output stream first and then wait. string stdout = p.StandardOutput.ReadToEnd(); string stderr = p.StandardError.ReadToEnd(); @@ -388,14 +388,14 @@ public void PrepareHelp() foreach (var nt in root.GetNestedTypes()) if (nt.GetInterfaces().Contains(typeof(IInvokable))) { - var x = Activator.CreateInstance(nt,this); + var x = Activator.CreateInstance(nt, this); } } public void StartEnginBackground( - string script, + string script, int logLevel, - AasxMenu rootMenu, + AasxMenu rootMenu, IAasxScriptRemoteInterface remote) { // access @@ -453,8 +453,9 @@ public void StartEnginBackground( s.Execute(); if (_logLevel >= 2) Log.Singleton.Info("Script: .. execution ended."); - } - catch (Exception ex) { + } + catch (Exception ex) + { Log.Singleton.Error(ex, "Script: "); } }; diff --git a/src/AasxPackageExplorer/FlyoutsForPlugins/ExportTableFlyout.xaml.cs b/src/AasxPackageExplorer/FlyoutsForPlugins/ExportTableFlyout.xaml.cs index ea236ae60..87cbc9768 100644 --- a/src/AasxPackageExplorer/FlyoutsForPlugins/ExportTableFlyout.xaml.cs +++ b/src/AasxPackageExplorer/FlyoutsForPlugins/ExportTableFlyout.xaml.cs @@ -78,7 +78,8 @@ private void UserControl_Loaded(object sender, RoutedEventArgs e) {Referable}.{idShort, category, description[@en..], elementName, elementShort, elementShort2, elementAbbreviation, kind, parent}, {Referable|Identifiable} = {SM, SME, CD}, depth, indent} {Identifiable}.{identification[.{idType, id}], administration.{ version, revision}}, {Qualifiable}.qualifiers, {Qualifiable}.multiplicity {Reference}, {Reference}[0..n], {Reference}[0..n].{type, local, idType, value}, {Reference} = {semanticId, isCaseOf, unitId} - SME.value, Property.{value, valueType, valueId}, MultiLanguageProperty.{value, vlaueId}, Range.{valueType, min, max}, Blob.{mimeType, value}, File.{mimeType, value}, ReferenceElement.value, RelationshipElement.{first, second}, SubmodelElementCollection.{value = #elements, ordered, allowDuplicates}, Entity.{entityType, asset} + SME.value, Property.{value, valueType, valueId}, MultiLanguageProperty.{value, vlaueId}, Range.{valueType, min, max}, Blob.{mimeType, value}, File.{mimeType, value}, ReferenceElement.value, + RelationshipElement.{first, second}, SubmodelElementCollection.{value = #elements, ordered, allowDuplicates}, Entity.{entityType, asset} CD.{preferredName[@en..], shortName[@en..], unit, unitId, sourceOfDefinition, symbol, dataType, definition[@en..], valueFormat} Special: %*% = match any, %stop% = stop if non-empty, %seq={ascii}% = split sequence by char {ascii}, %opt% = optional match Commands for header cells include: %fg={color}%, %bg={color}% with {color} = {#a030a0, Red, blue, ..}, %halign={left, center, right}%, %valign={top, center, bottom}%, diff --git a/src/AasxPackageExplorer/MainWindow.CommandBindings.cs b/src/AasxPackageExplorer/MainWindow.CommandBindings.cs index abf8ef8ef..f303b4edc 100644 --- a/src/AasxPackageExplorer/MainWindow.CommandBindings.cs +++ b/src/AasxPackageExplorer/MainWindow.CommandBindings.cs @@ -18,37 +18,21 @@ This source code may use other Open Source software components (see LICENSE.txt) using System.Net; using System.Net.Http; using System.Reflection; -using System.Security.Cryptography; -using System.Security.Cryptography.X509Certificates; using System.Text; using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; using System.Windows; using System.Windows.Input; -using System.Xml.Serialization; -using AasxDictionaryImport; using AasxIntegrationBase; using AasxPackageLogic; using AasxPackageLogic.PackageCentral; using AasxPackageLogic.PackageCentral.AasxFileServerInterface; -using AasxSignature; using AasxUANodesetImExport; using AdminShellNS; using AnyUi; using Jose; using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using Newtonsoft.Json.Serialization; -// using NPOI.SS.Formula.Functions; -//using NPOI.HSSF.Record; -//using NPOI.SS.Formula.Functions; -using Org.BouncyCastle.Crypto; -using Org.Webpki.JsonCanonicalizer; -// using static System.Net.WebRequestMethods; -using static AasxFormatCst.CstPropertyRecord; -using static AasxToolkit.Cli; -using static QRCoder.PayloadGenerator; namespace AasxPackageExplorer { @@ -82,10 +66,10 @@ public AasxMenu CreateMainMenu() // File // - menu.AddMenu(header: "File", + menu.AddMenu(header: "File", childs: (new AasxMenu()) .AddWpf(name: "New", header: "_New …") - .AddWpf(name: "Open", header: "_Open …", inputGesture: "Ctrl+O", + .AddWpf(name: "Open", header: "_Open …", inputGesture: "Ctrl+O", help: "Open existing AASX package.", args: new AasxMenuListOfArgDefs() .Add("File", "Source filename including a path and extension.")) @@ -146,7 +130,7 @@ public AasxMenu CreateMainMenu() .AddSeparator() .AddWpf(name: "FileRepoQuery", header: "Query open repositories …", inputGesture: "F12", help: "Selects and repository item (AASX) from the open AASX file repositories.", - args: new AasxMenuListOfArgDefs() + args: new AasxMenuListOfArgDefs() .Add("Index", "Zero-based integer index to the list of all open repos.") .Add("AAS", "String with AAS-Id") .Add("Asset", "String with Asset-Id."))) @@ -224,7 +208,7 @@ public AasxMenu CreateMainMenu() help: "Export OPC UA Nodeset2.xml format as i4aas-nodeset.", args: new AasxMenuListOfArgDefs() .Add("File", "OPC UA Nodeset2.xml file to write.")) - .AddWpf(name: "OpcUaExportNodeSetUaPlugin", + .AddWpf(name: "OpcUaExportNodeSetUaPlugin", header: "Export OPC UA Nodeset2.xml (via UA server plug-in) …", help: "Export OPC UA Nodeset2.xml format by starting OPC UA server in plugin and " + "execute a post-process command.", @@ -244,7 +228,7 @@ public AasxMenu CreateMainMenu() args: new AasxMenuListOfArgDefs() .Add("Machine", "Designation of the machine/ equipment.") .Add("Model", "Model type, either 'Physical' or 'Signal'.")) - .AddWpf(name: "ExportTable", header: "Export SubmodelElements as Table …", + .AddWpf(name: "ExportTable", header: "Export SubmodelElements as Table …", help: "Export table(s) for sets of SubmodelElements in multiple common formats.", args: new AasxMenuListOfArgDefs() .Add("File", "Filename and path of file to exported.") @@ -276,11 +260,11 @@ public AasxMenu CreateMainMenu() menu.AddMenu(header: "Workspace", childs: (new AasxMenu()) - .AddWpf(name: "EditMenu", header: "_Edit", inputGesture: "Ctrl+E", + .AddWpf(name: "EditMenu", header: "_Edit", inputGesture: "Ctrl+E", onlyDisplay: true, isCheckable: true, args: new AasxMenuListOfArgDefs() .Add("Mode", "'True' to activate edit mode, 'False' to turn off.")) - .AddWpf(name: "HintsMenu", header: "_Hints", inputGesture: "Ctrl+H", + .AddWpf(name: "HintsMenu", header: "_Hints", inputGesture: "Ctrl+H", onlyDisplay: true, isCheckable: true, isChecked: true, args: new AasxMenuListOfArgDefs() .Add("Mode", "'True' to activate hints mode, 'False' to turn off.")) @@ -459,7 +443,7 @@ private void FillSelectedItem(AasxMenuActionTicket ticket = null) ticket.Submodel = vesmr.theSubmodel; ticket.SubmodelRef = vesmr.theSubmodelRef; } - + if (DisplayElements.SelectedItem is VisualElementSubmodel vesm) { ticket.Package = _packageCentral?.Main; @@ -477,7 +461,7 @@ private void FillSelectedItem(AasxMenuActionTicket ticket = null) } private async Task CommandBinding_GeneralDispatch( - string cmd, + string cmd, AasxMenuItemBase menuItem, AasxMenuActionTicket ticket) { @@ -557,7 +541,7 @@ private async Task CommandBinding_GeneralDispatch( break; default: throw new InvalidOperationException($"Unexpected {nameof(cmd)}: {cmd}"); - } + } } if (cmd == "save") @@ -685,7 +669,7 @@ private async Task CommandBinding_GeneralDispatch( System.IO.Path.GetFullPath(Options.Curr.BackupDir), Options.Curr.BackupFiles, PackageContainerBase.BackupType.FullCopy); - + // as saving changes the structure of pending supplementary files, re-display RedrawAllAasxElements(); } @@ -749,7 +733,7 @@ private async Task CommandBinding_GeneralDispatch( else useX509 = (AnyUiMessageBoxResult.Yes == MessageBoxFlyoutShow( "Use X509 (yes) or Verifiable Credential (No)?", - "X509 or VerifiableCredential", + "X509 or VerifiableCredential", AnyUiMessageBoxButton.YesNo, AnyUiMessageBoxImage.Hand)); ticket["UseX509"] = useX509; @@ -1467,7 +1451,7 @@ public async Task CommandBinding_FileRepoAll( // access if (_packageCentral.Repositories == null || _packageCentral.Repositories.Count < 1) { - _logic?.LogErrorToTicket(ticket, + _logic?.LogErrorToTicket(ticket, "AASX File Repository: No repository currently available! Please open."); return; } @@ -1557,7 +1541,7 @@ public async Task CommandBinding_FileRepoAll( if (cmd == "filerepocreatelru") { - if (ticket.ScriptMode != true && AnyUiMessageBoxResult.OK != MessageBoxFlyoutShow( + if (ticket.ScriptMode != true && AnyUiMessageBoxResult.OK != MessageBoxFlyoutShow( "Create new (empty) \"Last Recently Used (LRU)\" list? " + "It will be added to list of repos on the lower/ left of the screen. " + "It will be saved under \"last-recently-used.json\" in the binaries folder. " + @@ -1583,7 +1567,7 @@ public async Task CommandBinding_FileRepoAll( } catch (Exception ex) { - _logic?.LogErrorToTicket(ticket, ex, + _logic?.LogErrorToTicket(ticket, ex, $"while initializing last recently used file in {lruFn}."); } } @@ -1713,7 +1697,7 @@ public void CommandBinding_PrintAsset( if (ticket.Asset?.identification == null) { - _logic?.LogErrorToTicket(ticket, + _logic?.LogErrorToTicket(ticket, "No asset selected or no asset identification for printing code sheet."); return; } @@ -2174,7 +2158,7 @@ private void CommandBinding_ExecutePluginServer( /// /// Success public bool MenuSelectEnvSubmodel( - AasxMenuActionTicket ticket, + AasxMenuActionTicket ticket, out AdminShell.AdministrationShellEnv env, out AdminShell.Submodel sm, out AdminShell.SubmodelRef smr, @@ -2231,7 +2215,7 @@ public bool MenuSelectOpenFilename( dlg.FileName = proposeFn; if (filter != null) dlg.Filter = filter; - + if (Options.Curr.UseFlyovers) this.StartFlyover(new EmptyFlyout()); if (true == dlg.ShowDialog()) sourceFn = dlg.FileName; @@ -2329,7 +2313,7 @@ public bool MenuSelectSaveFilenameToTicket( string msg, string argFilterIndex = null) { - if (MenuSelectSaveFilename(ticket, argName, caption, proposeFn, filter, + if (MenuSelectSaveFilename(ticket, argName, caption, proposeFn, filter, out var targetFn, out var filterIndex, msg)) { RememberForInitialDirectory(targetFn); @@ -2424,7 +2408,7 @@ public void CommandBinding_SubmodelReadWritePutGet( RedrawAllAasxElements(); RedrawElementView(); - } + } catch (Exception ex) { _logic?.LogErrorToTicket(ticket, ex, "Submodel Read"); @@ -2564,7 +2548,7 @@ public void CommandBinding_ImportDictToSubmodel( } #endif } - + if (cmd == "importdictsubmodelelements") { // start @@ -2599,7 +2583,7 @@ public void CommandBinding_ImportDictToSubmodel( } } - + public void CommandBinding_ImportExportAML( string cmd, AasxMenuActionTicket ticket = null) @@ -2692,7 +2676,7 @@ public void CommandBinding_RDFRead( } catch (Exception ex) { - _logic?.LogErrorToTicket(ticket, ex, + _logic?.LogErrorToTicket(ticket, ex, "When importing, an error occurred"); } } @@ -2821,7 +2805,7 @@ public void CommandBinding_ConvertElement( if (uc.DiaData.ResultItem != null) ticket["Record"] = uc.DiaData.ResultItem.Tag; } - + // pass on try { @@ -3031,7 +3015,7 @@ public void CommandBinding_ExportImportTableUml( dlgFilter = "Tab separated file (*.txt)|*.txt|Tab separated file (*.tsf)|*.tsf|All files (*.*)|*.*"; } - + // ask now for a filename if (!MenuSelectOpenFilenameToTicket( ticket, "File", @@ -3051,7 +3035,7 @@ public void CommandBinding_ExportImportTableUml( { _logic?.LogErrorToTicket(ticket, ex, "Import time series: passing on."); } - } + } // redraw CommandExecution_RedrawAll(); @@ -3314,11 +3298,11 @@ public void CommandBinding_ExportOPCUANodeSet( { _logic?.CommandBinding_GeneralDispatch(cmd, ticket); - // TODO (MIHO, 2022-11-17) notvery elegant + // TODO (MIHO, 2022-11-17): not very elegant if (ticket.PostResults != null && ticket.PostResults.ContainsKey("TakeOver") && ticket.PostResults["TakeOver"] is AdminShellPackageEnv pe) _packageCentral.MainItem.TakeOver(pe); - + RestartUIafterNewPackage(); } catch (Exception ex) @@ -3352,7 +3336,7 @@ public void CommandBinding_ExportSMD( var pi = Plugins.FindPluginInstance(pluginName); if (pi == null || !pi.HasAction(actionName)) { - _logic?.LogErrorToTicket(ticket, + _logic?.LogErrorToTicket(ticket, $"This function requires a binary plug-in file named '{pluginName}', " + $"which needs to be added to the command line, with an action named '{actionName}'."); return; diff --git a/src/AasxPackageExplorer/MainWindow.xaml.cs b/src/AasxPackageExplorer/MainWindow.xaml.cs index ca874890f..3ee9d7b56 100644 --- a/src/AasxPackageExplorer/MainWindow.xaml.cs +++ b/src/AasxPackageExplorer/MainWindow.xaml.cs @@ -696,7 +696,8 @@ private async void Window_Loaded(object sender, RoutedEventArgs e) var cmd = new RoutedUICommand("Test", "NameOfTest", typeof(string)); - this.CommandBindings.Add(new CommandBinding(cmd, (s3, e3) => { + this.CommandBindings.Add(new CommandBinding(cmd, (s3, e3) => + { // decode var ruic = e3?.Command as RoutedUICommand; if (ruic == null) @@ -994,7 +995,7 @@ private async void Window_Loaded(object sender, RoutedEventArgs e) _aasxScript.StartEnginBackground( script, Options.Curr.ScriptLoglevel, _mainMenu?.Menu, this); - } + } catch (Exception ex) { Log.Singleton.Error(ex, $"when executing script file {Options.Curr.ScriptFn}"); @@ -2605,7 +2606,7 @@ private void mainWindow_PreviewKeyDown(object sender, KeyEventArgs e) // DispEditEntityPanel.HandleGlobalKeyDown(e, preview: true); - var la = _dynamicMenu?.HandleGlobalKeyDown(e, preview: true); + var la = _dynamicMenu?.HandleGlobalKeyDown(e, preview: true); if (la != null && !(la is AnyUiLambdaActionNone)) { // add to "normal" event quoue @@ -2623,7 +2624,7 @@ private void mainWindow_PreviewKeyDown(object sender, KeyEventArgs e) } } -#region Modal Flyovers + #region Modal Flyovers //==================== private List flyoutLogMessages = null; @@ -2865,7 +2866,7 @@ public AnyUiMessageBoxResult MessageBoxFlyoutLogOrShow( return AnyUiMessageBoxResult.OK; } else - return MessageBoxFlyoutShow(message, caption, buttons, image); + return MessageBoxFlyoutShow(message, caption, buttons, image); } public Window GetWin32Window() @@ -2873,8 +2874,8 @@ public Window GetWin32Window() return this; } -#endregion -#region Drag&Drop + #endregion + #region Drag&Drop //=============== private void Window_DragEnter(object sender, DragEventArgs e) @@ -2964,7 +2965,7 @@ private void DragSource_PreviewMouseLeftButtonDown(object sender, MouseButtonEve dragStartPoint = e.GetPosition(null); } -#endregion + #endregion private void ButtonTools_Click(object sender, RoutedEventArgs e) { diff --git a/src/AasxPackageExplorer/MainWindowScripting.cs b/src/AasxPackageExplorer/MainWindowScripting.cs index 041370e83..6ea57ba71 100644 --- a/src/AasxPackageExplorer/MainWindowScripting.cs +++ b/src/AasxPackageExplorer/MainWindowScripting.cs @@ -114,7 +114,7 @@ public void CommandBinding_ScriptEditLaunch(string cmd, AasxMenuItemBase menuIte Log.Singleton.Info("Copied JSON to clipboard."); } }; - + // execute this.StartFlyoverModal(uc); _currentScriptText = uc.DiaData.Text; @@ -138,8 +138,8 @@ public void CommandBinding_ScriptEditLaunch(string cmd, AasxMenuItemBase menuIte } } - for (int i=0;i<9; i++) - if (cmd == $"launchscript{i}" + for (int i = 0; i < 9; i++) + if (cmd == $"launchscript{i}" && Options.Curr.ScriptPresets != null) { // order in human sense @@ -165,7 +165,7 @@ public void CommandBinding_ScriptEditLaunch(string cmd, AasxMenuItemBase menuIte { if (AnyUiMessageBoxResult.Yes != MessageBoxFlyoutShow( $"Executing script preset #{1 + scriptIndex} " + - $"'{Options.Curr.ScriptPresets[scriptIndex].Name}'. \nContinue?", + $"'{Options.Curr.ScriptPresets[scriptIndex].Name}'. \nContinue?", "Question", AnyUiMessageBoxButton.YesNo, AnyUiMessageBoxImage.Question)) return; } @@ -221,7 +221,7 @@ public enum ScriptSelectAdressMode { None = 0, First, Next, Prev, idShort, seman // available elements in the environment var firstAas = pm.AdministrationShells.FirstOrDefault(); - + AdminShell.Submodel firstSm = null; if (firstAas != null && firstAas.submodelRefs != null && firstAas.submodelRefs.Count > 0) firstSm = pm.FindSubmodel(firstAas.submodelRefs[0]); @@ -249,7 +249,7 @@ public enum ScriptSelectAdressMode { None = 0, First, Next, Prev, idShort, seman { // just return as Referable return new Tuple( - siThis?.GetDereferencedMainDataObject() as AdminShell.Referable, + siThis?.GetDereferencedMainDataObject() as AdminShell.Referable, siThis?.GetMainDataObject() ); } @@ -323,7 +323,7 @@ public enum ScriptSelectAdressMode { None = 0, First, Next, Prev, idShort, seman if (refType == ScriptSelectRefType.AAS) { var idx = pm?.AdministrationShells?.IndexOf(siAAS?.theAas); - if (siAAS?.theAas == null || idx == null + if (siAAS?.theAas == null || idx == null || idx.Value < 0 || idx.Value >= pm.AdministrationShells.Count - 1) { Log.Singleton.Error("Script: For next AAS, the selected AAS is unknown " + @@ -337,7 +337,7 @@ public enum ScriptSelectAdressMode { None = 0, First, Next, Prev, idShort, seman if (refType == ScriptSelectRefType.SM) { var idx = siAAS?.theAas.submodelRefs?.IndexOf(siSM?.theSubmodelRef); - if (siAAS?.theAas?.submodelRefs == null + if (siAAS?.theAas?.submodelRefs == null || siSM?.theSubmodel == null || siSM?.theSubmodelRef == null || idx == null @@ -480,13 +480,13 @@ AdminShellV20.Referable IAasxScriptRemoteInterface.Select(object[] args) DisplayElements.ClearSelection(); DisplayElements.TrySelectMainDataObject(selEval.Item2, wishExpanded: true); return selEval.Item1; - } + } // nothing found return null; } - + public async Task Tool(object[] args) { if (args == null || args.Length < 1 || !(args[0] is string toolName)) diff --git a/src/AasxPackageExplorer/MessageReportWindow.xaml.cs b/src/AasxPackageExplorer/MessageReportWindow.xaml.cs index e33d92c2f..260e46d1b 100644 --- a/src/AasxPackageExplorer/MessageReportWindow.xaml.cs +++ b/src/AasxPackageExplorer/MessageReportWindow.xaml.cs @@ -29,7 +29,7 @@ public MessageReportWindow(IEnumerable storedPrints, string windowT FlowDocViewer.Document = new FlowDocument(); ButtonToggleWrap.IsChecked = false; - SetWordWrapping(false); + SetWordWrapping(false); foreach (var sp in storedPrints) { @@ -40,9 +40,9 @@ public MessageReportWindow(IEnumerable storedPrints, string windowT #endif // Add to flow document AasxWpfBaseUtils.StoredPrintToFloqDoc( - FlowDocViewer.Document, sp, AasxWpfBaseUtils.DarkPrintColors, + FlowDocViewer.Document, sp, AasxWpfBaseUtils.DarkPrintColors, linkClickHandler: link_Click); - } + } } protected ScrollViewer FindScrollViewer(FlowDocumentScrollViewer flowDocumentScrollViewer) diff --git a/src/AasxPackageLogic/DispEditHelperBasics.cs b/src/AasxPackageLogic/DispEditHelperBasics.cs index 32d1b0182..6364e03f0 100644 --- a/src/AasxPackageLogic/DispEditHelperBasics.cs +++ b/src/AasxPackageLogic/DispEditHelperBasics.cs @@ -709,11 +709,12 @@ public void AddAction(AnyUiPanel view, string key, string[] actionStr = null, Mo // an re-route lambdas if (superMenu != null && ticketMenu != null && ticketAction != null) { - for (int i=0; i { + tmi.Action = (name, item, ticket) => + { if (ticket != null) ticket.UiLambdaAction = ticketAction(currentI, ticket); }; @@ -776,15 +777,15 @@ public void AddAction(AnyUiPanel view, string key, string[] actionStr = null, Mo // button # as argument! return (ticketAction != null) ? ticketAction(currentI, null) - : action(currentI); + : action(currentI); }); if (actionTags != null && i < actionTags.Length) AnyUiUIElement.NameControl(b, actionTags[i]); // can set a tool tip? - if (ticketMenu != null && ticketMenu.Count > i - && ticketMenu[i] is AasxMenuItem mii + if (ticketMenu != null && ticketMenu.Count > i + && ticketMenu[i] is AasxMenuItem mii && mii.HelpText?.HasContent() == true) b.ToolTip = mii.HelpText; } @@ -1020,7 +1021,7 @@ public AdminShell.SubmodelElementWrapper.AdequateElementEnum SelectAdequateEnum( if (arg != null) foreach (var foli in fol) if (foli.Text.Trim().ToLower() == arg.Trim().ToLower()) - return (AdminShell.SubmodelElementWrapper.AdequateElementEnum) foli.Tag; + return (AdminShell.SubmodelElementWrapper.AdequateElementEnum)foli.Tag; // prompt for this list var uc = new AnyUiDialogueDataSelectFromList( @@ -1681,7 +1682,7 @@ public void EntityListUpDownDeleteHelper( repo: repo, superMenu: superMenu, ticketMenu: new AasxMenu() - .AddAction("aas-elem-move-up", "Move up", + .AddAction("aas-elem-move-up", "Move up", "Moves the currently selected element up in containing collection.", inputGesture: "Shift+Ctrl+Up") .AddAction("aas-elem-move-down", "Move down", @@ -1792,7 +1793,7 @@ public void QualifierHelper( // let the user control the number of references AddAction( stack, "Qualifier entities:", - repo: repo, + repo: repo, superMenu: superMenu, ticketMenu: new AasxMenu() .AddAction("qualifier-blank", "Add blank", diff --git a/src/AasxPackageLogic/DispEditHelperEntities.cs b/src/AasxPackageLogic/DispEditHelperEntities.cs index 45cb1eb48..4f06f7279 100644 --- a/src/AasxPackageLogic/DispEditHelperEntities.cs +++ b/src/AasxPackageLogic/DispEditHelperEntities.cs @@ -73,7 +73,7 @@ public void DisplayOrEditAasEntityAsset( } // print code sheet - AddAction(stack, "Actions:", + AddAction(stack, "Actions:", repo: repo, superMenu: superMenu, ticketMenu: new AasxMenu() @@ -81,22 +81,22 @@ public void DisplayOrEditAasEntityAsset( "Prints an sheet with 2D codes for the asset id."), ticketAction: (buttonNdx, ticket) => { - if (buttonNdx == 0) - { - var uc = new AnyUiDialogueDataEmpty(); - this.context?.StartFlyover(uc); - try - { - this.context?.PrintSingleAssetCodeSheet(asset.identification.id, asset.idShort); - } - catch (Exception ex) + if (buttonNdx == 0) { - Log.Singleton.Error(ex, "When printing, an error occurred"); + var uc = new AnyUiDialogueDataEmpty(); + this.context?.StartFlyover(uc); + try + { + this.context?.PrintSingleAssetCodeSheet(asset.identification.id, asset.idShort); + } + catch (Exception ex) + { + Log.Singleton.Error(ex, "When printing, an error occurred"); + } + this.context?.CloseFlyover(); } - this.context?.CloseFlyover(); - } - return new AnyUiLambdaActionNone(); - }); + return new AnyUiLambdaActionNone(); + }); // Referable this.DisplayOrEditEntityReferable(stack, asset, categoryUsual: false); @@ -2648,7 +2648,7 @@ public void DisplayOrEditAasEntitySubmodelElement( } return new AnyUiLambdaActionNone(); }); - } + } if (editMode && sme is AdminShell.Operation smo) { diff --git a/src/AasxPackageLogic/MainWindowDispatch.cs b/src/AasxPackageLogic/MainWindowDispatch.cs index e1cdd7de0..32ca8fcf4 100644 --- a/src/AasxPackageLogic/MainWindowDispatch.cs +++ b/src/AasxPackageLogic/MainWindowDispatch.cs @@ -71,7 +71,7 @@ public async Task CommandBinding_GeneralDispatch( // // Dispatch (Sign and Validate either on Submodel / AAS level) // - + if ((cmd == "sign" || cmd == "validatecertificate" || cmd == "encrypt")) { if (cmd == "sign" @@ -98,7 +98,7 @@ public async Task CommandBinding_GeneralDispatch( { LogErrorToTicket(ticket, ex, "Signing Submodel/ SME"); } - + // important to return here! return; } @@ -424,7 +424,7 @@ public async Task CommandBinding_GeneralDispatch( if (cmd == "submodeltdexport") { // arguments - if (ticket.Submodel == null || + if (ticket.Submodel == null || !(ticket["File"] is string fn) || fn.HasContent() != true) { LogErrorToTicket(ticket, @@ -485,7 +485,7 @@ public async Task CommandBinding_GeneralDispatch( if (cmd == "importaml") { // arguments - if (ticket.Env == null || ticket.Env == null + if (ticket.Env == null || ticket.Env == null || ticket.Submodel != null || ticket.SubmodelElement != null || !(ticket["File"] is string fn) || fn.HasContent() != true) { @@ -606,7 +606,7 @@ public async Task CommandBinding_GeneralDispatch( try { UANodeSet InformationModel = UANodeSetExport.getInformationModel(fn); - + ticket.PostResults = new Dictionary(); ticket.PostResults.Add("TakeOver", UANodeSetImport.Import(InformationModel)); @@ -622,7 +622,7 @@ public async Task CommandBinding_GeneralDispatch( { // arguments if (ticket.Env == null || ticket.Env == null - || ticket.Submodel == null + || ticket.Submodel == null || !(ticket["File"] is string fn) || fn.HasContent() != true) { LogErrorToTicket(ticket, @@ -645,7 +645,7 @@ public async Task CommandBinding_GeneralDispatch( if (cmd == "exportpredefineconcepts") { // arguments - if (ticket.Env == null + if (ticket.Env == null || ticket.Submodel == null || !(ticket["File"] is string fn) || fn.HasContent() != true) { @@ -668,7 +668,7 @@ public async Task CommandBinding_GeneralDispatch( if (cmd == "exporttable" || cmd == "importtable") { // arguments - if (ticket.Env == null + if (ticket.Env == null || ticket.Submodel == null || !(ticket["File"] is string fn) || fn.HasContent() != true) { @@ -924,7 +924,7 @@ record = rec; Log.Singleton.Error(ex, "when adding Submodel to AAS"); } } - + if (cmd == "convertelement") { // arguments @@ -972,7 +972,7 @@ record = o; } } - public Tuple, ExportUmlRecord, ImportTimeSeriesRecord> + public Tuple, ExportUmlRecord, ImportTimeSeriesRecord> GetImportExportTablePreset() { // try to get presets from the plugin @@ -988,7 +988,8 @@ public Tuple, ExportUmlRecord, ImportTimeSeriesRec presets[1] as ExportUmlRecord, presets[2] as ImportTimeSeriesRecord ); - } catch (Exception ex) + } + catch (Exception ex) { LogInternally.That.SilentlyIgnoredError(ex); } diff --git a/src/AasxPackageLogic/MainWindowLogic.cs b/src/AasxPackageLogic/MainWindowLogic.cs index af27b185a..2cc3dedef 100644 --- a/src/AasxPackageLogic/MainWindowLogic.cs +++ b/src/AasxPackageLogic/MainWindowLogic.cs @@ -1062,7 +1062,7 @@ public void Tool_ReadSubmodel( // need id for idempotent behaviour if (submodel == null || submodel.identification == null) { - LogErrorToTicket(ticket, + LogErrorToTicket(ticket, "Submodel Read: Identification of SubModel is (null)."); return; } diff --git a/src/AasxPackageLogic/Options.cs b/src/AasxPackageLogic/Options.cs index 66769e567..521fa2fca 100644 --- a/src/AasxPackageLogic/Options.cs +++ b/src/AasxPackageLogic/Options.cs @@ -415,7 +415,7 @@ public AnyUiColor GetColor(ColorNames c) [OptionDescription(Description = "Preset shown in the file repo connect to AAS repository dialogue")] public string DefaultConnectRepositoryLocation = ""; - [OptionDescription(Description ="List of tuples (Name, Text) with presets for available scripts.")] + [OptionDescription(Description = "List of tuples (Name, Text) with presets for available scripts.")] public List ScriptPresets; [OptionDescription(Description = "Verbosity level for script execution (0=silent, 2=very verbose).")] diff --git a/src/AasxPluginExportTable/ExportTableProcessor.cs b/src/AasxPluginExportTable/ExportTableProcessor.cs index bb9258bb6..d10a26840 100644 --- a/src/AasxPluginExportTable/ExportTableProcessor.cs +++ b/src/AasxPluginExportTable/ExportTableProcessor.cs @@ -823,7 +823,7 @@ private void ExportExcel_AppendTableCell(IXLWorksheet ws, CellRecord cr, int ri, public bool ExportExcel(string fn, List iterateAasEntities) { // access - if (Record?.IsValid() != true + if (Record?.IsValid() != true || !fn.HasContent() || iterateAasEntities == null || iterateAasEntities.Count < 1) return false; diff --git a/src/AasxPluginSmdExporter/Plugin.cs b/src/AasxPluginSmdExporter/Plugin.cs index 7b31ad5dc..d9eb3bc64 100644 --- a/src/AasxPluginSmdExporter/Plugin.cs +++ b/src/AasxPluginSmdExporter/Plugin.cs @@ -36,7 +36,7 @@ public AasxPluginResultBase ActivateAction(string action, params object[] args) // To work five arguments are needed if (args[0] is AasxIntegrationBase.IFlyoutProvider fop && fop != null - && args[1] is Queue + && args[1] is Queue && args[2] is string && args[3] is string && args[4] is AasxMenuActionTicket ticket) diff --git a/src/AasxRestServerLibrary/AasxHttpContextHelper.cs b/src/AasxRestServerLibrary/AasxHttpContextHelper.cs index 6dd14c757..6a2dbc452 100644 --- a/src/AasxRestServerLibrary/AasxHttpContextHelper.cs +++ b/src/AasxRestServerLibrary/AasxHttpContextHelper.cs @@ -556,7 +556,7 @@ public void EvalPutAas(IHttpContext context) } context.Server.Logger.Debug( $"Putting AdministrationShell with idShort {aas.idShort ?? "--"} and " + - $"id {aas.identification.ToString() }"); + $"id {aas.identification.ToString()}"); var existingAas = this.Package.AasEnv.FindAAS(aas.identification); if (existingAas != null) this.Package.AasEnv.AdministrationShells.Remove(existingAas); @@ -803,7 +803,7 @@ public void EvalPutSubmodel(IHttpContext context, string aasid) // add Submodel context.Server.Logger.Debug( $"Adding Submodel with idShort {submodel.idShort ?? "--"} and " + - $"id {submodel.identification?.ToString() }"); + $"id {submodel.identification?.ToString()}"); var existingSm = this.Package.AasEnv.FindSubmodel(submodel.identification); if (existingSm != null) this.Package.AasEnv.Submodels.Remove(existingSm); @@ -1595,7 +1595,7 @@ public void EvalPutCd(IHttpContext context, string aasid) // add Submodel context.Server.Logger.Debug( $"Adding ConceptDescription with idShort {cd.idShort ?? "--"} and " + - $"id {cd.identification.ToString() }"); + $"id {cd.identification.ToString()}"); var existingCd = this.Package.AasEnv.FindConceptDescription(cd.identification); if (existingCd != null) this.Package.AasEnv.ConceptDescriptions.Remove(existingCd); diff --git a/src/AasxSignature/AasxSignature.cs b/src/AasxSignature/AasxSignature.cs index 912415a03..1aef68414 100644 --- a/src/AasxSignature/AasxSignature.cs +++ b/src/AasxSignature/AasxSignature.cs @@ -37,7 +37,7 @@ public static class PackageHelper /// therefore easy to detect during verification. /// public static bool SignAll( - string packagePath, + string packagePath, string certFn, string storeName = "My", AnyUiMinimalInvokeMessageDelegate invokeMessage = null) @@ -110,6 +110,9 @@ public static bool SignAll( // Sign() will prompt the user to select a Certificate to sign with. try { + // TODO (MIHO, 2022-12-16): check if this code is required + // might been converted due to AasxScript refactoring +#if UNCLEAR //var dlg = new OpenFileDialog(); //try //{ @@ -121,7 +124,7 @@ public static bool SignAll( //} //dlg.Filter = ".pfx files (*.pfx)|*.pfx"; //dlg.ShowDialog(); - +#endif X509Certificate2 x509 = new X509Certificate2(certFn, "i40"); X509Certificate2Collection scollection = new X509Certificate2Collection(x509); dsm.Sign(toSign, scollection[0], relationshipSelectors); @@ -148,7 +151,7 @@ public static bool SignAll( /// verification status of the certificates) /// private static VerifyResult VerifySignatures( - string packagePath, + string packagePath, out Dictionary certificatesStatus) { VerifyResult vResult; @@ -206,7 +209,7 @@ public static bool Validate(string packagePath, certRes += res.Key + ": " + res.Value.ToString() + "\n"; } - invokeMessage?.Invoke(false, + invokeMessage?.Invoke(false, "Validate: Certificate status: \n" + certRes); if (verifyResult == VerifyResult.Success) @@ -234,7 +237,7 @@ public static bool Validate(string packagePath, catch (Exception e) { invokeMessage?.Invoke(true, - "Validate: failed because of: "+e.Message); + "Validate: failed because of: " + e.Message); } return true; diff --git a/src/AasxWpfControlLibrary/AasxMenuWpf.cs b/src/AasxWpfControlLibrary/AasxMenuWpf.cs index ca80d3757..074b002dc 100644 --- a/src/AasxWpfControlLibrary/AasxMenuWpf.cs +++ b/src/AasxWpfControlLibrary/AasxMenuWpf.cs @@ -30,14 +30,14 @@ public class AasxMenuWpf protected DoubleSidedDict _menuItems = new DoubleSidedDict(); - protected DoubleSidedDict _wpfItems - = new DoubleSidedDict(); + protected DoubleSidedDict _wpfItems + = new DoubleSidedDict(); public AasxMenu Menu { get => _menu; } private AasxMenu _menu = new AasxMenu(); private void RenderItemCollection( - AasxMenu topMenu, AasxMenu menuItems, + AasxMenu topMenu, AasxMenu menuItems, System.Windows.Controls.ItemCollection wpfItems, CommandBindingCollection cmdBindings = null, InputBindingCollection inputBindings = null, @@ -68,17 +68,12 @@ private void RenderItemCollection( // creat cmd and bind cmd = new RoutedUICommand(mi.Name, mi.Name, typeof(string)); - cmdBindings.Add(new CommandBinding(cmd, (s3, e3) => { - //// decode - //var ruic = e3?.Command as RoutedUICommand; - //if (ruic == null) - // return; - //var cmdname = ruic.Text?.Trim().ToLower(); - + cmdBindings.Add(new CommandBinding(cmd, (s3, e3) => + { // activate - var ticket = new AasxMenuActionTicket() - { - MenuItem = m_mii + var ticket = new AasxMenuActionTicket() + { + MenuItem = m_mii }; topMenu?.ActivateAction(m_mii, ticket); })); @@ -155,7 +150,7 @@ public AnyUiLambdaActionBase HandleGlobalKeyDown(KeyEventArgs e, bool preview) if (mi.InputGesture == null) continue; var g = kgConv.ConvertFromInvariantString(mi.InputGesture) as KeyGesture; - if (g != null + if (g != null && g.Key == e.Key && g.Modifiers == Keyboard.Modifiers) { @@ -169,7 +164,7 @@ public AnyUiLambdaActionBase HandleGlobalKeyDown(KeyEventArgs e, bool preview) } public void LoadAndRender( - AasxMenu menuInfo, + AasxMenu menuInfo, System.Windows.Controls.Menu wpfMenu, CommandBindingCollection cmdBindings = null, InputBindingCollection inputBindings = null) @@ -187,7 +182,7 @@ public void LoadAndRender( public bool IsChecked(string name) { var wpf = _wpfItems.Get2OrDefault(_menuItems.Get2OrDefault(name?.Trim().ToLower())); - if (wpf !=null) + if (wpf != null) return wpf.IsChecked; return false; } diff --git a/src/AasxWpfControlLibrary/DispEditAasxEntity.xaml.cs b/src/AasxWpfControlLibrary/DispEditAasxEntity.xaml.cs index eaea591e0..8e637b4a6 100644 --- a/src/AasxWpfControlLibrary/DispEditAasxEntity.xaml.cs +++ b/src/AasxWpfControlLibrary/DispEditAasxEntity.xaml.cs @@ -536,7 +536,7 @@ public DisplayRenderHints DisplayOrEditVisualAasxElement( // // Dispatch: MULTIPLE items // - _helper.DisplayOrEditAasEntityMultipleElements(packages, entities, editMode, stack, cdSortOrder, + _helper.DisplayOrEditAasEntityMultipleElements(packages, entities, editMode, stack, cdSortOrder, superMenu: superMenu); } diff --git a/src/AasxWpfControlLibrary/Flyouts/TextEditorFlyout.xaml.cs b/src/AasxWpfControlLibrary/Flyouts/TextEditorFlyout.xaml.cs index b10390374..dca74ad03 100644 --- a/src/AasxWpfControlLibrary/Flyouts/TextEditorFlyout.xaml.cs +++ b/src/AasxWpfControlLibrary/Flyouts/TextEditorFlyout.xaml.cs @@ -204,7 +204,7 @@ private void Button_Click(object sender, RoutedEventArgs e) PrepareResult(); // show - cm.Start(sender as Button, ContextMenuAction); + cm.Start(sender as Button, ContextMenuAction); } } @@ -214,8 +214,8 @@ public void ControlPreviewKeyDown(KeyEventArgs e) private void ComboBoxPreset_SelectionChanged(object sender, SelectionChangedEventArgs e) { - if (sender == ComboBoxPreset - && DiaData.Presets !=null + if (sender == ComboBoxPreset + && DiaData.Presets != null && ComboBoxPreset.SelectedIndex >= 0 && ComboBoxPreset.SelectedIndex < DiaData.Presets.Count) { diff --git a/src/AasxWpfControlLibrary/ToolControlFindReplace.xaml.cs b/src/AasxWpfControlLibrary/ToolControlFindReplace.xaml.cs index ca3895df2..9144fc42d 100644 --- a/src/AasxWpfControlLibrary/ToolControlFindReplace.xaml.cs +++ b/src/AasxWpfControlLibrary/ToolControlFindReplace.xaml.cs @@ -442,7 +442,7 @@ private void ButtonToolsFind_Click( { var sri = TheSearchResults.foundResults[CurrentResultIndex]; var fwd = sender == ButtonToolsReplaceForward; - + DoReplace(sri, TheSearchOptions.ReplaceText); Log.Singleton.Info("In {0}, replaced »{1}« with »{2}« and {3}.", sri?.ToString(), diff --git a/src/AnyUi/AnyUiDialogueDataBase.cs b/src/AnyUi/AnyUiDialogueDataBase.cs index eaab6fdb3..c1d5fb09f 100644 --- a/src/AnyUi/AnyUiDialogueDataBase.cs +++ b/src/AnyUi/AnyUiDialogueDataBase.cs @@ -170,7 +170,7 @@ public class Preset public string MimeType = "application/text"; public string Text = ""; - public List Presets; + public List Presets; public AnyUiDialogueDataTextEditor( string caption = "", diff --git a/src/CheckFormat.ps1 b/src/CheckFormat.ps1 index 82acf2953..b9b3571eb 100644 --- a/src/CheckFormat.ps1 +++ b/src/CheckFormat.ps1 @@ -20,7 +20,20 @@ function Main $artefactsDir = CreateAndGetArtefactsDir $reportPath = Join-Path $artefactsDir "dotnet-format-report.json" - dotnet format --check --report $reportPath --exclude "**/DocTest*.cs" + + # MIHO: dotnet format seems to changed --check with --verify-no-changes + # therefore try to detect + $checkswitch = "--check" + $fmthelp = dotnet format --help | Out-String + if ($fmthelp.Contains("--verify-no-changes")) + { + $checkswitch = "--verify-no-changes" + } + + Write-Host "Using dotnet format switch: $checkswitch" + + dotnet format $checkswitch --report $reportPath --exclude "**/DocTest*.cs" + $formatReport = Get-Content $reportPath |ConvertFrom-Json if ($formatReport.Count -ge 1) { From 5d55c3fb2e38fe7ee3835f9168714422d2aa3fee Mon Sep 17 00:00:00 2001 From: Michael Hoffmeister Date: Fri, 16 Dec 2022 19:21:06 +0100 Subject: [PATCH 23/23] Update sources * make fit for InspectCode.ps1 --- src/AasxIntegrationBase/AasxMenu.cs | 10 +- src/AasxPackageExplorer/AasxScript.cs | 14 +- .../ImportTimeSeriesFlyout.xaml | 2 +- .../MainWindow.CommandBindings.cs | 31 +- src/AasxPackageExplorer/MainWindow.xaml | 6 +- src/AasxPackageExplorer/MainWindow.xaml.cs | 31 +- .../MainWindowScripting.cs | 24 +- .../MessageReportWindow.xaml.cs | 4 - src/AasxPackageLogic/DispEditHelperBasics.cs | 2 +- src/AasxPackageLogic/MainWindowDispatch.cs | 7 +- src/AasxPackageLogic/MainWindowLogic.cs | 14 +- src/AasxPackageLogic/Options.cs | 2 + src/AasxPluginExportTable/Plugin.cs | 9 +- src/AasxPluginSmdExporter/Plugin.cs | 1 - src/AasxWpfControlLibrary/AasxMenuWpf.cs | 2 +- src/AasxWpfControlLibrary/NodeSetImport.cs | 545 ------------------ .../ThingDescriptionSemanticID.cs | 269 --------- src/AnyUi/AnyUiDialogueDataBase.cs | 6 + 18 files changed, 71 insertions(+), 908 deletions(-) delete mode 100644 src/AasxWpfControlLibrary/NodeSetImport.cs delete mode 100644 src/AasxWpfControlLibrary/ThingDescriptionSemanticID.cs diff --git a/src/AasxIntegrationBase/AasxMenu.cs b/src/AasxIntegrationBase/AasxMenu.cs index 65c61ae4f..6074f1f5a 100644 --- a/src/AasxIntegrationBase/AasxMenu.cs +++ b/src/AasxIntegrationBase/AasxMenu.cs @@ -306,14 +306,6 @@ public class AasxMenuItem : AasxMenuItemHotkeyed /// public AasxMenu Childs = null; - // - // Constructors - // - - public AasxMenuItem() - { - } - // // more // @@ -546,7 +538,7 @@ public IEnumerable FindAll(Func pred = null) public AasxMenuItemBase FindName(string name) { return FindAll((i) => i?.Name?.Trim().ToLower() == name?.Trim().ToLower()) - .FirstOrDefault(); ; + .FirstOrDefault(); } } diff --git a/src/AasxPackageExplorer/AasxScript.cs b/src/AasxPackageExplorer/AasxScript.cs index 450d80251..374c942cc 100644 --- a/src/AasxPackageExplorer/AasxScript.cs +++ b/src/AasxPackageExplorer/AasxScript.cs @@ -152,7 +152,7 @@ public override object Invoke(IScriptContext context, object[] args) catch (Exception ex) { if (_script != null && _script._logLevel >= 2) - Log.Singleton.Error($"when reading text contents of {fn}"); + Log.Singleton.Error(ex, $"when reading text contents of {fn}"); } return null; } @@ -180,7 +180,7 @@ public override object Invoke(IScriptContext context, object[] args) catch (Exception ex) { if (_script != null && _script._logLevel >= 2) - Log.Singleton.Error($"when check existence of {fn}"); + Log.Singleton.Error(ex, $"when check existence of {fn}"); } return false; } @@ -217,7 +217,9 @@ public override object Invoke(IScriptContext context, object[] args) // https://stackoverflow.com/questions/39438441/ var x = Application.Current.Dispatcher.Invoke(async () => { - return await _script.Remote?.Tool(args); + if (_script?.Remote == null) + return -1; + return await _script?.Remote?.Tool(args); }); if (x != null) Log.Singleton.Silent("" + x); @@ -295,11 +297,13 @@ public override object Invoke(IScriptContext context, object[] args) // check for allowed commands var cmdtl = cmd.Trim().ToLower(); + // ReSharper disable StringIndexOfIsCultureSpecific.1 if (" push pop ".IndexOf(" " + cmdtl + " ") < 0) { _script.ScriptLog?.Error("Script: Location: Command is unknown!"); return -1; } + // ReSharper enable StringIndexOfIsCultureSpecific.1 // debug if (_script._logLevel >= 2) @@ -334,7 +338,7 @@ public override object Invoke(IScriptContext context, object[] args) if (_script == null) return -1; - if (args == null || args.Length < 1 || !(args[0] is string cmd)) + if (args == null || args.Length < 1 || !(args[0] is string)) { _script.ScriptLog?.Error("Script: System: Command is missing!"); return -1; @@ -388,7 +392,7 @@ public void PrepareHelp() foreach (var nt in root.GetNestedTypes()) if (nt.GetInterfaces().Contains(typeof(IInvokable))) { - var x = Activator.CreateInstance(nt, this); + Activator.CreateInstance(nt, this); } } diff --git a/src/AasxPackageExplorer/FlyoutsForPlugins/ImportTimeSeriesFlyout.xaml b/src/AasxPackageExplorer/FlyoutsForPlugins/ImportTimeSeriesFlyout.xaml index 78a47b1ae..6c503dedf 100644 --- a/src/AasxPackageExplorer/FlyoutsForPlugins/ImportTimeSeriesFlyout.xaml +++ b/src/AasxPackageExplorer/FlyoutsForPlugins/ImportTimeSeriesFlyout.xaml @@ -18,7 +18,7 @@ --> - + diff --git a/src/AasxPackageExplorer/MainWindow.CommandBindings.cs b/src/AasxPackageExplorer/MainWindow.CommandBindings.cs index f303b4edc..9676890d5 100644 --- a/src/AasxPackageExplorer/MainWindow.CommandBindings.cs +++ b/src/AasxPackageExplorer/MainWindow.CommandBindings.cs @@ -472,7 +472,7 @@ private async Task CommandBinding_GeneralDispatch( if (cmd == null || ticket == null) return; - var scriptmode = ticket.ScriptMode == true; + var scriptmode = ticket.ScriptMode; FillSelectedItem(ticket); @@ -625,7 +625,7 @@ private async Task CommandBinding_GeneralDispatch( try { // if not local, do a bit of voodoo .. - if (!isLocalFile) + if (!isLocalFile && _packageCentral.MainItem.Container != null) { // establish local if (!await _packageCentral.MainItem.Container.SaveLocalCopyAsync( @@ -823,32 +823,29 @@ private async Task CommandBinding_GeneralDispatch( ticket.StartExec(); // filename source - if (!MenuSelectOpenFilename( + if (!MenuSelectOpenFilenameToTicket( ticket, "Source", "Select source encrypted AASX file to be processed", null, "AASX2 encrypted package files (*.aasx2)|*.aasx2", - out var sourceFn, "For package decrypt: No valid filename for source given!")) return; // filename cert - if (!MenuSelectOpenFilename( + if (!MenuSelectOpenFilenameToTicket( ticket, "Certificate", "Select source AASX file to be processed", null, ".pfx files (*.pfx)|*.pfx", - out var certFn, "For package decrypt: No valid filename for certificate given!")) return; // ask also for target fn - if (!MenuSelectSaveFilename( + if (!MenuSelectSaveFilenameToTicket( ticket, "Target", "Write decoded AASX package file", null, "AASX package files (*.aasx)|*.aasx", - out var targetFn, out var filterIndex, "For package decrypt: No valid filename for target given!")) return; @@ -950,13 +947,13 @@ private async Task CommandBinding_GeneralDispatch( } if (cmd == "editkey") - _mainMenu?.SetChecked("EditMenu", !(_mainMenu?.IsChecked("EditMenu") == true)); + _mainMenu?.SetChecked("EditMenu", _mainMenu?.IsChecked("EditMenu") != true); if (cmd == "hintskey") - _mainMenu?.SetChecked("HintsMenu", !(_mainMenu?.IsChecked("HintsMenu") == true)); + _mainMenu?.SetChecked("HintsMenu", _mainMenu?.IsChecked("HintsMenu") != true); if (cmd == "showirikey") - _mainMenu?.SetChecked("ShowIriMenu", !(_mainMenu?.IsChecked("ShowIriMenu") == true)); + _mainMenu?.SetChecked("ShowIriMenu", _mainMenu?.IsChecked("ShowIriMenu") != true); if (cmd == "editmenu" || cmd == "editkey" || cmd == "hintsmenu" || cmd == "hintskey" @@ -1214,7 +1211,7 @@ private async Task CommandBinding_GeneralDispatch( } if (cmd == "eventsshowlogkey") - _mainMenu?.SetChecked("EventsShowLogMenu", !(_mainMenu?.IsChecked("EventsShowLogMenu") == true)); + _mainMenu?.SetChecked("EventsShowLogMenu", _mainMenu?.IsChecked("EventsShowLogMenu") != true); if (cmd == "eventsshowlogkey" || cmd == "eventsshowlogmenu") { @@ -2555,11 +2552,13 @@ public void CommandBinding_ImportDictToSubmodel( ticket?.StartExec(); // current Submodel + // ReSharper disable UnusedVariable if (!MenuSelectEnvSubmodel( ticket, out var env, out var sm, out var smr, "Dictionary import: No valid Submodel selected.")) return; + // ReSharper enable UnusedVariable #if !DoNotUseAasxDictionaryImport var dataChanged = false; @@ -2689,6 +2688,7 @@ public void CommandBinding_ExportNodesetUaPlugin( if (cmd == "opcuaexportnodesetuaplugin") { // filename + // ReSharper disable UnusedVariable if (!MenuSelectSaveFilename( ticket, "File", "Select Nodeset2.XML file to be exported", @@ -2697,7 +2697,7 @@ public void CommandBinding_ExportNodesetUaPlugin( out var targetFn, out var filterIndex, "Export OPC UA Nodeset2 via plugin: No valid filename.")) return; - + // ReSharper enable UnusedVariable try { RememberForInitialDirectory(targetFn); @@ -2752,7 +2752,7 @@ public void CommandBinding_CopyClipboardElementJson() var jsonStr = JsonConvert.SerializeObject(mdo, Formatting.Indented, settings); // copy to clipboard - if (jsonStr != null && jsonStr != "") + if (jsonStr != "") { System.Windows.Clipboard.SetText(jsonStr); Log.Singleton.Info("Copied selected element to clipboard."); @@ -3247,13 +3247,10 @@ public void CommandBinding_ExportOPCUANodeSet( ticket.StartExec(); // try to access I4AAS export information - UANodeSet InformationModel = null; try { var xstream = Assembly.GetExecutingAssembly().GetManifestResourceStream( "AasxPackageExplorer.Resources.i4AASCS.xml"); - - InformationModel = UANodeSetExport.getInformationModel(xstream); } catch (Exception ex) { diff --git a/src/AasxPackageExplorer/MainWindow.xaml b/src/AasxPackageExplorer/MainWindow.xaml index 7cab1aa23..8938282a0 100644 --- a/src/AasxPackageExplorer/MainWindow.xaml +++ b/src/AasxPackageExplorer/MainWindow.xaml @@ -120,6 +120,7 @@ --> + @@ -204,8 +206,8 @@ --> + + --> diff --git a/src/AasxPackageExplorer/MainWindow.xaml.cs b/src/AasxPackageExplorer/MainWindow.xaml.cs index 3ee9d7b56..6d9b72d36 100644 --- a/src/AasxPackageExplorer/MainWindow.xaml.cs +++ b/src/AasxPackageExplorer/MainWindow.xaml.cs @@ -693,27 +693,6 @@ private async void Window_Loaded(object sender, RoutedEventArgs e) _mainMenu = new AasxMenuWpf(); _mainMenu.LoadAndRender(CreateMainMenu(), MenuMain, this.CommandBindings, this.InputBindings); - - var cmd = new RoutedUICommand("Test", "NameOfTest", typeof(string)); - - this.CommandBindings.Add(new CommandBinding(cmd, (s3, e3) => - { - // decode - var ruic = e3?.Command as RoutedUICommand; - if (ruic == null) - return; - var cmdname = ruic.Text?.Trim().ToLower(); - })); - - var kb = new KeyBinding() - { - //Key = Key.K, - //Modifiers = ModifierKeys.Control, - Gesture = (new KeyGestureConverter()).ConvertFromInvariantString("Ctrl+K") as KeyGesture, - Command = cmd - }; - this.InputBindings.Add(kb); - // display elements has a cache DisplayElements.ActivateElementStateCache(); @@ -1703,7 +1682,7 @@ private void MainTimer_CheckAnimationElements( IndexOfSignificantAasElements significantElems) { // trivial - if (env == null || significantElems == null || !(_mainMenu?.IsChecked("AnimateElements") == true)) + if (env == null || significantElems == null || _mainMenu?.IsChecked("AnimateElements") != true) return; // find elements? @@ -1747,7 +1726,7 @@ private void MainTimer_CheckDiaryDateToEmitEvents( bool directEmit) { // trivial - if (env == null || significantElems == null || !(_mainMenu?.IsChecked("ObserveEvents") == true)) + if (env == null || significantElems == null || _mainMenu?.IsChecked("ObserveEvents") != true) return; // do this twice @@ -2116,7 +2095,7 @@ private async Task MainTimer_Tick(object sender, EventArgs e) _mainTimer_LastCheckForDiaryEvents, _packageCentral.MainItem.Container.Env?.AasEnv, _packageCentral.MainItem.Container.SignificantElements, - directEmit: !(_mainMenu?.IsChecked("CompressEvents") == true)); + directEmit: !_mainMenu?.IsChecked("CompressEvents") != true); _mainTimer_LastCheckForDiaryEvents = DateTime.UtcNow; // do animation? @@ -3078,6 +3057,8 @@ public string CreateTempFileForKeyboardShortcuts() // Menu command // + // ReSharper disable AccessToModifiedClosure + Action lambdaMenu = (menu) => { @@ -3144,6 +3125,8 @@ public string CreateTempFileForKeyboardShortcuts() @"")); }; + // ReSharper enable AccessToModifiedClosure + html.AppendLine("

Menu and script commands

"); lambdaMenu(_mainMenu.Menu); diff --git a/src/AasxPackageExplorer/MainWindowScripting.cs b/src/AasxPackageExplorer/MainWindowScripting.cs index 6ea57ba71..dc615e1dd 100644 --- a/src/AasxPackageExplorer/MainWindowScripting.cs +++ b/src/AasxPackageExplorer/MainWindowScripting.cs @@ -213,11 +213,10 @@ public enum ScriptSelectAdressMode { None = 0, First, Next, Prev, idShort, seman // something to select var pm = _packageCentral?.Main?.AasEnv; if (pm == null) - if (adrMode == ScriptSelectAdressMode.None) - { - Log.Singleton.Error("Script: Select: No main package environment available!"); - return null; - } + { + Log.Singleton.Error("Script: Select: No main package AAS environment available!"); + return null; + } // available elements in the environment var firstAas = pm.AdministrationShells.FirstOrDefault(); @@ -230,16 +229,20 @@ public enum ScriptSelectAdressMode { None = 0, First, Next, Prev, idShort, seman if (firstSm != null && firstSm.submodelElements != null && firstSm.submodelElements.Count > 0) firstSme = firstSm.submodelElements[0]?.submodelElement; + // TODO (MIHO, 2022-12-16): Some cases are not implemented + // selected items by user var siThis = DisplayElements.SelectedItem; - var siSME = siThis?.FindFirstParent( - (ve) => ve is VisualElementSubmodelElement, includeThis: true); var siSM = siThis?.FindFirstParent( (ve) => ve is VisualElementSubmodelRef, includeThis: true) as VisualElementSubmodelRef; var siAAS = siThis?.FindFirstParent( (ve) => ve is VisualElementAdminShell, includeThis: true) as VisualElementAdminShell; +#if later + var siSME = siThis?.FindFirstParent( + (ve) => ve is VisualElementSubmodelElement, includeThis: true); var siCD = siThis?.FindFirstParent( (ve) => ve is VisualElementConceptDescription, includeThis: true); +#endif // // This @@ -336,7 +339,7 @@ public enum ScriptSelectAdressMode { None = 0, First, Next, Prev, idShort, seman if (refType == ScriptSelectRefType.SM) { - var idx = siAAS?.theAas.submodelRefs?.IndexOf(siSM?.theSubmodelRef); + var idx = siAAS?.theAas?.submodelRefs?.IndexOf(siSM?.theSubmodelRef); if (siAAS?.theAas?.submodelRefs == null || siSM?.theSubmodel == null || siSM?.theSubmodelRef == null @@ -388,7 +391,7 @@ public enum ScriptSelectAdressMode { None = 0, First, Next, Prev, idShort, seman if (refType == ScriptSelectRefType.SM) { - var idx = siAAS?.theAas.submodelRefs?.IndexOf(siSM?.theSubmodelRef); + var idx = siAAS?.theAas?.submodelRefs?.IndexOf(siSM?.theSubmodelRef); if (siAAS?.theAas?.submodelRefs == null || siSM?.theSubmodel == null || siSM?.theSubmodelRef == null @@ -503,8 +506,7 @@ public async Task Tool(object[] args) foundMenu = _dynamicMenu.Menu; mi = foundMenu.FindName(toolName); } - - if (foundMenu == null || mi == null) + if (mi == null) { Log.Singleton.Error($"Script: Invoke Tool: Toolname invalid: {toolName}"); return -1; diff --git a/src/AasxPackageExplorer/MessageReportWindow.xaml.cs b/src/AasxPackageExplorer/MessageReportWindow.xaml.cs index 260e46d1b..05b742e54 100644 --- a/src/AasxPackageExplorer/MessageReportWindow.xaml.cs +++ b/src/AasxPackageExplorer/MessageReportWindow.xaml.cs @@ -54,10 +54,6 @@ protected ScrollViewer FindScrollViewer(FlowDocumentScrollViewer flowDocumentScr // Border is the first child of first child of a ScrolldocumentViewer DependencyObject firstChild = VisualTreeHelper.GetChild(flowDocumentScrollViewer, 0); - if (firstChild == null) - { - return null; - } Decorator border = VisualTreeHelper.GetChild(firstChild, 0) as Decorator; diff --git a/src/AasxPackageLogic/DispEditHelperBasics.cs b/src/AasxPackageLogic/DispEditHelperBasics.cs index 6364e03f0..3cd6233d2 100644 --- a/src/AasxPackageLogic/DispEditHelperBasics.cs +++ b/src/AasxPackageLogic/DispEditHelperBasics.cs @@ -777,7 +777,7 @@ public void AddAction(AnyUiPanel view, string key, string[] actionStr = null, Mo // button # as argument! return (ticketAction != null) ? ticketAction(currentI, null) - : action(currentI); + : action?.Invoke(currentI); }); if (actionTags != null && i < actionTags.Length) diff --git a/src/AasxPackageLogic/MainWindowDispatch.cs b/src/AasxPackageLogic/MainWindowDispatch.cs index 32ca8fcf4..27f855a58 100644 --- a/src/AasxPackageLogic/MainWindowDispatch.cs +++ b/src/AasxPackageLogic/MainWindowDispatch.cs @@ -35,6 +35,8 @@ This source code may use other Open Source software components (see LICENSE.txt) using System.Xml.Linq; using System.Xml.Serialization; +// ReSharper disable MethodHasAsyncOverload + namespace AasxPackageLogic { /// @@ -55,6 +57,9 @@ public AnyUiMessageBoxResult StandardInvokeMessageDelegate(bool error, string me return AnyUiMessageBoxResult.Cancel; } +#pragma warning disable CS1998 + // ReSharper disable CSharpWarnings::CS1998 + public async Task CommandBinding_GeneralDispatch( string cmd, AasxMenuActionTicket ticket) @@ -66,8 +71,6 @@ public async Task CommandBinding_GeneralDispatch( if (cmd == null || ticket == null) return; - var scriptmode = ticket.ScriptMode == true; - // // Dispatch (Sign and Validate either on Submodel / AAS level) // diff --git a/src/AasxPackageLogic/MainWindowLogic.cs b/src/AasxPackageLogic/MainWindowLogic.cs index 2cc3dedef..bd2e31c7a 100644 --- a/src/AasxPackageLogic/MainWindowLogic.cs +++ b/src/AasxPackageLogic/MainWindowLogic.cs @@ -70,11 +70,8 @@ public void LogErrorToTicketOrSilent( if (ticket?.ScriptMode != true) return; - if (ticket != null) - { - ticket.Exception = message; - ticket.Success = false; - } + ticket.Exception = message; + ticket.Success = false; Log.Singleton.Error(message); } @@ -845,7 +842,7 @@ public bool Tool_Security_PackageEncrpt( } catch (Exception ex) { - LogErrorToTicket(ticket, $"encrypting AASX file {sourceFn} with certificate {certFn}"); + LogErrorToTicket(ticket, ex, $"encrypting AASX file {sourceFn} with certificate {certFn}"); return false; } @@ -886,7 +883,7 @@ public bool Tool_Security_PackageDecrpt( } catch (Exception ex) { - LogErrorToTicket(ticket, $"decrypting AASX2 file {sourceFn} with certificate {certFn}"); + LogErrorToTicket(ticket, ex, $"decrypting AASX2 file {sourceFn} with certificate {certFn}"); return false; } @@ -1093,7 +1090,6 @@ public void Tool_ReadSubmodel( { LogErrorToTicket(ticket, ex, "Submodel Read: Can not read SubModel."); - return; } } @@ -1125,7 +1121,6 @@ public void Tool_SubmodelWrite( { LogErrorToTicket(ticket, ex, "Submodel Read: Can not read SubModel."); - return; } } @@ -1155,7 +1150,6 @@ public void Tool_SubmodelPut( { LogErrorToTicket(ticket, ex, $"Submodel Put: Can not put SubModel to url '{url}'."); - return; } } diff --git a/src/AasxPackageLogic/Options.cs b/src/AasxPackageLogic/Options.cs index 521fa2fca..3d7f25d00 100644 --- a/src/AasxPackageLogic/Options.cs +++ b/src/AasxPackageLogic/Options.cs @@ -18,6 +18,8 @@ This source code may use other Open Source software components (see LICENSE.txt) using AnyUi; using Newtonsoft.Json; +// ReSharper disable UnassignedField.Global + namespace AasxPackageLogic { /// diff --git a/src/AasxPluginExportTable/Plugin.cs b/src/AasxPluginExportTable/Plugin.cs index f6e00b1d7..e128eb670 100644 --- a/src/AasxPluginExportTable/Plugin.cs +++ b/src/AasxPluginExportTable/Plugin.cs @@ -145,8 +145,7 @@ public AasxPluginResultBase ActivateAction(string action, params object[] args) && args[1] is string fn && args[2] is AdminShell.AdministrationShellEnv env && args[3] is AdminShell.Submodel sm - && args[4] is AasxMenuActionTicket ticket - && fn != null && env != null && sm != null) + && args[4] is AasxMenuActionTicket ticket) { // the Submodel elements need to have parents sm.SetAllParents(); @@ -165,8 +164,7 @@ public AasxPluginResultBase ActivateAction(string action, params object[] args) && args[0] is ExportUmlRecord record && args[1] is string fn && args[2] is AdminShell.AdministrationShellEnv env - && args[3] is AdminShell.Submodel sm - && fn != null && env != null && sm != null) + && args[3] is AdminShell.Submodel sm) { // the Submodel elements need to have parents sm.SetAllParents(); @@ -185,8 +183,7 @@ public AasxPluginResultBase ActivateAction(string action, params object[] args) && args[0] is ImportTimeSeriesRecord record && args[1] is string fn && args[1] is AdminShell.AdministrationShellEnv env - && args[2] is AdminShell.Submodel sm - && fn != null && env != null && sm != null) + && args[2] is AdminShell.Submodel sm) { // the Submodel elements need to have parents sm.SetAllParents(); diff --git a/src/AasxPluginSmdExporter/Plugin.cs b/src/AasxPluginSmdExporter/Plugin.cs index d9eb3bc64..482287d84 100644 --- a/src/AasxPluginSmdExporter/Plugin.cs +++ b/src/AasxPluginSmdExporter/Plugin.cs @@ -35,7 +35,6 @@ public AasxPluginResultBase ActivateAction(string action, params object[] args) string machineName = ""; // To work five arguments are needed if (args[0] is AasxIntegrationBase.IFlyoutProvider fop - && fop != null && args[1] is Queue && args[2] is string && args[3] is string diff --git a/src/AasxWpfControlLibrary/AasxMenuWpf.cs b/src/AasxWpfControlLibrary/AasxMenuWpf.cs index 074b002dc..1cd658a93 100644 --- a/src/AasxWpfControlLibrary/AasxMenuWpf.cs +++ b/src/AasxWpfControlLibrary/AasxMenuWpf.cs @@ -50,7 +50,7 @@ private void RenderItemCollection( if (mi == null) continue; - if (mi is AasxMenuSeparator mis) + if (mi is AasxMenuSeparator) { // add separator wpfItems.Add(new System.Windows.Controls.Separator()); diff --git a/src/AasxWpfControlLibrary/NodeSetImport.cs b/src/AasxWpfControlLibrary/NodeSetImport.cs deleted file mode 100644 index 6d78050df..000000000 --- a/src/AasxWpfControlLibrary/NodeSetImport.cs +++ /dev/null @@ -1,545 +0,0 @@ -/* -Copyright (c) 2018-2021 Festo AG & Co. KG -Author: Michael Hoffmeister - -This source code is licensed under the Apache License 2.0 (see LICENSE.txt). - -This source code may use other Open Source software components (see LICENSE.txt). -*/ - -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading; -using System.Threading.Tasks; -using System.Xml; -using AdminShellNS; - -namespace AasxPackageExplorer -{ - - public class field - { - public string name; - public string value; - public string description; - } - - public class UaNode - { - public string UAObjectTypeName; - public string NodeId; - public string ParentNodeId; - public string BrowseName; - public string NameSpace; - public string SymbolicName; - public string DataType; - public string Description; - public string Value; - public string DisplayName; - - public object parent; - public List children; - public List references; - - public string DefinitionName; - public string DefinitionNameSpace; - public List fields; - - public UaNode() - { - children = new List(); - references = new List(); - fields = new List(); - } - } - - public static class OpcUaTools - { - static List roots; - static List nodes; - static Dictionary parentNodes; - static Dictionary semanticIDPool; - - public static void ImportNodeSetToSubModel( - string inputFn, AdminShell.AdministrationShellEnv env, AdminShell.Submodel sm, - AdminShell.SubmodelRef smref) - { - XmlTextReader reader = new XmlTextReader(inputFn); - StreamWriter sw = File.CreateText(inputFn + ".log.txt"); - - string elementName = ""; - bool tagDefinition = false; - string referenceType = ""; - - roots = new List(); - nodes = new List(); - parentNodes = new Dictionary(); - semanticIDPool = new Dictionary(); - UaNode currentNode = null; - - // global model data - string ModelUri = ""; - string ModelUriVersion = ""; - string ModelUriPublicationDate = ""; - string RequiredModelUri = ""; - string RequiredModelUriVersion = ""; - string RequiredModelUriPublicationDate = ""; - - - // scan nodeset and store node data in nodes - // store also roots, i.e. no parent in node - // store also new ParentNodeIds in parentNodes with value null - while (reader.Read()) - { - switch (reader.NodeType) - { - case XmlNodeType.Element: - elementName = reader.Name; - switch (elementName) - { - case "Model": - ModelUri = reader.GetAttribute("ModelUri"); - ModelUriVersion = reader.GetAttribute("Version"); - ModelUriPublicationDate = reader.GetAttribute("PublicationDate"); - break; - case "RequiredModel": - RequiredModelUri = reader.GetAttribute("ModelUri"); - RequiredModelUriVersion = reader.GetAttribute("Version"); - RequiredModelUriPublicationDate = reader.GetAttribute("PublicationDate"); - break; - case "UADataType": - case "UAVariable": - case "UAObject": - case "UAMethod": - case "UAReferenceType": - case "UAObjectType": - case "UAVariableType": - string parentNodeId = reader.GetAttribute("ParentNodeId"); - currentNode = new UaNode(); - currentNode.UAObjectTypeName = elementName; - currentNode.NodeId = reader.GetAttribute("NodeId"); - currentNode.ParentNodeId = parentNodeId; - currentNode.BrowseName = reader.GetAttribute("BrowseName"); - var split = currentNode.BrowseName.Split(':'); - if (split.Length > 1) - { - currentNode.NameSpace = split[0]; - if (split.Length == 2) - currentNode.BrowseName = split[1]; - } - currentNode.SymbolicName = reader.GetAttribute("SymbolicName"); - currentNode.DataType = reader.GetAttribute("DataType"); - break; - case "Reference": - referenceType = reader.GetAttribute("ReferenceType"); - break; - case "Definition": - tagDefinition = true; - currentNode.DefinitionName = reader.GetAttribute("Name"); - var splitd = currentNode.DefinitionName.Split(':'); - if (splitd.Length > 1) - { - currentNode.DefinitionNameSpace = splitd[0]; - if (splitd.Length == 2) - currentNode.DefinitionName = splitd[1]; - } - break; - case "Field": - field f = new field(); - f.name = reader.GetAttribute("Name"); - f.value = reader.GetAttribute("Value"); - currentNode.fields.Add(f); - break; - case "Description": - break; - } - break; - case XmlNodeType.Text: - switch (elementName) - { - case "String": - case "DateTime": - case "Boolean": - case "Int32": - case "ByteString": - case "uax:String": - case "uax:DateTime": - case "uax:Boolean": - case "uax:Int32": - case "uax:Int16": - case "uax:ByteString": - case "uax:Float": - currentNode.Value = reader.Value; - break; - case "Description": - if (tagDefinition) - { - int count = currentNode.fields.Count; - if (count > 0) - { - currentNode.fields[count - 1].description = reader.Value; - } - } - else - { - currentNode.Description = reader.Value; - } - break; - case "Reference": - string reference = referenceType + " " + reader.Value; - currentNode.references.Add(reference); - break; - case "DisplayName": - currentNode.DisplayName = reader.Value; - break; - } - break; - case XmlNodeType.EndElement: //Display the end of the element. - switch (reader.Name) - { - case "Definition": - tagDefinition = false; - break; - } - if (currentNode == null || currentNode.UAObjectTypeName == null) - { - break; - } - if (reader.Name == currentNode.UAObjectTypeName) - { - switch (currentNode.UAObjectTypeName) - { - case "UADataType": - case "UAVariable": - case "UAObject": - case "UAMethod": - case "UAReferenceType": - case "UAObjectType": - case "UAVariableType": - nodes.Add(currentNode); - if (currentNode.ParentNodeId == null || currentNode.ParentNodeId == "") - { - roots.Add(currentNode); - } - else - { - // collect different parentNodeIDs to set corresponding node in dictionary later - if (!parentNodes.ContainsKey(currentNode.ParentNodeId)) - parentNodes.Add(currentNode.ParentNodeId, null); - } - break; - } - } - break; - } - } - - sw.Close(); - - // scan nodes and store parent node in parentNodes value - foreach (UaNode n in nodes) - { - if (parentNodes.TryGetValue(n.NodeId, out UaNode unused)) - { - parentNodes[n.NodeId] = n; - } - } - - // scan nodes and set parent and children for node - foreach (UaNode n in nodes) - { - if (n.ParentNodeId != null && n.ParentNodeId != "") - { - if (parentNodes.TryGetValue(n.ParentNodeId, out UaNode p)) - { - if (p != null) - { - n.parent = p; - p.children.Add(n); - } - else - { - roots.Add(n); - } - } - } - } - - var outerSme = AdminShell.SubmodelElementCollection.CreateNew("OuterCollection"); - sm.Add(outerSme); - var innerSme = AdminShell.SubmodelElementCollection.CreateNew("InnerCollection"); - sm.Add(innerSme); - var conceptSme = AdminShell.SubmodelElementCollection.CreateNew("ConceptDescriptionCollection"); - sm.Add(conceptSme); - - // store models information - var msemanticID = AdminShell.Key.CreateNew("GlobalReference", false, "IRI", ModelUri + "models"); - var msme = AdminShell.SubmodelElementCollection.CreateNew("Models", null, msemanticID); - msme.semanticId.Keys.Add(AdminShell.Key.CreateNew("UATypeName", false, "OPC", "Models")); - innerSme.Add(msme); - - // modeluri - msemanticID = AdminShell.Key.CreateNew("GlobalReference", false, "IRI", ModelUri + "models/modeluri"); - var mp = AdminShell.Property.CreateNew("ModelUri", null, msemanticID); - mp.valueType = "string"; - mp.value = ModelUri; - msme.Add(mp); - addLeaf(conceptSme, mp); - // modeluriversion - msemanticID = AdminShell.Key.CreateNew( - "GlobalReference", false, "IRI", ModelUri + "models/modeluriversion"); - mp = AdminShell.Property.CreateNew("ModelUriVersion", null, msemanticID); - mp.valueType = "string"; - mp.value = ModelUriVersion; - msme.Add(mp); - addLeaf(conceptSme, mp); - // modeluripublicationdate - msemanticID = AdminShell.Key.CreateNew( - "GlobalReference", false, "IRI", ModelUri + "models/modeluripublicationdate"); - mp = AdminShell.Property.CreateNew("ModelUriPublicationDate", null, msemanticID); - mp.valueType = "string"; - mp.value = ModelUriPublicationDate; - msme.Add(mp); - addLeaf(conceptSme, mp); - // requiredmodeluri - msemanticID = AdminShell.Key.CreateNew( - "GlobalReference", false, "IRI", ModelUri + "models/requiredmodeluri"); - mp = AdminShell.Property.CreateNew("RequiredModelUri", null, msemanticID); - mp.valueType = "string"; - mp.value = RequiredModelUri; - msme.Add(mp); - addLeaf(conceptSme, mp); - // modeluriversion - msemanticID = AdminShell.Key.CreateNew( - "GlobalReference", false, "IRI", ModelUri + "models/requiredmodeluriversion"); - mp = AdminShell.Property.CreateNew("RequiredModelUriVersion", null, msemanticID); - mp.valueType = "string"; - mp.value = RequiredModelUriVersion; - msme.Add(mp); - addLeaf(conceptSme, mp); - // modeluripublicationdate - msemanticID = AdminShell.Key.CreateNew( - "GlobalReference", false, "IRI", ModelUri + "models/requiredmodeluripublicationdate"); - mp = AdminShell.Property.CreateNew("RequiredModelUriPublicationDate", null, msemanticID); - mp.valueType = "string"; - mp.value = RequiredModelUriPublicationDate; - msme.Add(mp); - addLeaf(conceptSme, mp); - - // iterate through independent root trees - // store UADataType to UADataTypeCollection in the end - var semanticIDDataTypes = AdminShell.Key.CreateNew( - "GlobalReference", false, "IRI", ModelUri + "UADataTypeCollection"); - var smeDataTypes = AdminShell.SubmodelElementCollection.CreateNew( - "UADataTypeCollection", null, semanticIDDataTypes); - - foreach (UaNode n in roots) - { - String name = n.BrowseName; - if (n.SymbolicName != null && n.SymbolicName != "") - { - name = n.SymbolicName; - } - var semanticID = AdminShell.Key.CreateNew("GlobalReference", false, "IRI", ModelUri + name); - if ((n.children != null && n.children.Count != 0) || - (n.fields != null && n.fields.Count != 0)) - { - var sme = AdminShell.SubmodelElementCollection.CreateNew(name, null, semanticID); - sme.semanticId.Keys.Add(AdminShell.Key.CreateNew("UATypeName", false, "OPC", n.UAObjectTypeName)); - switch (n.UAObjectTypeName) - { - case "UADataType": - case "UAObjectType": - smeDataTypes.Add(sme); - break; - default: - innerSme.Add(sme); - break; - } - if (n.Value != null && n.Value != "") - { - var p = createSE(n, ModelUri); - sme.Add(p); - addLeaf(conceptSme, p); - } - foreach (field f in n.fields) - { - sme.semanticId.Keys.Add( - AdminShell.Key.CreateNew( - "UAField", false, "OPC", f.name + " = " + f.value + " : " + f.description)); - - semanticID = AdminShell.Key.CreateNew( - "GlobalReference", false, "IRI", ModelUri + name + "/" + f.name); - - var p = AdminShell.Property.CreateNew(f.name, null, semanticID); - p.valueType = "string"; - p.value = f.value; - sme.Add(p); - addLeaf(conceptSme, p); - } - foreach (UaNode c in n.children) - { - createSubmodelElements(c, env, sme, smref, ModelUri + name + "/", conceptSme); - } - } - else - { - var se = createSE(n, ModelUri); - switch (n.UAObjectTypeName) - { - case "UADataType": - case "UAObjectType": - smeDataTypes.Add(se); - addLeaf(conceptSme, se); - break; - default: - innerSme.Add(se); - addLeaf(conceptSme, se); - break; - } - } - } - - // Add datatypes in the end - innerSme.Add(smeDataTypes); - } - - public static void createSubmodelElements( - UaNode n, AdminShell.AdministrationShellEnv env, AdminShell.SubmodelElementCollection smec, - AdminShell.SubmodelRef smref, string path, AdminShell.SubmodelElementCollection concepts) - { - String name = n.BrowseName; - if (n.SymbolicName != null && n.SymbolicName != "") - { - name = n.SymbolicName; - } - var semanticID = AdminShell.Key.CreateNew("GlobalReference", false, "IRI", path + name); - if ((n.children != null && n.children.Count != 0) || - (n.fields != null && n.fields.Count != 0)) - { - var sme = AdminShell.SubmodelElementCollection.CreateNew(name, null, semanticID); - sme.semanticId.Keys.Add(AdminShell.Key.CreateNew("UATypeName", false, "OPC", n.UAObjectTypeName)); - smec.Add(sme); - if (n.Value != "") - { - var p = createSE(n, path); - sme.Add(p); - addLeaf(concepts, p); - } - foreach (field f in n.fields) - { - sme.semanticId.Keys.Add( - AdminShell.Key.CreateNew( - "UAField", false, "OPC", f.name + " = " + f.value + " : " + f.description)); - semanticID = AdminShell.Key.CreateNew("GlobalReference", false, "IRI", path + name + "/" + f.name); - var p = AdminShell.Property.CreateNew(f.name, null, semanticID); - p.valueType = "string"; - p.value = f.value; - sme.Add(p); - addLeaf(concepts, p); - } - if (n.children != null) - { - foreach (UaNode c in n.children) - { - createSubmodelElements(c, env, sme, smref, path + name + "/", concepts); - } - } - } - else - { - var se = createSE(n, path); - smec.Add(se); - addLeaf(concepts, se); - } - } - - public static AdminShell.SubmodelElement createSE(UaNode n, string path) - { - AdminShell.SubmodelElement se = null; - - String name = n.BrowseName; - if (n.SymbolicName != null && n.SymbolicName != "") - { - name = n.SymbolicName; - } - - // Check that semanticID only exists once and no overlapping names - if (!semanticIDPool.ContainsKey(path + name)) - { - semanticIDPool.Add(path + name, 0); - } - else - { - // Names are not unique - string[] split = n.NodeId.Split('='); - name += split[split.Length - 1]; - semanticIDPool.Add(path + name, 0); - } - var semanticID = AdminShell.Key.CreateNew("GlobalReference", false, "IRI", path + name); - - switch (n.UAObjectTypeName) - { - case "UAReferenceType": - se = AdminShell.RelationshipElement.CreateNew(name, null, semanticID); - if (se == null) return null; - break; - default: - se = AdminShell.Property.CreateNew(name, null, semanticID); - if (se == null) return null; - (se as AdminShell.Property).valueType = "string"; - (se as AdminShell.Property).value = n.Value; - break; - } - - if (n.UAObjectTypeName == "UAVariable") - { - se.category = "VARIABLE"; - } - - se.semanticId.Keys.Add(AdminShell.Key.CreateNew("UATypeName", false, "OPC", n.UAObjectTypeName)); - se.semanticId.Keys.Add(AdminShell.Key.CreateNew("UANodeId", false, "OPC", n.NodeId)); - if (n.ParentNodeId != null && n.ParentNodeId != "") - se.semanticId.Keys.Add(AdminShell.Key.CreateNew("UAParentNodeId", false, "OPC", n.ParentNodeId)); - if (n.BrowseName != null && n.BrowseName != "") - se.semanticId.Keys.Add(AdminShell.Key.CreateNew("UABrowseName", false, "OPC", n.BrowseName)); - if (n.DisplayName != null && n.DisplayName != "") - se.semanticId.Keys.Add(AdminShell.Key.CreateNew("UADisplayName", false, "OPC", n.DisplayName)); - if (n.NameSpace != null && n.NameSpace != "") - se.semanticId.Keys.Add(AdminShell.Key.CreateNew("UANameSpace", false, "OPC", n.NameSpace)); - if (n.SymbolicName != null && n.SymbolicName != "") - se.semanticId.Keys.Add(AdminShell.Key.CreateNew("UASymbolicName", false, "OPC", n.SymbolicName)); - if (n.DataType != null && n.DataType != "") - se.semanticId.Keys.Add(AdminShell.Key.CreateNew("UADataType", false, "OPC", n.DataType)); - if (n.Description != null && n.Description != "") - se.semanticId.Keys.Add(AdminShell.Key.CreateNew("UADescription", false, "OPC", n.Description)); - foreach (string s in n.references) - { - se.semanticId.Keys.Add(AdminShell.Key.CreateNew("UAReference", false, "OPC", s)); - } - if (n.DefinitionName != null && n.DefinitionName != "") - se.semanticId.Keys.Add(AdminShell.Key.CreateNew("UADefinitionName", false, "OPC", n.DefinitionName)); - if (n.DefinitionNameSpace != null && n.DefinitionNameSpace != "") - se.semanticId.Keys.Add( - AdminShell.Key.CreateNew( - "UADefinitionNameSpace", false, "OPC", n.DefinitionNameSpace)); - foreach (field f in n.fields) - { - se.semanticId.Keys.Add( - AdminShell.Key.CreateNew( - "UAField", false, "OPC", f.name + " = " + f.value + " : " + f.description)); - } - - return se; - } - - public static void addLeaf(AdminShell.SubmodelElementCollection concepts, AdminShell.SubmodelElement sme) - { - var se = AdminShell.Property.CreateNew(sme.idShort, null, sme.semanticId[0]); - concepts.Add(se); - } - } -} diff --git a/src/AasxWpfControlLibrary/ThingDescriptionSemanticID.cs b/src/AasxWpfControlLibrary/ThingDescriptionSemanticID.cs deleted file mode 100644 index bb02e4d91..000000000 --- a/src/AasxWpfControlLibrary/ThingDescriptionSemanticID.cs +++ /dev/null @@ -1,269 +0,0 @@ -/* -Copyright (c) 2021-2022 Otto-von-Guericke-Universität Magdeburg, Lehrstuhl Integrierte Automation -harish.pakala@ovgu.de, Author: Harish Kumar Pakala - -This source code is licensed under the Apache License 2.0 (see LICENSE.txt). - -This source code may use other Open Source software components (see LICENSE.txt). -*/ - -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading; -using System.Threading.Tasks; -using System.Windows; -using System.Xml; -using AdminShellNS; -using Microsoft.VisualBasic.FileIO; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using Newtonsoft.Json.Schema; - -namespace AasxPackageExplorer -{ - public static class TDSemanticId - { - public static JObject semanticIDJObject = new JObject - { - // td Schema - ["Thing"] = "https://www.w3.org/2019/wot/td#Thing", - ["@type"] = "http://www.w3.org/1999/02/22-rdf-syntax-ns#type", - ["@id"] = "tbd", - ["id"] = "tbd", - ["@context"] = "https://www.w3.org/2019/wot/td/v1", - ["title"] = "https://dublincore.org/specifications/dublin-core/dcmi-terms/#title", - ["titles"] = "https://dublincore.org/specifications/dublin-core/dcmi-terms/#title", - ["description"] = "https://www.dublincore.org/specifications/dublin-core/dcmi-terms/#description", - ["descriptions"] = "https://www.dublincore.org/specifications/dublin-core/dcmi-terms/#description", - - ["created"] = "https://dublincore.org/specifications/dublin-core/dcmi-terms/#created", - ["modified"] = "https://dublincore.org/specifications/dublin-core/dcmi-terms/#modified", - ["support"] = "https://www.w3.org/2019/wot/td#supportContact", - ["base"] = "https://www.w3.org/2019/wot/td#baseURI", - - //Property - ["properties"] = "https://www.w3.org/2019/wot/json-schema#properties", - ["property"] = "https://www.w3.org/2019/wot/td#PropertyAffordance",// Property Affordance - ["observable"] = "https://www.w3.org/2019/wot/td#isObservable", - - //action - ["actions"] = "https://www.w3.org/2019/wot/td#hasActionAffordance", - ["action"] = "https://www.w3.org/2019/wot/td#ActionAffordance", - ["input"] = "https://www.w3.org/2019/wot/td#hasInputSchema", - ["output"] = "https://www.w3.org/2019/wot/td#hasOutputSchema", - ["safe"] = "https://www.w3.org/2019/wot/td#isSafe", - ["idempotent"] = "https://www.w3.org/2019/wot/td#isIdempotent", - - //event - ["events"] = "https://www.w3.org/2019/wot/td#hasEventAffordance", - ["event"] = "https://www.w3.org/2019/wot/td#EventAffordance", - ["subscription"] = "https://www.w3.org/2019/wot/td#hasSubscriptionSchema", - ["data"] = "https://www.w3.org/2019/wot/td#hasNotificationSchema", - ["cancellation"] = "https://www.w3.org/2019/wot/td#hasCancellationSchema", - - //links - ["links"] = "https://www.w3.org/2019/wot/td#hasLink", - ["link"] = "https://www.w3.org/2019/wot/hypermedia#Link", - - //forms - ["forms"] = "https://www.w3.org/2019/wot/td#hasForm", - ["form"] = "https://www.w3.org/2019/wot/hypermedia#Form", - - ["security"] = "https://www.w3.org/2019/wot/td#hasSecurityConfiguration", - - //securityDefinitions - ["securityDefinitions"] = "https://www.w3.org/2019/wot/td#definesSecurityScheme", - ["apikey"] = "https://www.w3.org/2019/wot/security#APIKeySecurityScheme", - ["basic"] = "https://www.w3.org/2019/wot/security#BasicSecurityScheme", - ["bearer"] = "https://www.w3.org/2019/wot/security#BearerSecurityScheme", - ["combo"] = "https://www.w3.org/2019/wot/security#ComboSecurityScheme", - ["digest"] = "https://www.w3.org/2019/wot/security#DigestSecurityScheme", - ["nosec"] = "https://www.w3.org/2019/wot/security#NoSecurityScheme", - ["oauth2"] = "https://www.w3.org/2019/wot/security#OAuth2SecurityScheme", - ["psk"] = "https://www.w3.org/2019/wot/security#PSKSecurityScheme", - - - ["allOf"] = "https://www.w3.org/2019/wot/security#allOf", - ["authorization"] = "https://www.w3.org/2019/wot/security#authorization", - ["oneOf"] = "https://www.w3.org/2019/wot/security#oneOf", - ["proxy"] = "https://www.w3.org/2019/wot/security#proxy", - ["refresh"] = "https://www.w3.org/2019/wot/security#refresh", - ["token"] = "https://www.w3.org/2019/wot/security#token", - ["alg"] = "https://www.w3.org/2019/wot/security#alg", - ["flow"] = "https://www.w3.org/2019/wot/security#flow", - ["format"] = "https://www.w3.org/2019/wot/security#format", - ["identity"] = "https://www.w3.org/2019/wot/security#identity", - ["in"] = "https://www.w3.org/2019/wot/security#in", - ["name"] = "https://www.w3.org/2019/wot/security#name", - ["qop"] = "https://www.w3.org/2019/wot/security#qop", - ["scopes"] = "https://www.w3.org/2019/wot/security#scopes", - - //DataSchema - ["const"] = "https://www.w3.org/2019/wot/json-schema#const", - ["default"] = "https://www.w3.org/2019/wot/json-schema#default", - ["oneOf"] = "https://www.w3.org/2019/wot/json-schema#oneOf", - ["enum"] = "https://www.w3.org/2019/wot/json-schema#enum", - ["readOnly"] = "https://www.w3.org/2019/wot/json-schema#readOnly", - ["writeOnly"] = "https://www.w3.org/2019/wot/json-schema#writeOnly", - ["format"] = "https://www.w3.org/2019/wot/json-schema#format", - ["type"] = "tbd", - - //ArraySchema - ["items"] = "https://www.w3.org/2019/wot/json-schema#items", - ["item"] = "https://www.w3.org/2019/wot/json-schema#items", - ["minItems"] = "https://www.w3.org/2019/wot/json-schema#minItems", - ["maxItems"] = "https://www.w3.org/2019/wot/json-schema#maxItems", - - //NumberSchema and Integer - ["minimum"] = "https://www.w3.org/2019/wot/json-schema#minimum", - ["exclusiveMinimum"] = "https://www.w3.org/2019/wot/json-schema#exclusiveMinimum", - ["maximum"] = "https://www.w3.org/2019/wot/json-schema#maximum", - ["exclusiveMaximum"] = "https://www.w3.org/2019/wot/json-schema#exclusiveMaximum", - ["multipleOf"] = "https://www.w3.org/2019/wot/json-schema#multipleOf", - - //ObjectSchema - ["required"] = "https://www.w3.org/2019/wot/json-schema#required", - - //StringSchema - ["minLength"] = "https://www.w3.org/2019/wot/json-schema#minLength", - ["maxLength"] = "https://www.w3.org/2019/wot/json-schema#maxLength", - ["pattern"] = "https://www.w3.org/2019/wot/json-schema#pattern", - ["contentEncoding"] = "https://www.w3.org/2019/wot/json-schema#contentEncoding", - ["contentMediaType"] = "https://www.w3.org/2019/wot/json-schema#contentMediaType", - - ["profile"] = "https://www.w3.org/2019/wot/td#hasProfile", - - - ["op"] = "https://www.w3.org/2019/wot/td#OperationType", - - ["success"] = "https://www.w3.org/2019/wot/hypermedia#isSuccess", - ["ContentType"] = "https://www.w3.org/2019/wot/hypermedia#forContentType", - - ["version"] = "https://www.w3.org/2019/wot/td#versionInfo", - ["VersionInfo"] = "https://www.w3.org/2019/wot/td#versionInfo", - - ["invokeAction"] = "https://www.w3.org/2019/wot/td#invokeAction", - ["observeAllProperties"] = "https://www.w3.org/2019/wot/td#observeAllProperties", - ["observeProperty"] = "https://www.w3.org/2019/wot/td#observeProperty", - ["readAllProperties"] = "https://www.w3.org/2019/wot/td#readAllProperties", - ["readMultipleProperties"] = "https://www.w3.org/2019/wot/td#readMultipleProperties", - ["readProperty"] = "https://www.w3.org/2019/wot/td#readProperty", - ["subscribeAllEvents"] = "https://www.w3.org/2019/wot/td#subscribeAllEvents", - ["subscribeEvent"] = "https://www.w3.org/2019/wot/td#subscribeEvent", - ["unobserveAllProperties"] = "https://www.w3.org/2019/wot/td#unobserveAllProperties", - ["unobserveProperty"] = "https://www.w3.org/2019/wot/td#unobserveProperty", - ["unsubscribeAllEvents"] = "https://www.w3.org/2019/wot/td#unsubscribeAllEvents", - ["unsubscribeEvent"] = "https://www.w3.org/2019/wot/td#unsubscribeEvent", - ["writeAllProperties"] = "https://www.w3.org/2019/wot/td#writeAllProperties", - ["writeMultipleProperties"] = "https://www.w3.org/2019/wot/td#writeMultipleProperties", - ["writeProperty"] = "https://www.w3.org/2019/wot/td#writeProperty", - - // json-schema - ["allOf"] = "https://www.w3.org/2019/wot/json-schema#allOf", - ["anyOf"] = "https://www.w3.org/2019/wot/json-schema#anyOf", - ["contentType"] = "https://www.w3.org/2019/wot/hypermedia#forContentType", - - ["href"] = "https://www.w3.org/2019/wot/hypermedia#hasTarget", - - ["scope"] = "https://www.w3.org/2019/wot/td#scope", - - ["uriVariables"] = "", - ["scheme"] = "", - - - - ["schemaDefinitions"] = "", - ["propertyName"] = "https://www.w3.org/2019/wot/json-schema#propertyName", - - //hypermedia - - ["AdditionalExpectedResponse"] = "https://www.w3.org/2019/wot/hypermedia#AdditionalExpectedResponse", - ["ExpectedResponse"] = "https://www.w3.org/2019/wot/hypermedia#ExpectedResponse", - - }; - - public static JObject arrayListDescription = new JObject - { - ["security"] = "Set of security definition names, chosen from those defined in securityDefinitions." + - "These must all be satisfied for access to resources.", - ["scopes"] = " Set of authorization scope identifiers provided as an array." + - "These are provided in tokens returned by an authorization server and associated with forms in" + - "order to identify what resources a client may access and how. The values associated with a" + - "form should be chosen from those defined in an OAuth2SecurityScheme active on that form.", - ["op"] = "Indicates the semantic intention of performing the operation(s) described by" + - "the form. For example, the Property interaction allows get and set operations." + - "The protocol binding may contain a form for the get operation and a different form for the" + - "set operation. The op attribute indicates which form is for which and allows the client to select" + - "the correct form for the operation required. op can be assigned one or more interaction verb(s) " + - "representing a semantic intention of an operation." - }; - public static JObject arrayListDesc = new JObject - { - ["enum"] = "Restricted set of values provided as an array.", - ["@type"] = "JSON-LD keyword to label the object with semantic tags (or types)." - }; - public static string getarrayListDescription(string tdType) - { - try - { - foreach (var temp in (JToken)arrayListDescription) - { - JProperty x = (JProperty)temp; - if (x.Name.ToString() == tdType) - { - return x.Value.ToString(); - } - } - return ""; - } - catch - { - return ""; - } - - } - public static string getarrayListDesc(string tdType) - { - try - { - foreach (var temp in (JToken)arrayListDesc) - { - JProperty x = (JProperty)temp; - if (x.Name.ToString() == tdType) - { - return x.Value.ToString(); - } - } - return ""; - } - catch - { - return ""; - } - - } - public static string getSemanticID(string tdType) - { - try - { - foreach (var temp in (JToken)semanticIDJObject) - { - JProperty x = (JProperty)temp; - if (x.Name.ToString() == tdType) - { - return x.Value.ToString(); - } - } - return ""; - } - catch - { - return ""; - } - - } - } -} \ No newline at end of file diff --git a/src/AnyUi/AnyUiDialogueDataBase.cs b/src/AnyUi/AnyUiDialogueDataBase.cs index c1d5fb09f..74aead595 100644 --- a/src/AnyUi/AnyUiDialogueDataBase.cs +++ b/src/AnyUi/AnyUiDialogueDataBase.cs @@ -158,6 +158,9 @@ public AnyUiDialogueDataChangeElementAttributes( } } + // resharper disable ClassNeverInstantiated.Global + // resharper disable UnassignedField.Global + public class AnyUiDialogueDataTextEditor : AnyUiDialogueDataBase { public class Preset @@ -186,6 +189,9 @@ public AnyUiDialogueDataTextEditor( } } + // resharper enable ClassNeverInstantiated.Global + // resharper enable UnassignedField.Global + public class AnyUiDialogueDataSelectEclassEntity : AnyUiDialogueDataBase { public enum SelectMode { General, IRDI, ConceptDescription }