public FormSelectionAventure(FormMain fMain)
 {
     Connected = false;
     Sender = null;
     this.fMain = fMain;
     InitializeComponent();
     List<Livre> l = ChargerLivres();
     SauverLivres(l);
     dgvLivres.DataSource = l;
 }
Пример #2
0
        public void Connect(string AdesseIP, FormMain f)
        {
            if (Client == null)
            {
                string adresseIP = "";
                if (AdesseIP.Contains(":"))
                    adresseIP = AdesseIP.Split(new char[] { ':' })[0];
                else adresseIP = AdesseIP;

                Client = new TcpClient(adresseIP, 9050); // int.Parse(s[1]) have my connection established with a Tcp Server

                DataReciever r = new DataReciever(Client, f);
                r.StartThread();
            }

            Formatter = new BinaryFormatter(); // the formatter that will serialize my object on my stream
            Stream = Client.GetStream(); // the stream
        }
 public FormRejoindreAventure(Joueur moi, FormMain f)
 {
     this.moi = moi;
     this.f = f;
     InitializeComponent();
 }
Пример #4
0
 public DataReciever(TcpClient client, FormMain f)
 {
     this.Client = client;
     this.f = f;
 }