private void GuestForm_Load(object sender, EventArgs e) { this.btnJoinParty.Enabled = false; this.btnLeaveParty.Enabled = false; this.btnBeerRun.Enabled = false; this.btnDrinkBeer.Enabled = false; this.txtGuestName.TextChanged += new EventHandler(txtGuestName_TextChanged); this.FormClosing += new FormClosingEventHandler(GuestForm_FormClosing); // Capture the UI synchronization context _uiSyncContext = SynchronizationContext.Current; // The client callback interface must be hosted for the server to invoke the callback // Open a connection to the beer inventory service via the proxy _beerInventoryService = new BeerInventoryServiceClient(new InstanceContext(this), "TcpBinding"); _beerInventoryService.Open(); }
private void GuestForm_Load(object sender, EventArgs e) { this.btnJoinParty.Enabled = false; this.btnLeaveParty.Enabled = false; this.btnBeerRun.Enabled = false; this.btnDrinkBeer.Enabled = false; this.txtGuestName.TextChanged += new EventHandler(txtGuestName_TextChanged); this.FormClosing += new FormClosingEventHandler(GuestForm_FormClosing); // Capture the UI synchronization context _uiSyncContext = SynchronizationContext.Current; // The client callback interface must be hosted for the server to invoke the callback // Open a connection to the beer inventory service via the proxy _beerInventoryService = new BeerInventoryServiceClient(new InstanceContext(this), "TcpBinding"); _beerInventoryService.Open(); }