void client1_BeschikbareLobbysCompleted(object sender, ServiceLocal.BeschikbareLobbysCompletedEventArgs e) { MessageBox.Show("De lobbys"); foreach (var item in e.Result) { lstBox.Items.Add(e.Result); } }
void client1_GooiCompleted(object sender, ServiceLocal.GooiCompletedEventArgs e) { //throw new NotImplementedException(); //Speler.Locatie = e.Result; //player.Locatie = player.Locatie + e.Result; AantalDobbelsteen.Text = e.Result.ToString(); PlaatsOpBord.Text = player.Locatie.ToString(); //player.PlaatsC = Speelbord.Plaats[player.Locatie, 0]; //player.PlaatsR = Speelbord.Plaats[player.Locatie, 1]; }
public void RunServiceWithProxy() { WebHttpBinding webBinding = new WebHttpBinding { ContentTypeMapper = new RawContentMapper(), MaxReceivedMessageSize = 4194304, MaxBufferSize = 4194304 }; string baseAddress = "http://" + Environment.MachineName + ":8000/Service/jargs"; Uri uriBase = new Uri(baseAddress); ServiceHost host = new ServiceHost(typeof(Service), uriBase); host.AddServiceEndpoint(typeof(ITest), webBinding, uriBase) .Behaviors.Add(new WebHttpJsonNetBehavior()); host.Open(); Console.WriteLine("Host opened"); ////////////////////////////////////////////// WebHttpBinding webBinding2 = new WebHttpBinding { ContentTypeMapper = new RawContentMapper(), MaxReceivedMessageSize = 4194304, MaxBufferSize = 4194304, SendTimeout = TimeSpan.FromMinutes(4) }; EndpointAddress endpoint = new EndpointAddress(baseAddress); ServiceLocal client = new ServiceLocal(webBinding2, endpoint); client.Endpoint.Behaviors.Add(new WebHttpJsonNetBehavior()); var res2 = client.saveDataGet3(new InputData { FirstName = "myname2", LastName = "mylastname2" }, "saveDataGet3"); // ok var res3 = client.saveDataGet4(new InputData { FirstName = "myname4", LastName = "mylastname4" }, "saveDataGet4"); // var res4 = client.saveDataGet6(new InputData {FirstName = "fr", LastName = "lst"}, MyEnum.second); Console.WriteLine("######### risultato ########"); //Console.WriteLine(res); Console.WriteLine(res2); Console.WriteLine(res3); Console.WriteLine(res4); Console.ReadLine(); }
void client1_InloggenCompleted(object sender, ServiceLocal.InloggenCompletedEventArgs e) { if (e.Result == null) { MessageBox.Show("Niet juist"); } else { player = e.Result; MessageBox.Show("[proficiat "); } }
void client1_GamestateCompleted(object sender, ServiceLocal.GamestateCompletedEventArgs e) { throw new NotImplementedException(); }
void client1_MaakLobbyCompleted(object sender, ServiceLocal.MaakLobbyCompletedEventArgs e) { MessageBox.Show("Lobby toegevoegd"); // client1.BeschikbareLobbysAsync(); player = e.Result; }