Example #1
0
        public void CloseTabList()
        {
            List <int> idlist = new List <int>();

            idlist.Add(SelectedIndex);   // first is current index

            string tabnames = "";

            foreach (TabPage p in TabPages)      // all main tabs, load/display
            {
                UserControls.UserControlCommonBase uccb = p.Controls[0] as UserControls.UserControlCommonBase;
                uccb.Closing();
                PanelInformation.PanelInfo pi = PanelInformation.GetPanelInfoByType(uccb.GetType());
                idlist.Add(pi != null ? (int)pi.PopoutID : -1);
                idlist.Add(uccb.displaynumber);
                tabnames += p.Text + ";";
            }

            SQLiteConnectionUser.PutSettingString("MajorTabControlList", string.Join(",", idlist));
            SQLiteConnectionUser.PutSettingString("MajorTabControlName", tabnames);
        }
Example #2
0
        public void CloseTabList()
        {
            List <int> idlist = new List <int>();

            idlist.Add(SelectedIndex);   // first is current index

            string tabnames = "";

            UserControls.UserControlContainerSplitter primary = PrimaryTab;

            foreach (TabPage p in TabPages)      // all main tabs, load/display
            {
                UserControls.UserControlCommonBase uccb = p.Controls[0] as UserControls.UserControlCommonBase;
                uccb.CloseDown();
                PanelInformation.PanelInfo pi = PanelInformation.GetPanelInfoByType(uccb.GetType());
                idlist.Add(Object.ReferenceEquals(uccb, primary) ? -1 : (int)pi.PopoutID);      // primary is marked -1
                idlist.Add(uccb.displaynumber);
                tabnames += p.Text + ";";
            }

            EliteDangerousCore.DB.UserDatabase.Instance.PutSettingString(EDDProfiles.Instance.UserControlsPrefix + "MajorTabControlList", string.Join(",", idlist));
            EliteDangerousCore.DB.UserDatabase.Instance.PutSettingString(EDDProfiles.Instance.UserControlsPrefix + "MajorTabControlName", tabnames);
        }