示例#1
0
        public static TabWorker CreateInstance([NotNull] params TabItem[] tabs)
        {
            var worker = new TabWorker();

            worker._tabItems.AddRange(tabs);

            return(worker);
        }
示例#2
0
        private static void CreateTabs()
        {
            _tabWorker   = new TabWorker();
            _coinTabItem = new TabItem {
                ContentDrawer = DrawCoinSettings, Label = "TwitchToolkitCoins".Translate(), Tooltip = "TKUtils.Coins.Tooltip".Localize()
            };

            _cooldownTabItem = new TabItem
            {
                ContentDrawer = DrawCooldownSettings, Label = "TwitchToolkitCooldowns".Translate(), Tooltip = "TKUtils.Cooldowns.Tooltip".Localize()
            };

            _karmaTabItem = new TabItem {
                ContentDrawer = DrawKarmaSettings, Label = "TwitchToolkitKarma".Translate(), Tooltip = "TKUtils.Karma.Tooltip".Localize()
            };

            _patchesTabItem = new TabItem {
                ContentDrawer = DrawPatchesSettings, Label = "TKUtils.Addons.Label".Localize(), Tooltip = "TKUtils.Addons.Tooltip".Localize()
            };
            _storeTabItem = new TabItem {
                ContentDrawer = DrawStoreSettings, Label = "TwitchToolkitStore".Translate(), Tooltip = "TKUtils.Store.Tooltip".Localize()
            };

            _storytellerTabItem = new TabItem
            {
                ContentDrawer = DrawStorytellerSettings, Label = "TKUtils.Storyteller".Localize(), Tooltip = "TKUtils.Storyteller.Tooltip".Localize()
            };

            _viewerTabItem = new TabItem {
                ContentDrawer = DrawViewerSettings, Label = "TwitchToolkitViewers".Translate(), Tooltip = "TKUtils.Viewers.Tooltip".Localize()
            };

            _tabWorker.AddTab(_coinTabItem);
            _tabWorker.AddTab(_cooldownTabItem);
            _tabWorker.AddTab(_karmaTabItem);
            _tabWorker.AddTab(_patchesTabItem);
            _tabWorker.AddTab(_storeTabItem);
            _tabWorker.AddTab(_storytellerTabItem);
            _tabWorker.AddTab(_viewerTabItem);
        }