Beispiel #1
0
 /// <summary>
 /// 显示或者关闭菊花
 /// </summary>
 /// <param name="key">键</param>
 /// <param name="isShow">是否显示</param>
 public void ShowWaiting(string key, bool isShow, string tip = "")
 {
     if (isShow)
     {
         if (_waitingKeyList.Contains(key))
         {
             //JW.Common.Log.LogE("ShowWaiting Logic Error Repeat Key:" + key);
             if (_waiting != null)
             {
                 _waiting.ShowTip(tip);
             }
             return;
         }
         _waitingKeyList.Add(key);
         if (_waiting == null)
         {
             _waiting = UIFormHelper.CreateResidentFormClass <UIWaiting>();
             _waiting.ShowTip(tip);
         }
         else
         {
             _waiting.ActiveForm(true);
             _waiting.ShowTip(tip);
         }
     }
     else
     {
         int firstIndex = _waitingKeyList.IndexOf(key);
         if (firstIndex >= 0 && firstIndex < _waitingKeyList.Count)
         {
             _waitingKeyList.RemoveAt(firstIndex);
         }
         if (_waitingKeyList.Count == 0)
         {
             if (null != _waiting)
             {
                 _waiting.ActiveForm(false);
                 //UIFormHelper.DisposeFormClass<UIWaiting>(ref _waiting);
                 //_waiting = null;
             }
         }
     }
 }