Beispiel #1
0
        public void ResetTab(Cbutton cbtn)
        {
            if (cbutton1 != cbtn && cbutton1.m_bEnable)
            {
                cbutton1.ResetState();
            }
            if (cbutton2 != cbtn && cbutton2.m_bEnable)
            {
                cbutton2.ResetState();
            }
            if (cbutton3 != cbtn && cbutton3.m_bEnable)
            {
                cbutton3.ResetState();
            }
            if (cbutton4 != cbtn && cbutton4.m_bEnable)
            {
                cbutton4.ResetState();
            }

            TabButtonClicked(cbtn);
        }
Beispiel #2
0
 private void TabButtonClicked(Cbutton cbtn)
 {
     if (cbtn == cbutton1)
     {
         if (m_tabIndex == 0 || !cbtn.m_bEnable)
         {
             return;
         }
         m_tabIndex = 0;
     }
     else if (cbtn == cbutton2)
     {
         if (m_tabIndex == 1 || !cbtn.m_bEnable)
         {
             return;
         }
         m_tabIndex = 1;
     }
     else if (cbtn == cbutton3)
     {
         if (m_tabIndex == 2 || !cbtn.m_bEnable)
         {
             return;
         }
         m_tabIndex = 2;
     }
     else if (cbtn == cbutton4 || !cbtn.m_bEnable)
     {
         if (m_tabIndex == 3)
         {
             return;
         }
         m_tabIndex = 3;
     }
     TabBtnIndexChanged(m_tabIndex);
 }