private void btnStartReservation_Click(object sender, EventArgs e) { if (btnStartReservation.Text == "예약중지") { btnStartReservation.Text = "예약시작"; } else { btnStartReservation.Text = "예약중지"; } while (true) { if (btnStartReservation.Text == "예약시작") { return; } if (HttpManager.GetGoodsOpen(txtGoodsCode.Text) || DateTime.Now > new DateTime(2014, 8, 12, 14, 0, 0)) { // 1. 세션정보 조회 var sessionInfo = HttpManager.GetSessinInfo(txtGoodsCode.Text, ref cookie); // 2. 상품 정보 조회 var result = HttpManager.BookMain(ref sessionInfo, ref cookie); if (result) { // 3. 상품 정보 조회 HttpManager.GetBaseData(ref sessionInfo, ref cookie); //Thread.Sleep(200); // 3-1. 상품 정보 조회 HttpManager.GetBaseXmlData(ref sessionInfo, ref cookie); //Thread.Sleep(200); // 3-2. 상품 정보 조회 HttpManager.GetBaseXmlData2(ref sessionInfo, ref cookie); //Thread.Sleep(200); // 4. 티켓정보 HttpManager.GetTicketInfo(ref sessionInfo, ref cookie); //Thread.Sleep(200); // 5. 패널티 스크립트 HttpManager.GetPanaltyScript(ref sessionInfo); //Thread.Sleep(200); // 6. 유저정보 조회 result = HttpManager.GetUserInfo(ref sessionInfo, ref cookie); if (result) { // 7. 유저 데이터 암호화 HttpManager.GetEncryptData(ref sessionInfo, ref cookie); //8. 결제 정보 조회 HttpManager.GetPayment(ref sessionInfo, ref cookie); //9. Mcache 암호화 HttpManager.GetMCacheEncryptData(ref sessionInfo, ref cookie); //9. 확인 HttpManager.Confirm(ref sessionInfo, ref cookie); //10. 완료 result = HttpManager.End(ref sessionInfo, ref cookie); if (result) { MessageBox.Show("예약완료"); Util.Logging(this.txtLog, txtTitle.Text + " " + "예약성공"); new GcmManager().SendNotification("인터파크 예약완료", "성공"); btnStartReservation.Text = "예약시작"; break; } } } } Util.Logging(this.txtLog, "오픈전"); Thread.Sleep(500); } }