FlexWindow
This information is also available in a PDF: Smartpoint SDK Changes in 8.0 for Flex Window.
Travelport Smartpoint 8.0 is introducing a new theme called Flex windows. Flex windows gives the agent new functionality that allows them to control how many windows they can see, adjust colors for each window, and change the size of each window. Flex windows also removes the dropdown menus from the top of the screen and replaces them with a Sidebar icon toolbar. Because of this enhancement, the GetToolsMenu method is obsolete when using Travelport Smartpoint 8.0 Flex Windows Theme.
Important: You will need to make the necessary changes to your plug-ins, if they are affected, and then recompile so that your plug-in works in FlexWindow mode.
- GetToolsMenu is not supported in FlexWindow mode. Instead, use GetToolsLeftMenu or GetToolsSidebarButton.
- GetSearchMenu is not supported in FlexWindow mode. Instead, use GetSearchSidebarButton.
DoubleTEControl
This control will always be null in FlexWindow, as there is no such thing as DoubleTEControl in the new layout. All public methods and public properties will not work if we use the new skin.
TEControl
Properties
- Sibling is null by default. A terminal will not have a sibling by default in case of FlexWindow layout. But siblings can be manually set using the SetSiblingForTEControl method in UIHelper.
- BottomTEControl is null by default in FlexWindow unless the sibling has been set using SetSiblingForTEControl method in UIHelper.
- TopTEControl is null by default in FlexWindow unless the sibling has been set using SetSiblingForTEControl method in UIHelper.
- DoubleTEControl is null in FlexWindow.
- CloseableTabItem is null in FlexWindow.
- IsSplitScreenEnabled is always false for FlexWindow layout.
Constructor: Existing constructor with DoubleTEControl as input will be used for Classic theme only. For Flexible Windows, there is a new constructor introduced.
UIHelper
Properties
- CurrentCloseableTabItem is always null in FlexWindow layout.
Methods
- GetToolsMenu is obsolete in FlexWindow mode and is only applicable in classic mode. In FlexWindow mode, use GetToolsLeftMenu or GetToolsSidebarButton. You can also use SetMenuItemInToolsMenu. If you do not have Smartpoint 8.0 dll, use SetMenuItemInToolsMenu.
- GetSearchMenu is obsolete in FlexWindow mode and is only applicable in classic mode. In FlexWindow mode, use GetSearchSidebarButton.
- GetCurrentToolsMenu returns null for FlexWindow layout. In FlexWindow mode, use SetMenuItemInToolsMenu.
- GetCurrentSearchMenu returns null for FlexWindow layout. In FlexWindow mode, use SetMenuItemInSearchMenu.
- SetFocusToBottomTEControl(DoubleTEControl) does not exist in FlexWindow mode.
- SetFocusToTopTEControl(DoubleTEControl) does not exist in FlexWindow mode.
- GetTeTabControl always returns null for FlexWindow layout.
TETabControl
This control will always be null in FlexWindow, as TETabControl does not exist in the new layout. All public methods and public properties will not work if we use the new skin.
CloseableTabItem
This control will always be null in FlexWindow, as ClosableTabItem does not exist in the new layout. All public methods and public properties will not work if we use the new skin.
SmartpointUserControl
Properties
- TETabControl is always null in FlexWindow.
ISmartTerminalWindow and SmartTerminalMenu
A new toolbar called LeftToolbar has been added for the new layout.
- PnrCustomToolbar – Some icons have moved from PnrCustomToolbar to LeftToolbar in FlexWindow. For each of the plug-ins, we have added the code to show the icon in LeftToolbar. Third-party developers need to be notified to push their icons into the LeftToobar for FlexWindow layout.
How to get the Menu Items in Flex Windows mode
I do not have Smartpoint 8.0 SDK
If you do not have Smartpoint 8.0 SDK, use SetMenuItemInToolsMenu so that your plug-in will work with earlier versions and with Smartpoint 8.0 and beyond.
If your code is similar to the following:
var toolsMenu = UIHelper.Instance.GetToolsMenu(UIHelper.Instance.CurrentSmartpointUserControl); var menuItem = new SmartMenuItem(); menuItem.Keyword = "My plug-in"; menuItem.Header = "My plug-in"; menuItem.Click += OnOpenMenu; toolsMenu.Items.Add(menuItem);
Then replace it with following lines:
var menuItem = new SmartMenuItem(); menuItem.Keyword = "My Plug-in"; menuItem.Header = " My Plug-in "; menuItem.Click += OnOpenMenu; UIHelper.Instance.SetMenuItemInToolsMenu(menuItem, UIHelper.Instance.CurrentSmartpointUserControl);
If you are using submenu in your code, you can use following code.
var menuItem = new SmartMenuItem(); menuItem.Keyword = "Menu Item"; menuItem.Header = "Menu Item"; menuItem.Style = (Style)(UIHelper.Instance.CurrentTEControl.SmartTerminalWindow).FindResource("TopItemSecund aryPopup"); var subMenuItem = new SmartMenuItem(); subMenuItem.Keyword = "subitem"; subMenuItem.Header = "subitem"; subMenuItem.Click += delegate { CoreHelper.Instance.DoEvents(); MessageBox.Show("Clicked submenu item"); }; menuItem.Items.Add(subMenuItem); UIHelper.Instance.SetMenuItemInToolsMenu(menuItem, UIHelper.Instance.CurrentSmartpointUserControl);
I have Smartpoint 8.0 SDK DLL
A UIHelper method can be used to get all of the menu items from the new left-hand menu when in FlexWindow mode. To get menu items in Flex Window mode, use the following:
if (UIHelper.Instance.IsMultiWindowLayout) { // get the tools menu. StackPanel toolsMenu = UIHelper.Instance.GetToolsLeftMenu(terminalWindow.SmartpointUserControl); … } else { // get the tools menu. var toolsMenu = terminalWindow.SmartpointUserControl.IsInGridView ? UIHelper.Instance.GetToolsGridViewMenu(terminalWindow.SmartpointUserControl) : UIHelper.Instance.GetToolsMenu(terminalWindow.SmartpointUserControl); … }
Use the following code to get all menu items in FlexWindow mode:
UIHelper.Instance.GetAllMenuItemsFromLeftToolbar(smartpointUserControl);
For example:
IEnumerable<MenuItem> menuItems = null; if(UIHelper.Instance.IsMultiWindowLayout) { menuItems = UIHelper.Instance.GetAllMenuItemsFromLeftToolbar(smartpointUserControl); } else { var menu = smartpointUserControl.SmartTerminalMenu; if(menu != null) { menuItems = menu.GetAllMenuItems(); } }
Important Note
With FlexWindows enabled, UIHelper.Instance.CurrentSmartpointUserControl.SmartTerminalMenu will be NULL. The plug-in will need to ensure that SmartTerminalMenu is not null before using it.