Ejemplo n.º 1
0
        private void connBt_Click(object sender, RoutedEventArgs e)
        {
            string endpoint = serverTbx.Text;

            if (options.GetEndpoints() != null)
            {
                options.GetEndpoints().Clear();
            }
            if (!string.IsNullOrEmpty(endpoint))
            {
                JArray ja = new JArray();
                ja.Add(endpoint);
                options.SetEndpoints(ja);
            }
            //options.AuthCb = new AuthenticationCallback(
            //   (username, Login) =>
            //   {
            //       Debug.WriteLine("AuthenticationCallback called!");
            //       Login(username, "u1");
            //   }
            //   );

            client.Connect(usernamTbx.Text, passwordTbx.Text, options);
        }