Exemple #1
0
        private void sendExampleRequestOrder()
        {
            string[] exam = { "debugful", "http://w6.loxa.edu.tw/a13302001/000.png", "", "3" };
            exam[2] = FBDialog1.SelectedPath;
            RqOrder order;

            sendDebugMSGToConsole("BackgroundWorker has Charged");
            inteveneUIwithThread("3/BackgroundWorker has Charged");
            switch (Convert.ToInt16(requestValueFromUI(0)))
            {
            case 0:
                order = new RqOrder(exam[0], exam[1], exam[2], RqOrder.BASE_ON_FINAL_EPNUM);
                order.addURLs(exam[3]);
                Udler = new UDdler(order);
                Udler.doDownloadMethod(2, true);
                sendDebugMSGToConsole("Download Request has Send");
                Thread.Sleep(5000);
                break;

            case 1:
                order = new RqOrder(exam[0], exam[1], exam[2], RqOrder.BASE_ON_FINAL_EPNUM, true);
                order.addURLs(exam[3]);
                Udler = new UDdler(order);
                Udler.doDownloadMethod(2, true);
                sendDebugMSGToConsole("Download Request has Send");
                Thread.Sleep(5000);
                break;

            case 2:
                order = new RqOrder(exam[0], exam[1], exam[2], RqOrder.BASE_ON_ALL_PAGEURL);
                for (int num = 1; num <= Convert.ToInt16(exam[3]); num++)
                {
                    order.addURLs("http://w6.loxa.edu.tw/a13302001/00" + Convert.ToString(num) + ".png");
                }
                Udler = new UDdler(order);
                Udler.doDownloadMethod(1, true);
                sendDebugMSGToConsole("Download Request has Send");
                Thread.Sleep(5000);
                break;

            case 3:
                order = new RqOrder(exam[0], exam[1], exam[2], RqOrder.BASE_ON_ALL_PAGEURL, true);
                for (int num = 1; num <= Convert.ToInt16(exam[3]); num++)
                {
                    order.addURLs("http://w6.loxa.edu.tw/a13302001/00" + Convert.ToString(num) + ".png");
                }
                Udler = new UDdler(order);
                Udler.doDownloadMethod(1, true);
                sendDebugMSGToConsole("Download Request has Send");
                Thread.Sleep(5000);
                break;

            default:
                inteveneUIwithThread("3/ERROR Rising On DownloadRule");
                sendDebugMSGToConsole("We get Download Rule Value: " + requestValueFromUI(0));
                break;
            }
        }
Exemple #2
0
        private void resetUI()
        {
            inteveneUIwithThread("5/2");
            inteveneUIwithThread("6/1");
            inteveneUIwithThread("7/0");
            //dlRuleCBox.SelectedText = "";
            //TitlettBox.Text = "";
            //FPUrlTtBox.Text = "";
            Udler = new UDdler();
            //UIUpdayer = new Thread(updateUI);
            Reseted = true;

            sendDebugMSGToConsole("UI has Reseted");
        }
Exemple #3
0
        public URLSDownloader()
        {
            InitializeComponent();
            Vlabel.Text     = versionString;
            Udler           = new UDdler();
            timetoClose     = false;
            FBChoiceListner = new Thread(threadcheckingFBCChoiced);
            TitleChecker    = new Thread(threadingTitleCheck);
            FBChoiceListner.Start();
            TitleChecker.Start();


            UIUpdayer = new Thread(updateUI);

            typeMessageToTtBox("Welcome");
        }
Exemple #4
0
        //Build & Sent Request methods
        private void sendRequestOrder()
        {
            RqOrder order;
            string  v1 = TitlettBox.Text;
            string  v2 = FPUrlTtBox.Text;
            string  v3 = FBDialog1.SelectedPath;

            //Thread.Sleep(3000);
            switch (Convert.ToInt16(requestValueFromUI(0)))
            {
            case 0:
                order = new RqOrder(v1, v2, v3, RqOrder.BASE_ON_FINAL_EPNUM);
                order.addURLs(Convert.ToString(DldataView.Rows[0].Cells[1].FormattedValue));
                Udler = new UDdler(order);
                Udler.doDownloadMethod(2, false);
                break;

            case 1:
                order = new RqOrder(v1, v2, v3, RqOrder.BASE_ON_FINAL_EPNUM, true);
                order.addURLs(Convert.ToString(DldataView.Rows[0].Cells[1].FormattedValue));
                Udler = new UDdler(order);
                Udler.doDownloadMethod(2, false);
                break;

            case 2:
                order = new RqOrder(v1, v2, v3, RqOrder.BASE_ON_ALL_PAGEURL);
                for (int CrtNum = 0; CrtNum < DldataView.Rows.Count; CrtNum++)
                {
                    order.addURLs(Convert.ToString(DldataView.Rows[CrtNum].Cells[1].FormattedValue));
                }
                Udler = new UDdler(order);
                Udler.doDownloadMethod(1, false);
                break;

            case 3:
                order = new RqOrder(v1, v2, v3, RqOrder.BASE_ON_ALL_PAGEURL, true);
                order.addURLs(Convert.ToString(DldataView.Rows[0].Cells[1].FormattedValue));
                Udler = new UDdler(order);
                Udler.doDownloadMethod(2, false);
                break;

            default:
                inteveneUIwithThread("3/ERROR Rising On DownloadRule");
                sendDebugMSGToConsole("We get Download Rule Value: " + requestValueFromUI(0));
                break;
            }
        }