public ViewDataEntryFishCompletionist( IProtoEntity prototype, ActionCommandWithParameter commandClaimReward) : base(prototype, commandClaimReward) { }
internal ViewDataEntryCompletionist( IProtoEntity prototype, ActionCommandWithParameter commandClaimReward) { this.Prototype = prototype; this.CommandClaimReward = commandClaimReward; this.State = ViewModelWindowCompletionist.CompletionistEntryState.Undiscovered; this.RefreshIconTexture(); }
private ViewModelWindowCompletionist() { var commandClaimReward = new ActionCommandWithParameter( proto => CompletionistSystem.ClientClaimReward((IProtoEntity)proto)); allFoodEntries ??= CompletionistSystem.CompletionistAllFood.ToDictionary( proto => (IProtoEntity)proto, proto => new ViewDataEntryCompletionist(proto, commandClaimReward)); allMobEntries ??= CompletionistSystem.CompletionistAllMobs.ToDictionary( proto => (IProtoEntity)proto, proto => new ViewDataEntryCompletionist(proto, commandClaimReward)); allLootEntries ??= CompletionistSystem.CompletionistAllLoot.ToDictionary( proto => (IProtoEntity)proto, proto => new ViewDataEntryCompletionist(proto, commandClaimReward)); allFishEntries ??= CompletionistSystem.CompletionistAllFish.ToDictionary( proto => (IProtoEntity)proto, proto => new ViewDataEntryFishCompletionist(proto, commandClaimReward)); this.EntriesFood = new ViewModelCompletionistPageDefault( allFoodEntries, columnsCount: 4, iconSize: 74, entriesPendingCountChanged: this.EntriesPendingCountChangedHandler); this.EntriesMobs = new ViewModelCompletionistPageDefault( allMobEntries, columnsCount: 3, iconSize: 111, entriesPendingCountChanged: this.EntriesPendingCountChangedHandler); this.EntriesLoot = new ViewModelCompletionistPageDefault( allLootEntries, columnsCount: 3, iconSize: 111, entriesPendingCountChanged: this.EntriesPendingCountChangedHandler); this.EntriesFish = new ViewModelCompletionistPageFish( allFishEntries, columnsCount: 3, iconSize: 111, entriesPendingCountChanged: this.EntriesPendingCountChangedHandler); BootstrapperClientGame.InitCallback += this.BootstrapperClientGameInitCallbackHandler; this.RefreshLists(); }
public MultiplayerMenuServersController( IServersListProvider serversListProvider, ServerViewModelsProvider serverViewModelsProvider) : base(serverViewModelsProvider) { this.CommandEdit = new ActionCommandWithParameter( server => this.ExecuteCommandEdit((ViewModelServerInfo)server)); this.CommandRemove = new ActionCommandWithParameter( server => this.ExecuteCommandRemove((ViewModelServerInfo)server)); this.serversListProvider = serversListProvider; this.serversListProvider.Updated += this.ListUpdatedHandler; }
public ViewModelServerInfo( ServerAddress address, bool isFavorite, ActionCommandWithParameter commandFavoriteToggle, ActionCommandWithParameter commandDisplayModsInfo, BaseCommand commandJoinServer) : base(isAutoDisposeFields: false) { this.IsFavorite = isFavorite; this.CommandFavoriteToggle = commandFavoriteToggle; this.CommandDisplayModsInfo = commandDisplayModsInfo; this.CommandJoinServer = commandJoinServer; this.address = address; this.Reset(); }
protected override void InitControl() { var emojiButtonStyle = this.GetResource <Style>("EmojiButtonStyle"); var gridEmojis = this.GetByName <Panel>("GridEmojis"); var children = gridEmojis.Children; var commandSelectEmoji = new ActionCommandWithParameter(this.ExecuteCommandSelectEmoji); foreach (var emojiData in EmojiSystem.EmojiCategories[0].Emojis) { children.Add(new Button() { Command = commandSelectEmoji, CommandParameter = emojiData.UnicodeId, Content = emojiData.UnicodeId, Style = emojiButtonStyle }); } this.popup = this.GetByName <Popup>("PopupControl"); this.popup.IsOpen = true; this.popup.SetValue(Popup.PlacementTargetProperty, this.placementTarget); }