/// <summary> /// Status of a TT Gateway server change /// </summary> /// <param name="Gateway">Gateway affected by the server status change</param> /// <param name="service">Service whose status changed.</param> /// <param name="IsAvailable">Current status of the service</param> /// <param name="IsLoggedIn">Current logged in status</param> public void OnServerStatus(ITTGateway Gateway, enumServiceType service, int IsAvailable, int IsLoggedIn) { // before requesting products make sure we have a connection to the price server if ((service == enumServiceType.PRICE_SERVICE) && (IsAvailable == 1) && (IsLoggedIn == 1)) { // we're connected, let's make sure it's available while ((Gateway.get_IsAvailable(enumServiceType.PRICE_SERVICE) != 1) || (Gateway.get_IsLoggedIn(enumServiceType.PRICE_SERVICE) != 1)) { System.Threading.Thread.Sleep(25); } // set the flag that the gateway is available m_gatewayAvailable = true; } tsStatus.Text = Gateway.Name.ToString() + ": Connecting to Price Server..."; }
/// <summary> /// MEAPI recieves the gateway attribute list (GAL settings) for the TT Gateway. /// </summary> /// <param name="Gateway">TT Gateway whose GAL settings changed</param> /// <param name="attributeList">Comma-separated list of GAL name-value pairs</param> /// <param name="service">Service that started or restarted</param> public void OnGatewayAttributes(ITTGateway Gateway, string attributeList, enumServiceType service) { // request the products and product types for our selected gateway if (Gateway.Name.ToString() == m_selectedGateway.Name.ToString()) { Gateway.RequestProductTypes(); Gateway.RequestProducts(0); } }