コード例 #1
0
ファイル: Program.cs プロジェクト: pandeyrishi/openrpa
        static void Main(string[] args)
        {
            try
            {
                form = new MainWindow();
                var SessionId = System.Diagnostics.Process.GetCurrentProcess().SessionId;
                pipe = new NamedPipeServer <JavaEvent>(SessionId + "_openrpa_javabridge");
                pipe.ClientMessage += Server_OnReceivedMessage;
                pipe.Start();

                hook = new JavaHook();
                hook.OnJavaShutDown += OnJavaShutDown;
                hook.OnMouseClicked += OnMouseClicked;
                hook.OnMouseEntered += OnMouseEntered;
                hook.OnMouseExited  += OnMouseExited;

                hook.OnMousePressed  += OnMousePressed;
                hook.OnMouseReleased += OnMouseReleased;

                System.Windows.Forms.Application.Run(form);
            }
            catch (Exception ex)
            {
                log(ex.ToString());
            }
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: sanser/carbuy
        static void Main(string[] args)
        {
            try
            {
                form = new MainWindow();
                pipe = new NamedPipeServer <JavaEvent>("openrpa_javabridge");
                pipe.ClientMessage += Server_OnReceivedMessage;
                pipe.Start();

                hook = new JavaHook();
                hook.OnJavaShutDown += OnJavaShutDown;
                hook.OnMouseClicked += OnMouseClicked;
                hook.OnMouseEntered += OnMouseEntered;
                hook.OnMouseExited  += OnMouseExited;

                hook.OnMousePressed  += OnMousePressed;
                hook.OnMouseReleased += OnMouseReleased;

                System.Windows.Forms.Application.Run(form);
            }
            catch (Exception ex)
            {
                System.IO.File.AppendAllText("log.txt", ex.ToString());
                throw;
            }
        }
コード例 #3
0
        static void Main(string[] args)
        {
            form = new MainWindow();
            pipe = new NamedPipeServer <JavaEvent>("openrpa_javabridge");
            pipe.ClientMessage += Server_OnReceivedMessage;
            pipe.Start();

            hook = new JavaHook();
            hook.OnJavaShutDown += OnJavaShutDown;
            hook.OnMouseClicked += OnMouseClicked;
            hook.OnMouseEntered += OnMouseEntered;
            hook.OnMouseExited  += OnMouseExited;

            hook.OnMousePressed  += OnMousePressed;
            hook.OnMouseReleased += OnMouseReleased;

            System.Windows.Forms.Application.Run(form);
        }