示例#1
0
        public TwzCmdHandler(TwzChatRoomWrapper ptk, TwzSettings set)
        {
            Paltalk = ptk;
            Settings = set;

            admConsole = new TwzAdminConsoleWrapper(Paltalk.getRoomHwnd());
            Log = new TwzLogFile(ADMIN_CMD_LOG_FILE);
        }
        public void init(object sender, ElapsedEventArgs e)
        {
            hwdConsole = FindWindow(ADM_CONSOLE_DLG_CLASSNAME, ADM_CONSOLE_DLG_TEXT + strRoom);

            if (hwdConsole != IntPtr.Zero)
            {
                dictHandles = new Dictionary<CTLHandles, IntPtr>();
                //SetParent(hwdConsole, hwdRoom);
                MoveWindow(hwdConsole, -600, -600, 460, 470, true); //hide the console to prevent the end user from closing it.
                EnumChildWindows(hwdConsole, new EnumWin(dlgFindControls), IntPtr.Zero);
                getInstance = this;
            }

            initTimer.Stop();
            initTimer = null;
        }