Пример #1
0
        static void Main()
        {
            var chatApplicationMain = new ChatApplicationMain();

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new LoginForm(chatApplicationMain));
        }
Пример #2
0
        public ChatForm(ChatApplicationMain chatApplication, IEnumerable <string> users, string username)
        {
            Show();

            this.username        = username;
            this.chatApplication = chatApplication;
            InitializeComponent();
            txtInput.KeyDown += txtInput_KeyDown;

            foreach (var user in users)
            {
                if (user == username)
                {
                    continue;
                }
                AddUserToList(user);
            }

            txtRecipient.Text = Configuration.BROADCAST_CHANNELNAME;
            Text += ": " + this.username;
            Update();
        }