Ejemplo n.º 1
0
        public void AddMdiChild()
        {
            if (mdiChildren.ContainsKey(NOT_CONNECTED_SRV))
                mdiChildren[NOT_CONNECTED_SRV].Activate();
            else
            {
                RedisBrowserForm rbf = new RedisBrowserForm(this);
                mdiChildren.Add(NOT_CONNECTED_SRV, rbf);

                rbf.Connected += OnChildConnected;
                rbf.FormClosed += OnChildClosed;

                rbf.Show();
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// If a form with connection to the same address already exisis,
 /// that form will be focused and the method will return true;
 /// otherwise returns false
 /// </summary>
 /// <param name="rbf"></param>
 /// <returns></returns>
 public Boolean TryActivateDuplicate(RedisBrowserForm rbf)
 {
     if (mdiChildren.ContainsKey(rbf.ServerAddress))
     {
         mdiChildren[rbf.ServerAddress].Activate();
         return true;
     }
     return false;
 }