Esempio n. 1
0
 public void CloseWindow(bool clientInitiated = false)
 {
     if (!clientInitiated)
     {
         QueuePacket(new CloseWindowPacket(CurrentWindow.ID));
     }
     CurrentWindow.CopyToInventory(Inventory);
     CurrentWindow.Dispose();
     CurrentWindow = InventoryWindow;
 }
Esempio n. 2
0
 /// <summary>
 /// Override to add custom disposing code.
 /// </summary>
 /// <param name="isDisposing"></param>
 protected virtual void Dispose(bool isDisposing)
 {
     if (_alreadyDisposed)
     {
         return;
     }
     if (isDisposing)
     {
         if (CurrentWindow != null)
         {
             CurrentWindow.Dispose();
         }
     }
     _alreadyDisposed = true;
 }