Exemplo n.º 1
0
        public Form2(Object cc)
        {
            InitializeComponent();

            this.cc = cc as classControl;

            //this.WindowState = FormWindowState.Minimized;

            mouseKey = new WindowsApplication1.MouseKeyHook(true, true);
            mouseKey.mouse = true;
            mouseKey.keys = true;
            //mouseKey.keyLock = false;
            mouseKey.KeyDown += new KeyEventHandler(hook_KeyDown);
        }
Exemplo n.º 2
0
        private void ControlLine(object SocketClientPara)
        {
            Socket socketSalver = socketCol[(int)SocketClientPara];
            con = new classControl(this, socketSalver);            

            try
            {
                while (true)
                {
                    if(0 == socketSalver.Receive(commands))
                    {
                        socketSalver.Close();
                        socketCol[(int)SocketClientPara].Close();
                        threadCol[(int)SocketClientPara].Abort();
                    }

                    //Thread t = new Thread(delegate()
                    //{
                        con.beControl(commands);
                    //});
                    //t.IsBackground = true;
                    //t.Start();                    
                }
            }
            catch (System.Exception ex)
            {
                //MessageBox.Show(ex.Message);
            }
        }