/// <summary>Loads a pane of specific type with the givven arguments.</summary> /// <param name="paneManager">Pane manager to use.</param> /// <param name="arguments">Argument for the pane load function. This is pane specific.</param> /// <returns>A full inialized pane.</returns> /// <remarks>This function uses <c>AwaitTask</c> /// /// - <c>arguments.mode</c>: is the <see cref="PpsOpenPaneMode"/> (optional) /// - <c>arguments.paneType</c>: is the type as string or type, of the pane. (required) /// Well known Pane types are: /// - mask /// - generic /// - picture /// - pdf /// </remarks> public static IPpsWindowPane LoadPane(this IPpsWindowPaneManager paneManager, LuaTable arguments = null) { var paneType = GetPaneType(paneManager, arguments); if (paneType == null) { throw new ArgumentException("Pane type is missing."); } return(paneManager.OpenPaneAsync(paneType, GetDefaultPaneMode(paneManager, arguments), arguments).AwaitTask()); } // func OpenPane
} // func GetDefaultPaneMode /// <summary>Loads a generic wpf window pane <see cref="PpsGenericWpfWindowPane"/>.</summary> /// <param name="paneManager">Pane manager to use.</param> /// <param name="arguments">Argument for the pane load function. This is pane specific.</param> /// <returns>A full inialized pane.</returns> /// <remarks>This function uses <c>AwaitTask</c> /// /// - <c>arguments.mode</c>: is the <see cref="PpsOpenPaneMode"/> (optional) /// </remarks> public static IPpsWindowPane LoadGenericPane(this IPpsWindowPaneManager paneManager, LuaTable arguments = null) => paneManager.OpenPaneAsync(typeof(PpsGenericWpfWindowPane), PpsOpenPaneMode.Default, arguments).AwaitTask();