parent
f97220d7c2
commit
a635ecbdce
@ -0,0 +1,25 @@ |
|||||||
|
namespace Client |
||||||
|
{ |
||||||
|
public partial class LoginForm : Form |
||||||
|
{ |
||||||
|
public LoginForm() |
||||||
|
{ |
||||||
|
InitializeComponent(); |
||||||
|
} |
||||||
|
|
||||||
|
private void btnLogin_Click(object sender, EventArgs e) |
||||||
|
{ |
||||||
|
if (string.IsNullOrEmpty(tbxId.Text) || string.IsNullOrEmpty(tbxNickname.Text)) |
||||||
|
{ |
||||||
|
MessageBox.Show("Please input ID and Nickname."); |
||||||
|
return; |
||||||
|
} |
||||||
|
|
||||||
|
Singleton.Instance.Id = tbxId.Text; |
||||||
|
Singleton.Instance.Nickname = tbxNickname.Text; |
||||||
|
|
||||||
|
RoomListForm roomListForm = new RoomListForm(); |
||||||
|
roomListForm.ShowDialog(); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,17 @@ |
|||||||
|
namespace Client |
||||||
|
{ |
||||||
|
internal static class Program |
||||||
|
{ |
||||||
|
/// <summary> |
||||||
|
/// The main entry point for the application. |
||||||
|
/// </summary> |
||||||
|
[STAThread] |
||||||
|
static void Main() |
||||||
|
{ |
||||||
|
// To customize application configuration such as set high DPI settings or default font, |
||||||
|
// see https://aka.ms/applicationconfiguration. |
||||||
|
ApplicationConfiguration.Initialize(); |
||||||
|
Application.Run(new LoginForm()); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue