2019-02-18 20:30:38 -05:00
|
|
|
|
using SharedLibraryCore;
|
|
|
|
|
using SharedLibraryCore.Interfaces;
|
|
|
|
|
|
|
|
|
|
namespace AutomessageFeed
|
|
|
|
|
{
|
|
|
|
|
class Configuration : IBaseConfiguration
|
|
|
|
|
{
|
|
|
|
|
public bool EnableFeed { get; set; }
|
|
|
|
|
public string FeedUrl { get; set; }
|
2019-02-22 20:06:51 -05:00
|
|
|
|
public int MaxFeedItems { get; set; }
|
2019-02-18 20:30:38 -05:00
|
|
|
|
|
|
|
|
|
public IBaseConfiguration Generate()
|
|
|
|
|
{
|
|
|
|
|
EnableFeed = Utilities.PromptBool(Utilities.CurrentLocalization.LocalizationIndex["PLUGINS_AUTOMESSAGEFEED_PROMPT_ENABLE"]);
|
2019-02-19 20:39:09 -05:00
|
|
|
|
|
|
|
|
|
if (EnableFeed)
|
|
|
|
|
{
|
|
|
|
|
FeedUrl = Utilities.PromptString(Utilities.CurrentLocalization.LocalizationIndex["PLUGINS_AUTOMESSAGEFEED_URL"]);
|
2019-02-22 20:06:51 -05:00
|
|
|
|
MaxFeedItems = Utilities.PromptInt(Utilities.CurrentLocalization.LocalizationIndex["PLUGINS_AUTOMESSAGEFEED_PROMPT_MAXITEMS"],
|
|
|
|
|
Utilities.CurrentLocalization.LocalizationIndex["PLUGINS_AUTOMESSAGEFEED_PROMPT_MAXITEMS_DESC"],
|
|
|
|
|
0, int.MaxValue, 0);
|
2019-02-19 20:39:09 -05:00
|
|
|
|
}
|
2019-02-18 20:30:38 -05:00
|
|
|
|
|
|
|
|
|
return this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Name() => "AutomessageFeedConfiguration";
|
|
|
|
|
}
|
|
|
|
|
}
|