30 lines
779 B
C#
30 lines
779 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Windows.Forms;
|
|
|
|
namespace GamerServices {
|
|
public partial class FormAddFriend : Form {
|
|
private FormMain Main;
|
|
|
|
public FormAddFriend(FormMain main) {
|
|
Main = main;
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void button1_Click(object sender, EventArgs e) {
|
|
if (textBox1.Text.Length == 0)
|
|
return;
|
|
|
|
if (Main.GetFriend(textBox1.Text) == null) {
|
|
Main.Networker.Connection.Send(7, textBox1.Text.Length + 5, textBox1.Text);
|
|
Close();
|
|
}
|
|
}
|
|
}
|
|
}
|