示例#1
0
        /// <summary>
        /// Processes the queried market orders.
        /// </summary>
        /// <param name="result"></param>
        private void OnMarketOrdersUpdated(APIResult <SerializableAPIOrderList> result)
        {
            // Notify an error occured
            if (ShouldNotifyError(result, APIMethods.MarketOrders))
            {
                EveClient.Notifications.NotifyMarketOrdersError(this, result);
            }

            // Quits if there is an error
            if (result.HasError)
            {
                return;
            }

            // Import the data
            var endedOrders = new List <MarketOrder>();

            m_marketOrders.Import(result.Result.Orders, endedOrders);

            // Sends a notification
            if (endedOrders.Count != 0)
            {
                EveClient.Notifications.NotifyMarkerOrdersEnding(this, endedOrders);
            }

            // Fires the event regarding market orders update.
            EveClient.OnCharacterMarketOrdersChanged(this);
        }