public DesignTimeModLibraryViewModel() { var game = new Arma1Game(Guid.NewGuid(), new GameSettingsController()); var collectionGroup = new ModLibraryGroupViewModel(this, "Collections", icon: SixIconFont.withSIX_icon_Folder); var collections = new CustomCollectionLibraryItemViewModel(this, new CustomCollection(Guid.NewGuid(), game) {Name = "Test ModSet"}, collectionGroup); var subscribedCollections = new SubscribedCollectionLibraryItemViewModel(this, new SubscribedCollection(Guid.NewGuid(), Guid.NewGuid(), game) {Name = "Test ModSet3"}, collectionGroup); var mod = new Mod(Guid.Empty) { Name = "@TESTMOD", FullName = "Da Full name fewafefiejaofijeafoijeafo ieafioj eaoi", Author = "The Author", Version = "1.2.0" }; collections.Items.Add(new CustomCollection(Guid.NewGuid(), game) { Name = "Some ModSet wuith faopek faof aepokf poaefpokpof eaf", Author = "Some author", Version = "1.0.2" }); collections.Items.Add(mod); collections.SelectedItem = mod; // TODO //CreateItemsView( // new ReactiveList<ContentLibraryItem>(new[] // {subscribedCollections, sharedCollections, localCollections}), new LibraryGroup[0]); SelectedItem = collections; }
public ModLibrarySetup(ModLibraryViewModel library, Game game, IContentManager contentList, UserSettings settings, IEventAggregator eventBus) { if (!(game.SupportsMods())) { throw new ArgumentException("game.SupportsMods()"); } _library = library; _game = game; _modding = game.Modding(); _settings = settings; _eventBus = eventBus; _contentList = contentList; OnlineGroup = new ModLibraryGroupViewModel(library, "Repositories", "add repo", SixIconFont.withSIX_icon_Cloud) { IsRoot = true, SortOrder = 13 }; LocalGroup = new ModLibraryGroupViewModel(library, "Local", "add folder", SixIconFont.withSIX_icon_System) { IsRoot = true, SortOrder = 12 }; CollectionsGroup = new ModLibraryGroupViewModel(library, "Collections", "new collection", SixIconFont.withSIX_icon_Folder) { IsRoot = true, SortOrder = 11 }; BuiltInGroup = new ModLibraryGroupViewModel(library, null) { IsRoot = true, SortOrder = 0 }; Groups = new LibraryGroupViewModel <ModLibraryViewModel>[] { null, BuiltInGroup, CollectionsGroup, LocalGroup, OnlineGroup }; _aIa = new BrowseContentLibraryItemViewModel <BuiltInContentContainer>(library, new BuiltInContentContainer("AllInArma"), @group: LocalGroup, isFeatured: true); SetupItems(); Items.AddRange(Groups.Where(x => x != null && x != BuiltInGroup)); CreateItemsView(); _eventBus.Subscribe(this); }
public DesignTimeModLibraryViewModel() { var game = new Arma1Game(Guid.NewGuid(), new GameSettingsController()); var collectionGroup = new ModLibraryGroupViewModel(this, "Collections", icon: SixIconFont.withSIX_icon_Folder); var collections = new CustomCollectionLibraryItemViewModel(this, new CustomCollection(Guid.NewGuid(), game) { Name = "Test ModSet" }, collectionGroup); var subscribedCollections = new SubscribedCollectionLibraryItemViewModel(this, new SubscribedCollection(Guid.NewGuid(), Guid.NewGuid(), game) { Name = "Test ModSet3" }, collectionGroup); var mod = new Mod(Guid.Empty) { Name = "@TESTMOD", FullName = "Da Full name fewafefiejaofijeafoijeafo ieafioj eaoi", Author = "The Author", Version = "1.2.0" }; collections.Items.Add(new CustomCollection(Guid.NewGuid(), game) { Name = "Some ModSet wuith faopek faof aepokf poaefpokpof eaf", Author = "Some author", Version = "1.0.2" }); collections.Items.Add(mod); collections.SelectedItem = mod; // TODO //CreateItemsView( // new ReactiveList<ContentLibraryItem>(new[] // {subscribedCollections, sharedCollections, localCollections}), new LibraryGroup[0]); SelectedItem = collections; }