Exemple #1
0
        void OnGetRequestTab(string tabName)
        {
            if (!TabHeaders.Any(x => x.PageName == tabName))
            {
                return;
            }
            var headerInfo = TabHeaders.FirstOrDefault(x => x.PageName == tabName);

            OnTabItemChecked(headerInfo);
        }
Exemple #2
0
        void Init()
        {
            if (AppSettingConfig.Default.AppConfig.MainWindowTabs != null)
            {
                AppSettingConfig.Default.AppConfig.MainWindowTabs.ForEach(x => TabHeaders.Add(x));
                if (TabHeaders.Any(x => x.IsSelected))
                {
                    _selectedTabItem = TabHeaders.FirstOrDefault(x => x.IsSelected);
                }
            }

            TabItemCheckedCommand = new RelayCommand <HeaderInfo>(OnTabItemChecked);
            PageCommand           = new RelayCommand <string>(OnPageCommand);
            ProgressCommand       = new RelayCommand(OnProgressClick);
            NetWorkCommand        = new RelayCommand <bool>(OnNetWorkClick);
            SetTaskInfos();
            RegeistMessenger <string>(OnGetRequestTab);
        }