Пример #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);
 }
Пример #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();
                }
            }
        }
Пример #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();
         }
     }
 }