예제 #1
0
        public ChatWindow(ChatClientCtrl ctrl)
        {
            InitializeComponent();
            this.ctrl             = ctrl;
            friendsData           = ctrl.getLoggedFriends();
            messageData           = new List <string>();
            friendList.DataSource = friendsData;

            messageList.DataSource = messageData;
            ctrl.updateEvent      += userUpdate;
        }
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);


            //IChatServer server=new ChatServerMock();
            IChatServer    server = new ChatServerProxy("127.0.0.1", 55555);
            ChatClientCtrl ctrl   = new ChatClientCtrl(server);
            LoginWindow    win    = new LoginWindow(ctrl);

            Application.Run(win);
        }
예제 #3
0
 public LoginWindow(ChatClientCtrl ctrl)
 {
     InitializeComponent();
     this.ctrl = ctrl;
 }