Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            Action <string> resultAction = s => MessageBox.Show(s);

            ComReader.Register(resultAction);
        }