Beispiel #1
0
        public void Initialize(IDataSourceAdapter adapter, IEnumerable <ITabView> views)
        {
            DataSourceAdapter = adapter;
            m_tabHandler      = new TabHandler(tabControl);

            foreach (ITabView view in views)
            {
                ITabView viewAdd = (ITabView)view.Clone();
                viewAdd.GameFileViewControl.MultiSelect      = MultiSelect;
                viewAdd.GameFileViewControl.ItemDoubleClick += GameFileViewControl_RowDoubleClicked;
                m_tabHandler.AddTab(viewAdd);
            }
        }
Beispiel #2
0
 public void Initialize(IDataSourceAdapter adapter, IEnumerable <ITabView> views)
 {
     this.DataSourceAdapter = adapter;
     this.m_tabHandler      = new TabHandler(this.tabControl);
     using (IEnumerator <ITabView> enumerator = views.GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             ITabView tab = (ITabView)enumerator.Current.Clone();
             tab.GameFileViewControl.MultiSelect = this.MultiSelect;
             this.m_tabHandler.AddTab(tab);
         }
     }
 }
        private void SetupTabs()
        {
            List <ITabView> tabViews = new List <ITabView>();

            ColumnConfig[] colConfig = GetColumnConfig();
            TagMapLookup = new TagMapLookup(DataSourceAdapter);

            tabViews.Add(CreateTabViewRecent(colConfig));
            tabViews.Add(CreateTabViewLocal(colConfig));
            tabViews.Add(CreateTabViewUntagged(colConfig));
            tabViews.Add(CreateTabViewIwad(colConfig));
            tabViews.Add(CreateTabViewIdGames(colConfig));
            tabViews.AddRange(CreateTagTabs(DefaultColumnTextFields, colConfig));

            m_tabHandler = new TabHandler(tabControl);
            m_tabHandler.SetTabs(tabViews);
        }
Beispiel #4
0
        private void SetupTabs()
        {
            List <ITabView> tabViews = new List <ITabView>();

            ColumnConfig[] colConfig = DataCache.Instance.GetColumnConfig();
            GameFileViewFactory = new GameFileViewFactory(this, AppConfiguration.GameFileViewType);
            GameFileTileManager.Instance.Init(GameFileViewFactory);

            tabViews.Add(CreateTabViewRecent(colConfig));
            tabViews.Add(CreateTabViewLocal(colConfig));
            tabViews.Add(CreateTabViewUntagged(colConfig));
            tabViews.Add(CreateTabViewIwad(colConfig));
            tabViews.Add(CreateTabViewIdGames(colConfig));
            tabViews.AddRange(CreateTagTabs(GameFileViewFactory.DefaultColumnTextFields, colConfig));

            m_tabHandler = new TabHandler(tabControl);
            m_tabHandler.SetTabs(tabViews);
        }
Beispiel #5
0
        private void SetupTabs()
        {
            List <ITabView> tabViews = new List <ITabView>();

            ColumnConfig[] colConfig = GetColumnConfig();

            TagMapLookup = new TagMapLookup(DataSourceAdapter);

            ColumnField[] columnTextFields = DefaultColumnTextFields;

            OptionsTabViewCtrl tabViewRecent = new OptionsTabViewCtrl(s_recentKey, s_recentKey, DataSourceAdapter, DefaultGameFileSelectFields, TagMapLookup);

            tabViewRecent.SetColumnConfig(columnTextFields, colConfig);
            tabViewRecent.GameFileViewControl.SetContextMenuStrip(mnuLocal);
            tabViewRecent.GameFileViewControl.AllowDrop = true;
            tabViewRecent.Options            = new GameFileGetOptions();
            tabViewRecent.Options.Limit      = 10;
            tabViewRecent.Options.OrderBy    = OrderType.Desc;
            tabViewRecent.Options.OrderField = GameFileFieldType.Downloaded;

            SetGameFileViewEvents(tabViewRecent.GameFileViewControl, true);

            tabViews.Add(tabViewRecent);

            LocalTabViewCtrl tabViewLocal = new LocalTabViewCtrl(s_localKey, s_localKey, DataSourceAdapter, DefaultGameFileSelectFields, TagMapLookup);

            tabViewLocal.SetColumnConfig(columnTextFields, colConfig);
            tabViewLocal.GameFileViewControl.SetContextMenuStrip(mnuLocal);
            tabViewLocal.GameFileViewControl.AllowDrop = true;
            SetGameFileViewEvents(tabViewLocal.GameFileViewControl, true);

            tabViews.Add(tabViewLocal);

            columnTextFields = new ColumnField[]
            {
                new ColumnField("FileName", "File"),
                new ColumnField("Title", "Title"),
                new ColumnField("LastPlayed", "Last Played")
            };

            IWadTabViewCtrl tabViewIwads = new IWadTabViewCtrl(s_iwadKey, s_iwadKey, DataSourceAdapter, DefaultGameFileSelectFields, TagMapLookup);

            tabViewIwads.SetColumnConfig(columnTextFields, colConfig);
            tabViewIwads.GameFileViewControl.SetContextMenuStrip(mnuLocal);
            tabViewIwads.GameFileViewControl.AllowDrop = true;
            SetGameFileViewEvents(tabViewIwads.GameFileViewControl, true);

            tabViews.Add(tabViewIwads);

            columnTextFields = new ColumnField[]
            {
                new ColumnField("Title", "Title"),
                new ColumnField("Author", "Author"),
                new ColumnField("Description", "Description"),
                new ColumnField("Rating", "Rating"),
            };

            IdGamesDataSourceAdapter = new IdGamesDataAdapater(AppConfiguration.IdGamesUrl, AppConfiguration.ApiPage, AppConfiguration.MirrorUrl);
            IdGamesTabViewCtrl tabViewIdGames = new IdGamesTabViewCtrl(s_idGamesKey, s_idGamesKey, IdGamesDataSourceAdapter, DefaultGameFileSelectFields);

            tabViewIdGames.SetColumnConfig(columnTextFields, colConfig);
            tabViewIdGames.GameFileViewControl.SetContextMenuStrip(mnuIdGames);
            SetGameFileViewEvents(tabViewIdGames.GameFileViewControl, false);

            tabViews.Add(tabViewIdGames);

            tabViews.AddRange(CreateTagTabs(DefaultColumnTextFields, colConfig));

            m_tabHandler = new TabHandler(tabControl);
            m_tabHandler.SetTabs(tabViews);
        }