public DefaultChatCollectServiceViewModel(IList <Model.ChatCollectServiceEntry.IChatCollectServiceEntry> enableChatCollectServiceEntry, Model.ChatCollectServiceEntry.IChatCollectServiceEntry serviceEntry, bool isEnabled) { this.isEnabled = isEnabled; this.enabledServiceEntries = enableChatCollectServiceEntry; this.ServiceEntry = serviceEntry; update(); }
public ChatCollectServiceAddListItemViewModel(Model.ChatCollectServiceEntry.IChatCollectServiceEntry serviceEntry, Model.ChatCollectServiceCreationPreset preset) { if (preset != null && serviceEntry != preset.ServiceEntry) { throw new ArgumentException($"{preset}.{preset.ServiceEntry} must be same as {serviceEntry}"); } IsPreset = preset != null; if (!IsPreset) { Title = serviceEntry.Name; Subtitle = serviceEntry.Description; } else { Title = preset.Name; Subtitle = serviceEntry.Name; } ServiceEntry = serviceEntry; Preset = preset; }
private void model_ErrorOccurredAtChatCollectServiceCreation(Model.ChatCollectServiceEntry.IChatCollectServiceEntry serviceEntry, string errorText) { AlertRequest.Raise(new Notification { Title = "TVTCommentエラー", Content = $"コメント元、\"{serviceEntry.Name}\"を有効にしようとしたとき以下のエラーが発生し、有効化できませんでした。\n\n{errorText}" }); }