示例#1
0
        private void OnTabControlChanged()
        {
            ClearAllPages(TabControlMain);

            var main = TabControlMain.SelectedTab;
            var sub  = (main.Controls[0] is TabControl tc ? tc.SelectedTab : main);

            BinaryDataUtil.ImportGrid($"{main.Text}/{sub.Text}.bin", (DataViewer)sub.Controls[0], AddGridRow);
        }
示例#2
0
        private void OnTabControlChanged() {
            ClearAllPages(TabControlMain);

            var main = TabControlMain.SelectedTab;
            var dv = GetCurrentDataViewport();
            BinaryDataUtil.ImportGrid($"{main.Text}/{dv.Parent.Text}.bin", dv, AddGridRow);

            // if (main.Controls[0] is TabControl tc) {
            //     foreach (TabPage page in tc.TabPages) {
            //         BinaryDataUtil.ImportGrid($"{main.Text}/{page.Name}.bin", (DataViewport)page.Controls[0], 
            //             tc.SelectedTab == page ? AddGridRow : null);
            //     }
            //
            //     return;
            // } 

            // BinaryDataUtil.ImportGrid($"{main.Text}/{main.Text}.bin", (DataViewport)main.Controls[0], AddGridRow);
        }