public void ShiftTo(TranslatePanel objPanel)
 {
     for (int i = 0; i < marrPanels.Length; i++)
     {
         if (marrPanels[i] == objPanel)
         {
             ShiftTo(i);
             break;
         }
     }
 }
 private void Reorder(TranslatePanel objOutPanelCurrentPanel)
 {
     for (int i = 0; i < marrPanels.Length; i++)
     {
         if (marrPanels[i] != objOutPanelCurrentPanel && i != mintCurrentIndex)
         {
             if (i < mintCurrentIndex)
             {
                 marrPanels[i].Visible = false;
             }
             else
             {
                 marrPanels[i].Visible = false;
             }
         }
         else
         {
             marrPanels[i].Visible = true;
         }
     }
 }
        public void ShiftTo(int intIndex)
        {
            if (this.mintCurrentIndex != intIndex && intIndex >= 0 && intIndex < marrPanels.Length)
            {
                TranslatePanel objOutPanelCurrentPanel = marrPanels[mintCurrentIndex];

                // MoveRight
                if (intIndex > this.mintCurrentIndex)
                {
                    marrPanels[intIndex].InRight(false);
                    objOutPanelCurrentPanel.OutLeft(false);
                }
                else // MoveLeft
                {
                    marrPanels[intIndex].InLeft(false);
                    objOutPanelCurrentPanel.OutRight(false);
                }

                this.mintCurrentIndex = intIndex;

                Reorder(objOutPanelCurrentPanel);
            }
        }