Ejemplo n.º 1
0
 public UserLogin(BATContext context)
 {
     InitializeComponent();
     this.Context              = context;
     textBox_userName.Text     = "BatMan";
     textBox_userPassword.Text = "BBBB";
     textBox_receiverPort.Text = "5000";
 }
Ejemplo n.º 2
0
 public Chatbox(BATContext context) : this()
 {
     this.Context = context;
     listOfUser   = context.BatUsers.ToList();
     foreach (var item in listOfUser)
     {
         Listbox_of_Users.Items.Add(item.Name);
     }
 }
Ejemplo n.º 3
0
        //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();
        }
Ejemplo n.º 4
0
        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();
        }
Ejemplo n.º 5
0
        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();
        }
Ejemplo n.º 6
0
 public Chatbox(BATContext context, TcpClient client) : this()
 {
     this.Context = context;
     this.client  = client;
 }