/// <summary>
        /// Authorizes a card key
        /// </summary>
        private void AuthorizeCard()
        {
            var proxy = new ServiceClient();
            try
            {
                proxy.OpenDoorCompleted += this.OnOpenDoorCompleted;
                proxy.OpenDoorAsync(
                    new OpenDoor
                        {
                           CardKey = Guid.Parse(this.textKey.Text), RoomNumber = Int32.Parse(this.textRoom.Text)
                        });

                proxy.Close();
            }
            catch (Exception ex)
            {
                proxy.Abort();
                MessageBox.Show("Unable to authorize card " + ex.Message);
            }
        }