Beispiel #1
0
        void DoAction()
        {
            var objAction = new Objects.WebActionObject(_action);

            objAction._wk = _wk;
            objAction.ExecuteAction(true);
        }
 public FrmLabelNavigator(Objects.WebActionObject act, Models.ElementLabel lbl, string msg)
 {
     InitializeComponent();
     _initMsg = msg;
     _act     = act;
     dgLabels.AutoGenerateColumns = false;
     dgLabels.SelectionMode       = DataGridViewSelectionMode.FullRowSelect;
     dgLabels.CellClick          += DgLabels_CellClick;
 }
Beispiel #3
0
        void RunCrawler()
        {
            Models.WebAction actGetHtml, actClickSearch, actEnterData, actBrowse, actWebRoomTypes,
                             actClickCmbRoomTypes;
            var abo = new BO.ActionBO();

            actGetHtml           = abo.GetAction(22);
            actClickSearch       = abo.GetAction(21);
            actEnterData         = abo.GetAction(20);
            actBrowse            = abo.GetAction(18);
            actWebRoomTypes      = abo.GetAction(38);
            actClickCmbRoomTypes = abo.GetAction(39);
            objGetHtml           = new Objects.WebActionObject(actGetHtml);
            objClick             = new Objects.WebActionObject(actClickSearch);
            objEnterData         = new Objects.WebActionObject(actEnterData);
            objBrowse            = new Objects.WebActionObject(actBrowse);
            objGetWebRoomTypes   = new Objects.WebActionObject(actWebRoomTypes);
            objClickCmbRoomTypes = new Objects.WebActionObject(actClickCmbRoomTypes);
            objBrowse._wk        = objGetHtml._wk = objEnterData._wk = objEnterData._wk = objClick._wk = _wk;
            foreach (var h in _selectedHotels)
            {
                if (string.IsNullOrEmpty(h.HMSID))
                {
                    MessageBox.Show("null or empty hmsId for hotel " + h.HotelName);
                }
            }
            for (int i = 0; i < _selectedHotels.Count; i++)
            {
                if (_wk.CancellationPending)
                {
                    break;
                }
                CrawlSingleHotel(_selectedHotels[i]);
            }
            var bld = new StringBuilder();

            if (bld.Length > 0)
            {
                _wk.ReportProgress(0, Environment.NewLine + bld.ToString());

                /* Nov 27: Text just not display
                 * Console.WriteLine(bld.ToString());
                 * var viewer = new frmStringViewer(bld.ToString());
                 * viewer.Show();*/
            }
        }