예제 #1
0
 void mainTabControl_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (selectedPanel != null)
     {
         selectedPanel.SavePanel(); //save any changes in previous tab
     }
     selectedPanel = mainTabControl.SelectedTab.Tag as ContentPanel;
     if (selectedPanel != null)
     {
         selectedPanel.UpdatePanel(); //refresh new tab
     }
 }
예제 #2
0
 private void Conf_Main_FormClosing(object sender, FormClosingEventArgs e)
 {
     foreach (TabPage tab in mainTabControl.TabPages)
     {
         ContentPanel panel = tab.Tag as ContentPanel;
         if (panel != null)
         {
             panel.ClosePanel();
             panel.Dispose();
         }
     }
 }
예제 #3
0
        public Conf_Main()
        {
            InitializeComponent();

            emuBrowserTab.Tag = conf_EmuBrowser1;
            romBrowserTab.Tag = conf_DBBrowser1;
            importerTab.Tag   = conf_DBImporter1;
            groupsTab.Tag     = conf_Groups1;
            backupTab.Tag     = conf_DBBackup1;
            optionsTab.Tag    = conf_Options_New1;

            mainTabControl.SelectedIndexChanged += new EventHandler(mainTabControl_SelectedIndexChanged);

            selectedPanel = mainTabControl.SelectedTab.Tag as ContentPanel;
        }