Exemplo n.º 1
0
 void panel_UpdateEvent(object myObject, APIUpdateEventArgs args)
 {
     if (UpdateEvent != null)
     {
         UpdateEvent(myObject, args);
     }
 }
Exemplo n.º 2
0
 void UpdateStatus_UpdateEvent(object myObject, APIUpdateEventArgs args)
 {
     List<long> idsUpdating;
     //bool isCorp = false;
     switch (args.EventType)
     {
         case APIUpdateEventType.UpdateStarted:
             idsUpdating = _updatesRunning[args.UpdateType];
             if (!idsUpdating.Contains(args.OwnerID))
             {
                 idsUpdating.Add(args.OwnerID);
             }
             //isCorp = false;
             //UserAccount.CurrentGroup.GetCharacter(args.OwnerID, ref isCorp);
             //if (args.UpdateType == APIDataType.Orders && isCorp)
             //{
             //    if (_corpOrderUpdates.ContainsKey(args.OwnerID))
             //    {
             //        _corpOrderUpdates[args.OwnerID] = (short)(_corpOrderUpdates[args.OwnerID] + 1);
             //    }
             //    else
             //    {
             //        _corpOrderUpdates.Add(args.OwnerID, (short)1);
             //    }
             //}
             RefreshDisplay();
             break;
         case APIUpdateEventType.UpdateCompleted:
             // If we're dealing with corporate orders API updates then
             // there can be multiple updates running for the same corp.
             // Make sure they are all finished before removing the corp
             // ID from the list of those being updated.
             //isCorp = false;
             bool removeIDFromList = true;
             //UserAccount.CurrentGroup.GetCharacter(args.OwnerID, ref isCorp);
             //if (args.UpdateType == APIDataType.Orders && isCorp)
             //{
             //    removeIDFromList = false;
             //    if (_corpOrderUpdates.ContainsKey(args.OwnerID))
             //    {
             //        _corpOrderUpdates[args.OwnerID] = (short)(_corpOrderUpdates[args.OwnerID] - 1);
             //        if (_corpOrderUpdates[args.OwnerID] <= 0)
             //        {
             //            _corpOrderUpdates[args.OwnerID] = 0;
             //            removeIDFromList = true;
             //        }
             //    }
             //}
             if (removeIDFromList)
             {
                 idsUpdating = _updatesRunning[args.UpdateType];
                 if (idsUpdating.Contains(args.OwnerID))
                 {
                     idsUpdating.Remove(args.OwnerID);
                 }
             }
             if (args.UpdateType == APIDataType.Assets)
             {
                 DisplayAssetChangeScreen();
             }
             RefreshDisplay();
             break;
         case APIUpdateEventType.OrderHasExpiredOrCompleted:
             // Note: this is no longer needed since we refresh unacknowledged orders
             // in the RefreshDisplay method instead...
             RefreshUnackOrders(false);
             break;
         case APIUpdateEventType.AssetsAwaitingAcknowledgement:
             if (!_assetUpdatesAwaitingAcknowledgement.Contains(args.OwnerID))
             {
                 _assetUpdatesAwaitingAcknowledgement.Add(args.OwnerID);
             }
             DisplayAssetChangeScreen();
             break;
         default:
             break;
     }
 }
Exemplo n.º 3
0
 void character_UpdateEvent(object myObject, APIUpdateEventArgs args)
 {
     if (UpdateEvent != null)
     {
         UpdateEvent(myObject, args);
     }
 }