client base

This commit is contained in:
2023-02-08 16:31:22 +09:00
parent f97220d7c2
commit a635ecbdce
13 changed files with 676 additions and 3 deletions

View File

@@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Client
{
public partial class ChatRoomForm : Form
{
public ChatRoomForm()
{
InitializeComponent();
}
private void btmSend_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(tbxMsg.Text))
return;
lbxMsg.Items.Add(tbxMsg.Text);
tbxMsg.Text = null;
ScrollMsgToEnd();
}
private void ScrollMsgToEnd()
{
lbxMsg.SelectedIndex = lbxMsg.Items.Count - 1;
lbxMsg.SelectedIndex = -1;
}
}
}