Remove putpixel from strechblt and add code to write direcly to the memory. it incres...
[reactos.git] / irc / TechBot / TechBot / ServiceThread.cs
1 using System;
2 using System.Configuration;
3 using System.Diagnostics;
4 using TechBot.Library;
5
6 namespace TechBot
7 {
8 public class ServiceThread
9 {
10 private string IRCServerHostName;
11 private int IRCServerHostPort;
12 private string IRCChannelNames;
13 private string IRCBotName;
14 private string ChmPath;
15 private string MainChm;
16 private string NtstatusXml;
17 private string HresultXml;
18 private string WmXml;
19 private string WinerrorXml;
20 private string SvnCommand;
21 private string BugUrl;
22 private EventLog eventLog;
23
24 public ServiceThread(EventLog eventLog)
25 {
26 this.eventLog = eventLog;
27 }
28
29 private void SetupConfiguration()
30 {
31 IRCServerHostName = ConfigurationSettings.AppSettings["IRCServerHostName"];
32 IRCServerHostPort = Int32.Parse(ConfigurationSettings.AppSettings["IRCServerHostPort"]);
33 IRCChannelNames = ConfigurationSettings.AppSettings["IRCChannelNames"];
34 IRCBotName = ConfigurationSettings.AppSettings["IRCBotName"];
35 ChmPath = ConfigurationSettings.AppSettings["ChmPath"];
36 MainChm = ConfigurationSettings.AppSettings["MainChm"];
37 NtstatusXml = ConfigurationSettings.AppSettings["NtstatusXml"];
38 HresultXml = ConfigurationSettings.AppSettings["HresultXml"];
39 WmXml = ConfigurationSettings.AppSettings["WmXml"];
40 WinerrorXml = ConfigurationSettings.AppSettings["WinerrorXml"];
41 SvnCommand = ConfigurationSettings.AppSettings["SvnCommand"];
42 BugUrl = ConfigurationSettings.AppSettings["BugUrl"];
43 }
44
45 public void Run()
46 {
47 SetupConfiguration();
48 System.Console.WriteLine("TechBot irc service...");
49
50 IrcService ircService = new IrcService(IRCServerHostName,
51 IRCServerHostPort,
52 IRCChannelNames,
53 IRCBotName,
54 ChmPath,
55 MainChm,
56 NtstatusXml,
57 WinerrorXml,
58 HresultXml,
59 WmXml,
60 SvnCommand,
61 BugUrl);
62 ircService.Run();
63 }
64
65 public void Start()
66 {
67 try
68 {
69 Run();
70 }
71 catch (Exception ex)
72 {
73 eventLog.WriteEntry(String.Format("Ex. {0}", ex));
74 }
75 }
76 }
77 }