예제 #1
0
파일: TabList.cs 프로젝트: meteorsnows/X
        public void ChangeSelectedTab(Tab tab)
        {
            if (_selectedTab != null)
            {
                _selectedTab.IsSelected = false;
            }

            _selectedTab = tab;

            Invalidate();

            OnTabChanged?.Invoke(_selectedTab, EventArgs.Empty);
            TabChangedCommand?.Execute(tab);
        }
예제 #2
0
        public bool SelectTab(string tabName)
        {
            if (!_dataSourceFile.DataSheets.Contains(tabName))
            {
                return(false);
            }

            var activeFilter = GetActiveFilterCriteria();

            OnTabChanged.Invoke(this, new TabChangedEventArgs()
            {
                TabSheet = _dataSourceFile.DataSheets.GetDataSheetByName(tabName)
            });
            View.SetGridSource(tabName);
            View.SetFilter(activeFilter);
            _currentSheetName = tabName;
            return(true);
        }
 private void TabChanged(int tabNum)
 {
     OnTabChanged?.Invoke((TabType)tabNum);
 }