private static LoginResult LoginFlowEventGen() { SelectSession: //session var sessionDlg = new LoginSessionDlg(); sessionDlg.ShowDialog(); if (sessionDlg.SelectedSession == null) { return(null); } SelectDiscussion: //discussion var discussionDlg = new LoginDiscussionDlg((Person)null); discussionDlg.ShowDialog(); if (discussionDlg.BackClicked) { goto SelectSession; } if (discussionDlg.SelectedDiscussion == null) { MsgParticipantsShouldSelectDiscussion(); return(null); } //device type var devTypeDlg = new LoginDevTypeDlg(null); devTypeDlg.ShowDialog(); if (devTypeDlg.BackClicked) { goto SelectDiscussion; } var res = new LoginResult(); //build result if (discussionDlg.SelectedDiscussion != LoginDiscussionDlg.DummyDiscussion) { res.discussion = discussionDlg.SelectedDiscussion; } res.session = sessionDlg.SelectedSession; res.devType = devTypeDlg.SelectedDeviceType; return(res); }
private static LoginResult LoginFlowEventGen() { SelectSession: //session var sessionDlg = new LoginSessionDlg(); sessionDlg.ShowDialog(); if (sessionDlg.SelectedSession == null) return null; SelectDiscussion: //discussion var discussionDlg = new LoginDiscussionDlg((Person) null); discussionDlg.ShowDialog(); if (discussionDlg.BackClicked) goto SelectSession; if (discussionDlg.SelectedDiscussion == null) { MsgParticipantsShouldSelectDiscussion(); return null; } //device type var devTypeDlg = new LoginDevTypeDlg(null); devTypeDlg.ShowDialog(); if (devTypeDlg.BackClicked) goto SelectDiscussion; var res = new LoginResult(); //build result if (discussionDlg.SelectedDiscussion != LoginDiscussionDlg.DummyDiscussion) res.discussion = discussionDlg.SelectedDiscussion; res.session = sessionDlg.SelectedSession; res.devType = devTypeDlg.SelectedDeviceType; return res; }
private static LoginResult LoginFlowExperiment() { SelectSession: //session var sessionDlg = new LoginSessionDlg(); sessionDlg.ShowDialog(); if (sessionDlg.SelectedSession == null) { return(null); } SelectSeat: //seat var seatDlg = new LoginSeatSelectorDlg(); seatDlg.ShowDialog(); if (seatDlg.BackClicked) { goto SelectSession; } if (seatDlg.SelectedSeat == null) { return(null); } if (placeAlreadyBusy(sessionDlg.SelectedSession, seatDlg.SelectedSeat)) { MsgPlaceReserved(); goto SelectSession; } //EnterName: //name var nameDlg = new LoginName(seatDlg.SelectedSeat); nameDlg.ShowDialog(); if (nameDlg.BackClicked) { goto SelectSeat; } if (nameDlg.EnteredName == null) { return(null); } //if (!NameUnique(nameDlg.EnteredName, sessionDlg.SelectedSession)) //{ // MsgNameRegistered(); // goto EnterName; //} //discussion selector var discussionDlg = new LoginDiscussionDlg(nameDlg.EnteredName); discussionDlg.ShowDialog(); if (discussionDlg.BackClicked) { goto SelectSeat; } if (discussionDlg.SelectedDiscussion == null) { MsgParticipantsShouldSelectDiscussion(); return(null); } //final checks and build login result if (placeAlreadyBusy(sessionDlg.SelectedSession, seatDlg.SelectedSeat)) { MsgPlaceReserved(); goto SelectSession; } //if (!NameUnique(nameDlg.EnteredName, sessionDlg.SelectedSession)) //{ // MsgNameRegistered(); // goto EnterName; //} //register user and build result var res = new LoginResult(); if (discussionDlg.SelectedDiscussion != LoginDiscussionDlg.DummyDiscussion) { res.discussion = discussionDlg.SelectedDiscussion; } res.session = sessionDlg.SelectedSession; res.person = RegisterOrLogin(nameDlg.EnteredName, discussionDlg.SelectedDiscussion, sessionDlg.SelectedSession, seatDlg.SelectedSeat); return(res); }
private static LoginResult LoginFlowExperiment() { SelectSession: //session var sessionDlg = new LoginSessionDlg(); sessionDlg.ShowDialog(); if (sessionDlg.SelectedSession == null) return null; SelectSeat: //seat var seatDlg = new LoginSeatSelectorDlg(); seatDlg.ShowDialog(); if (seatDlg.BackClicked) goto SelectSession; if (seatDlg.SelectedSeat == null) return null; if (placeAlreadyBusy(sessionDlg.SelectedSession, seatDlg.SelectedSeat)) { MsgPlaceReserved(); goto SelectSession; } //EnterName: //name var nameDlg = new LoginName(seatDlg.SelectedSeat); nameDlg.ShowDialog(); if (nameDlg.BackClicked) goto SelectSeat; if (nameDlg.EnteredName == null) return null; //if (!NameUnique(nameDlg.EnteredName, sessionDlg.SelectedSession)) //{ // MsgNameRegistered(); // goto EnterName; //} //discussion selector var discussionDlg = new LoginDiscussionDlg(nameDlg.EnteredName); discussionDlg.ShowDialog(); if (discussionDlg.BackClicked) goto SelectSeat; if (discussionDlg.SelectedDiscussion == null) { MsgParticipantsShouldSelectDiscussion(); return null; } //final checks and build login result if (placeAlreadyBusy(sessionDlg.SelectedSession, seatDlg.SelectedSeat)) { MsgPlaceReserved(); goto SelectSession; } //if (!NameUnique(nameDlg.EnteredName, sessionDlg.SelectedSession)) //{ // MsgNameRegistered(); // goto EnterName; //} //register user and build result var res = new LoginResult(); if (discussionDlg.SelectedDiscussion != LoginDiscussionDlg.DummyDiscussion) res.discussion = discussionDlg.SelectedDiscussion; res.session = sessionDlg.SelectedSession; res.person = RegisterOrLogin(nameDlg.EnteredName, discussionDlg.SelectedDiscussion, sessionDlg.SelectedSession, seatDlg.SelectedSeat); return res; }