Exemplo n.º 1
0
 /// <summary>
 /// Initialises and shows the WebPos browser window, setting its position and size, and loading the web application.
 /// </summary>
 /// <param name="left">The required position of the left-hand side of the browser window, in pixels.</param>
 /// <param name="top">The required position of the top of the browser window, in pixels.</param>
 /// <param name="width">The required width of the browser window, in pixels.</param>
 /// <param name="height">The required height of the browser window, in pixels.</param>
 /// <param name="url">The address to load the CloudPOS web application.</param>
 public void InitPosWindow(int left, int top, int width, int height, string url)
 {
     _ui.SetPosition(left, top);
     _ui.SetClientSize(width, height);
     _ui.Navigate(url);
     _ui.Show();
 }
Exemplo n.º 2
0
        /// <summary>
        /// ShowGui is called to make the browser window be displayed.
        /// </summary>
        /// <param name="shortcutOrEan">The application screen to be presented first.
        /// If empty, the default "home" or main menu is presented.</param>
        /// <param name="retailerTransactionId">Optionally allows a POS transaction reference
        /// to be attached to the eServices transaction/s.</param>
        public void ShowGui(string shortcutOrEan, string retailerTransactionId = "")
        {
            if (_basket != null && _basket.Committed)
            {
                _basket.Clear();
            }
            var message = new ShowUserInterfaceMessage
            {
                BasketId              = _basket.StrId,
                ShortcutOrEan         = shortcutOrEan,
                RetailerTransactionId = retailerTransactionId,
                OperatorId            = _operator,
            };

            SendJsonRequest(message);
            _ui.Show();
        }