Example #1
0
        public ChatRoom(ISingleServer server, String username, String port)
        {
            InitializeComponent();
            this.server      = server;
            this.username    = username;
            this.address     = "tcp://localhost:" + port.ToString() + "/Message";
            this.Text        = " Chat - " + username;
            onlineUsers.View = View.List;
            groupChats.View  = View.List;
            activeUsers      = new Hashtable();
            chatTabs         = new Hashtable();
            groupChatsList   = new List <string>();
            UpdateOnlineUsers();
            UpdateGroupChats();
            evRepeater             = new AlterEventRepeater();
            evRepeater.alterEvent += new AlterDelegate(DoAlterations);
            server.alterEvent     += new AlterDelegate(evRepeater.Repeater);
            r = (RemMessage)RemotingServices.Connect(typeof(RemMessage), "tcp://localhost:" + port.ToString() + "/Message");    // connect to the registered my remote object here
            r.PutMyForm(this);
            groupChatActive = false;

            selectedGroup     = null;
            inviteToGroupChat = false;
        }
Example #2
0
 public Request(ISingleServer server, String username, String tabUsername)
 {
     this.server      = server;
     this.username    = username;
     this.tabUsername = tabUsername;
 }
Example #3
0
 private void Window_Load_1(object sender, EventArgs e)
 {
     server = (ISingleServer)R.New(typeof(ISingleServer));  // get reference to the singleton remote object
 }