Ejemplo n.º 1
0
 private void btDownload_Click(object sender, EventArgs e)
 {
     string email_regex = @"^[a-zA-Z0-9\._-]+@[a-zA-Z0-9\._-]+\.[a-zA-Z0-9]+$";
     if (CrawlerLib.Net.Utility.SimpleRegexSingle(email_regex, textBoxEmail.Text, 0) != "")
     {
         RequestTVKServer sv = new RequestTVKServer();
         sv.SubmitEmail(textBoxEmail.Text);
         CrawlerLib.Net.Utility.WriteAppRegistry("TVKing2", "email", textBoxEmail.Text);
         deAfterSubmitEmail.Invoke();
         this.Close();
     }
     else
     {
         MessageBox.Show("Your email is not correct. Please enter again.", "Error Input");
     }
 }
Ejemplo n.º 2
0
 private void simpleButton1_Click(object sender, EventArgs e)
 {
     if (textBoxChannelUrl.Text.Trim() == "")
     {
         MessageBox.Show("Please enter URL", "Error");
         return;
     }
     else
         if (listboxCountry.SelectedItem.ToString() == "")
         {
             MessageBox.Show("Please choose country", "Error");
             return;
         }
     RequestTVKServer sv = new RequestTVKServer();
     sv.SubmitUrl(textBoxChannelUrl.Text, listboxCountry.SelectedItem.ToString());
     MessageBox.Show("Thank you for your submission. Our staff will verify your submission.", "Submission is completed");
     this.Close();
 }
Ejemplo n.º 3
0
        private void buttonBackYoutube_Click(object sender, EventArgs e)
        {
            if (ratingStars1.currentSelect == 0)
            {
                MessageBox.Show("Please rate this stream");
                return;
            }
            if (txtName.Text == "" || txtName.Text == "Your name")
            {
                MessageBox.Show("Please enter your name");
                return;
            }
            if (txtComment.Text == "" || txtComment.Text == "Your name")
            {
                MessageBox.Show("Please enter your comment");
                return;
            }

            RequestTVKServer req = new RequestTVKServer();
            req.PostRating(id, ratingStars1.currentSelect.ToString(), txtName.Text, txtComment.Text);
            this.Visible = false;
            MessageBox.Show("You have rated the item Successfully");
            this.Close();
        }
Ejemplo n.º 4
0
 private void DownloadCheckedList()
 {
     RequestTVKServer sv = new RequestTVKServer();
     DeRequestTVKServer callback = new DeRequestTVKServer(DownloadCheckedListCallback);
     sv.DownloadSync("?action=checked_channels", callback);
 }
Ejemplo n.º 5
0
        private void ChannelError()
        {
            barText.Visible = false;
            barProgress.Visible = false;
            pnStatus.Visible = false;

            txtTitle.Visible = true;
            txtTitle.Text = currentPlayingChannel.name;

            pbErrorBG.Visible = true;
            lbErrorPlayer.Visible = true;

            RequestTVKServer sv = new RequestTVKServer();
            sv.ChannelError(currentPlayingChannel.id);
        }
Ejemplo n.º 6
0
        private void SearchQuery(string key, bool country, bool category, bool most_watched = false, bool last_watched = false)
        {
            cur_key = key;
            cur_country = country;
            cur_category = category;
            cur_most_watched = most_watched;
            cur_last_watched = last_watched;

            searchingRequest.isStoped = true;
            searchingRequest = new RequestTVKServer();

            if (country)
                defaultCountry = key;

            lbListTitle.Text = key;

            lvStream.Clear();
            lvWeb.Clear();

            lvStream.ShowWaiting(true);
            lvWeb.ShowWaiting(true);
            pbStartSearch.Visible = false;
            pbStopSearch.Visible = true;
            txtSearch.Enabled = false;

            searchingRequest.search_key = key;
            searchingRequest.isCountrySearch = country;
            searchingRequest.isCategorySearch = category;
            searchingRequest.most_watched = most_watched;
            searchingRequest.last_watched = last_watched;
            searchingRequest.callbackRequest = new DeRequestTVKServer(ServerResponseChannels);
            Thread thSearch;
            thSearch = new Thread(new ThreadStart(searchingRequest.SearchAsys));
            thSearch.Start();
        }
Ejemplo n.º 7
0
        private void LoadServerConfig()
        {
            RequestTVKServer sv = new RequestTVKServer();
            string content = sv.GetConfig();
            string t = ParserLib.GetBlockSingle(content, "show_logo", "", "", "", "", "", "").innerText.Trim();
            if (t == "1")
            {
                server_config_showlogo = true;
            }
            else
            {
                server_config_showlogo = false;
            }

            t = ParserLib.GetBlockSingle(content, "tvkads", "", "", "", "", "", "").innerText.Trim();
            if (t == "1")
            {
                server_config_ads = true;
            }
            else
            {
                server_config_ads = false;
            }
        }
Ejemplo n.º 8
0
        private void LoadingChannelSuccess(bool is_youtube = false)
        {
            isVideoPlaying = true;
            if (is_youtube == false)
            {
                if (last_sending_success != currentPlayingChannel.id)
                {
                    last_sending_success = currentPlayingChannel.id;
                    RequestTVKServer sv = new RequestTVKServer();
                    sv.ChannelChecked(currentPlayingChannel.id);
                    txtTitle.Text = currentPlayingChannel.name;
                }
            }
            //if (currentPlayingChannel.channel_type != "4" && currentPlayingChannel.channel_type != "1")
            //    isLoadVideo = true;
            barText.Visible = false;
            barProgress.Visible = false;
            pnStatus.Visible = false;
            pbErrorBG.Visible = false;

            txtTitle.Visible = true;
            //txtDescription.Visible = true;
            //txtDescription.Text = currentPlayingChannel.description;
            pbMinimize.Visible = true;

            if (isShownAds == false)
            {
                switch (AppConst.appType)
                {
                    case RegisterType.Ads:
                        RegisterCheck reg = new RegisterCheck();
                        if (reg.IsRegister() == false)
                        {
                            ShowAdsOnChannel();
                        }
                        break;
                    case RegisterType.Free:
                        break;
                    case RegisterType.Hours:
                        break;
                    case RegisterType.HoursDaily:
                        break;
                    case RegisterType.Trial:
                        break;
                }
            }
        }
Ejemplo n.º 9
0
 private void LoadCountry()
 {
     RequestTVKServer req = new RequestTVKServer();
     string res = req.GetCountry();
     cbCountry.Invoke(new DeCallbackString(LoadCountryCallback), res);
 }