static void Main(string[] args) { Action <string> foundAction = s => { //var client = new RestClient("https://www.size.com"); //var request = new RestRequest("/doorbell.asp", Method.POST); //client.Proxy = new WebProxy("proxy..."); //client.Execute(request); System.Console.WriteLine(s); }; ComReader.Register(foundAction); System.Console.ReadLine(); }
protected override void OnStart(string[] args) { EventLog.WriteEntry("Knocker Service Starting..."); Action <string> foundAction = s => { EventLog.WriteEntry(s); // launch the application ApplicationLoader.PROCESS_INFORMATION procInfo; ApplicationLoader.StartProcessAndBypassUAC(@"C:\Services\Tallon.Knocker.Notification.exe", out procInfo); //var client = new RestClient("https://www.size.com"); //var request = new RestRequest("/doorbell.asp", Method.POST); //client.Proxy = new WebProxy("proxy..."); //client.Execute(request); }; ComReader.Register(foundAction); }
private void MainForm_Load(object sender, EventArgs e) { Action <string> resultAction = s => MessageBox.Show(s); ComReader.Register(resultAction); }