/// <summary> /// The main entry point for the application. /// </summary> static void Main() { bool RunAsService = GetBoolSetting("RunAsService", true); if (RunAsService) { ServiceBase[] ServicesToRun; ServicesToRun = new ServiceBase[] { new Service() }; ServiceBase.Run(ServicesToRun); } else { SuperFriendBot bot = new SuperFriendBot(); bot.Start(); AllocConsole(); string result = Console.ReadLine(); while(result != "q") { result = Console.ReadLine(); } } }
public Service() { InitializeComponent(); _bot = new SuperFriendBot(); }