public static ITimelineReceiver CreateTimelineReceiver(TimelineTypes type) { switch (type) { case TimelineTypes.Home: return new HomeTimelineReceiver(); case TimelineTypes.Mentions: return new MentionsTimelineReceiver(); case TimelineTypes.DirectMessages: return new DirectMessagesReceiver(); case TimelineTypes.Favorites: return new FavoritesTimelineReceiver(); case TimelineTypes.UserStreamEvents: return new UserStreamEventsReceiver(); default: throw new ArgumentException("対応していないタイプです。"); } }
public void Ok() { this.model.Name = this.Name; this.model.Type = this.Type; this.model.Args = this.Args; this.model.RefreshSpan = this.RefreshSpan; this.model.GetCount = this.GetCount; Settings.Instance.Save(); this.Cancel(); }