Beispiel #1
0
        public void ChangeSelectedTab(Tab tab)
        {
            if (_selectedTab != null)
            {
                _selectedTab.IsSelected = false;
            }

            _selectedTab = tab;

            Invalidate();

            OnTabChanged?.Invoke(_selectedTab, EventArgs.Empty);
            TabChangedCommand?.Execute(tab);
        }
        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);
 }