| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 
 |  public partial class Gestion_des_lumières : Page
    {    
        Socket _scl = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
 
        public Gestion_des_lumières()
        {
            InitializeComponent();
 
            _scl.Connect(IPAddress.Parse("192.168.1.177"), 1337);                
        }
 
        private void button11_Click(object sender, RoutedEventArgs e)
        {
            Page1 precedent = new Page1();
            this.NavigationService.Navigate(precedent);             
        }
 
        private void button12_Click(object sender, RoutedEventArgs e)
        {
            Programmation prog = new Programmation();
            this.NavigationService.Navigate(prog);
        }
 
        private void button1_Click_1(object sender, RoutedEventArgs e)
        {
 
            byte [] Message = System.Text.Encoding.ASCII.GetBytes ("1");
 
            int OctetsEnvoyes = _scl.Send (Message,0, Message.Length,SocketFlags.None);
        }
    }
} | 
Partager