private void createMeetingCallback(MeetingOutput output)
        {
            this.Dispatcher.BeginInvoke(delegate()
            {
                if (output.status == "ok")
                {
                    Meeting meeting = new Meeting();
                    meeting.server = server;
                    meeting.serverMeetingID = Convert.ToInt32(output.meetingid);
                    meeting.title = output.title;
                    meeting.topic = output.topic;
                    meeting.adminName = output.hostname;
                    meeting.startTime = output.starttime;
                    meeting.numerOfMembers = 1;
                    meeting.permissions = 2;
                    meeting.code = output.accessCode;
                    MDEDB.Meetings.InsertOnSubmit(meeting);
                    MDEDB.SubmitChanges();

                    MessageBox.Show("Meeting created");

                    NavigationService.RemoveBackEntry();
                    NavigationService.Navigate(new Uri("/Pages/MeetingPage.xaml?meetingID=" + meeting.ID + "&removePrevious=" + bool.TrueString, UriKind.Relative));
                }
                else
                {
                    MessageBox.Show("Unable to join meeting.\nServer response:\n" + output.reason);

                    setControlEnabled(true);
                }
            });
        }
        private void joinMeetingCallback(MeetingOutput output)
        {
            this.Dispatcher.BeginInvoke(delegate()
               {
                   if (output.status == "ok")
                   {
                       Meeting meeting = output.getEntity(server);
            //                       MDEDB.Meetings.InsertOnSubmit(output.getEntity(server));
                       MDEDB.Meetings.InsertOnSubmit(meeting);
                       MDEDB.SubmitChanges();
                       System.Diagnostics.Debug.WriteLine(meeting.ID);

                       //TODO go to the meeting page instead
                       MessageBox.Show("Succesfully joined the meeting.");
                       NavigationService.Navigate(new Uri("/Pages/MeetingPage.xaml?meetingID=" + meeting.ID + "&removePrevious=" + bool.TrueString, UriKind.Relative));
                   }
                   else
                   {
                       MessageBox.Show("Unable to join meeting.\nServer response:\n" + output.reason);
                       _timer.Start();
                   }
               });
        }