コード例 #1
0
        private void Lookup()
        {
            if (this.InvokeRequired)
            {
                BeginInvoke(new LookupDelegate(Lookup),
                            new object[] { });
                return;
            }

            TcpIpCommand command = commandCenter.Parse(comboCommand.Text);

            if (command != null)
            {
                if (commandCenter.TcpIpCommand == null || command.Name.Equals(commandCenter.TcpIpCommand.Name) == false)
                {
                    commandCenter.TcpIpCommand = command;
                }
            }
            else
            {
                commandCenter.TcpIpCommand = null;
            }
        }
コード例 #2
0
        /*
         * private const int EM_CHARFROMPOS = 0x00D7;
         * [StructLayout(LayoutKind.Sequential)]
         * public struct POINT
         * {
         *  public System.Int32 x;
         *  public System.Int32 y;
         * }
         * [DllImport("user32.Dll", CharSet = CharSet.Auto)]
         * private static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wParam, POINT lParam);
         * [DllImport("user32.Dll", CharSet = CharSet.Auto)]
         * private static extern IntPtr FindWindowEx(IntPtr hWnd1, IntPtr hWnd2, string lpsz1, string lpsz2);
         */
        #endregion

        #region EVENT HANDLERS (Command Line)
        private void comboCommand_TextChanged(object sender, System.EventArgs e)
        {
            if (ignoreLookup == false)
            {
                TcpIpCommand command = commandCenter.Parse(comboCommand.Text);
                if (command != null)
                {
                    if (commandCenter.TcpIpCommand == null || command.Name.Equals(commandCenter.TcpIpCommand.Name) == false)
                    {
                        commandCenter.TcpIpCommand = command;
                    }
                }
                else
                {
                    commandCenter.TcpIpCommand = null;
                }
            }


            if (OnCommandChanged != null && OnCommandChanged.GetInvocationList() != null)
            {
                OnCommandChanged(sender, comboCommand.Text);
            }
        }