Exemplo n.º 1
0
 private SimpleActionInterface FirstControlOfTabPage(TabPage tp)
 {
     if (tp != null && tp.Controls != null && tp.Controls.Count > 0)
     {
         Control first             = tp.Controls[0];
         SimpleActionInterface sai = first as SimpleActionInterface;
         return(sai);
     }
     return(null);
 }
Exemplo n.º 2
0
        private void HandleUserLevelChanged()
        {
            btnLogout.Visible = Program.UserLevel > UserLevels.USER;

            foreach (TabPage tp in tabs.TabPages)
            {
                SimpleActionInterface sai = FirstControlOfTabPage(tp);
                if (sai != null)
                {
                    sai.UserLevelChanged();
                }
            }
        }
Exemplo n.º 3
0
 private void HandleCloseTab()
 {
     if (return_tab != null)
     {
         tabs.SelectedTab = return_tab;
         SimpleActionInterface sai = FirstControlOfTabPage(return_tab);
         if (sai != null)
         {
             sai.Selected();
             sai.UserLevelChanged();
         }
     }
 }