public MainWindow()
        {
            InitializeComponent();

            ptsc = new PolytweetServiceClient.PolytweetServiceClient();
            user = ptsc.connect("bobo", "pass");
            ptsc.initTestContext();
            channelCollection = new ChannelCollection();
            //channelCollection.Add(new ChannelObject(ptsc.findChannel("name")[0]));
            channelCollection = new ChannelCollection(ptsc.getAllChannel());
            channelCollectionEmpty = new ChannelCollection();

            ObjectDataProvider channelSource = (ObjectDataProvider)FindResource("ChannelCollection");
            channelSource.ObjectInstance = channelCollection;
            ObjectDataProvider channelSourceEmpty = (ObjectDataProvider)FindResource("ChannelCollectionEmpty");
            channelSourceEmpty.ObjectInstance = channelCollectionEmpty;

            foreach(ChannelObject c in channelCollection)
            {
                cbx_choixChannel.Items.Add(c);
            }
        }
 private void Bt_Connect_Click(object sender, RoutedEventArgs e)
 {
     this.user = ((PolytweetServiceClient.IPolytweetService)ptsc).connect(tb_userName.Text, pwd_user.Password);
     if (user != null)
     {
         tbk_changeUser.Text = "Changer d'utilisateur (" + user.login + ")";
     }
     else
     {
         tbk_changeUser.Text = "Utilisateur " + tb_userName.Text+ " inconnu et/ou mot de passe incorrect !";
     }
     tb_userName.Clear();
     pwd_user.Clear();
 }