static void Main() { // Display the number of command line arguments: Debug CollabrifyClient c = new CollabrifyClient("*****@*****.**", "JACK AND JILL", "*****@*****.**", "82763BDBCA", true); List <string> l = new List <string>(); l.Add("[none]"); c.listSessions(l); }
private void Button1_Click(object sender, RoutedEventArgs e) { if (RequestType.Name == "JoinSession") { //ResponseTextBlock.Text = "Warmup"; c.joinSession(Convert.ToInt64(textfield.Text), "", delegate { }); } else if (RequestType.Name == "CreateSession") { //ResponseTextBlock.Text = "Create Session"; List <string> tags = new List <string>(); tags.Add("[none]"); Random rd = new Random(); c.createSession(rd.Next(1, 9999999).ToString(), tags, "", false, delegate { Deployment.Current.Dispatcher.BeginInvoke(delegate { textfield.Text = c.getSession().getId().ToString(); }); }); } else if (RequestType.Name == "ListSessions") { List <string> l = new List <string>(); l.Add("TagTesting"); c.listSessions(l, delegate { }); } else if (RequestType.Name == "LeaveSession") { c.leaveSession(true, delegate {}); } else if (RequestType.Name == "Broadcast") { MemoryStream ms = new MemoryStream(); Serializer.SerializeWithLengthPrefix <string>(ms, textfield.Text, PrefixStyle.Base128); byte[] byteArray = ms.ToArray(); c.broadcast(byteArray, "coolEvent"); } else { Debug.WriteLine(RequestType.Name); } }