protected void Page_PreRender(object sender, EventArgs e)
        {
            UcTextChatController textChatController = (UcTextChatController)Application["UcTextChatController"];

            ChatDS.ChatDSDataTable dt = textChatController.GetMessages(confSessionId, rowsToShow);

            DataRow[] rows = dt.Select("", "chat_id");

            rptTextChat.DataSource = rows;
            rptTextChat.DataBind();
        }
        protected void btnSend_Click(object sender, EventArgs e)
        {
            UcTextChatController textChatController = (UcTextChatController)Application["UcTextChatController"];
            UcTextChatMessage    message            = new UcTextChatMessage(confSessionUser, txtMessage.Text.Trim());

            if (message.MessageText != "")
            {
                textChatController.SendMessage(confSessionId, message);
            }

            txtMessage.Text = "";
            txtMessage.Focus();

            upMessageBox.Update();
        }
コード例 #3
0
        protected void Application_Start(object sender, EventArgs e)
        {
            UcGlobalHelper.UcApplicationStart(Application);
            //-----------------------------------------------------------


            UcTextChatController textChatController = new UcTextChatController();

            Application.Add("UcTextChatController", textChatController);

            AgentPool agentPool = new AgentPool();

            Application.Add("AgentPool", agentPool);

            UcAppBot appBot = new UcAppBot(agentPool);

            Application.Add("appBot", appBot);
        }
コード例 #4
0
        protected void Application_Start(object sender, EventArgs e)
        {
            UserPool userPool = new UserPool();

            Application.Add("UserPool", userPool);

            ////delegate botDelegate = new ( w TimerCallback(bot.doit());

            //Thread _bot = new Thread();
            //Application.Add("bot", _bot);
            //_bot.Start();


            SosBot bot = new SosBot(userPool);

            Application.Add("bot", bot);



            UcTextChatController textChatController = new UcTextChatController();

            Application.Add("UcTextChatController", textChatController);
        }