📄 chatroomcallbacki.cs
字号:
// **********************************************************************
//
// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved.
//
// This copy of Chat Demo is licensed to you under the terms
// described in the CHAT_DEMO_LICENSE file included in this// distribution.
//
// **********************************************************************
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ChatDemoGUI
{
//
//
// Implementation of the ChatRoomCallback servant.
//
// The implentation delegate to the methods of the Coordinator object
// to communicate with the UI.
//
public class ChatRoomCallbackI : Chat.ChatRoomCallbackDisp_
{
public ChatRoomCallbackI(Coordinator coordinator)
{
_coordinator = coordinator;
}
public override void init(string[] users, Ice.Current currrent)
{
_coordinator.initEvent(users);
}
public override void send(long timestamp, string name, string message, Ice.Current current)
{
if(!name.Equals(_coordinator.getUsername(), StringComparison.CurrentCultureIgnoreCase))
{
_coordinator.userSayEvent(timestamp, name, message);
}
}
public override void join(long timestamp, string name, Ice.Current current)
{
_coordinator.userJoinEvent(timestamp, name);
}
public override void leave(long timestamp, string name, Ice.Current current)
{
_coordinator.userLeaveEvent(timestamp, name);
}
private Coordinator _coordinator;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -