public UserLogin(BATContext context) { InitializeComponent(); this.Context = context; textBox_userName.Text = "BatMan"; textBox_userPassword.Text = "BBBB"; textBox_receiverPort.Text = "5000"; }
public Chatbox(BATContext context) : this() { this.Context = context; listOfUser = context.BatUsers.ToList(); foreach (var item in listOfUser) { Listbox_of_Users.Items.Add(item.Name); } }
//public BATServer1(BATContext context) //{ // this.context = context; //} static void Main(string[] args) { Console.WriteLine("IP: " + GetLocalIPAddress()); Context = new BATContext(); Server myServer = new Server(); Thread serverThread = new Thread(myServer.Run); serverThread.Start(); serverThread.Join(); Console.ReadKey(); }
static void Main() { //Thread servThread = new Thread(StartServer); //servThread.Start(); BATContext context = new BATContext(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new UserLogin(context)); //Application.Run(new Chatbox(context)); //servThread.Join(); }
public Chatbox(BATContext context, TcpClient client, string user, List <string> daList) { InitializeComponent(); CheckForIllegalCrossThreadCalls = false; Listbox_of_Users.DataSource = daList; this.whichUser = user; this.Context = context; this.client = client; Thread batListener = new Thread(Listen); batListener.Start(); }
public Chatbox(BATContext context, TcpClient client) : this() { this.Context = context; this.client = client; }