Exemple #1
0
        private string GetNames(int Num)
        {
            string names = "";

            try
            {
                using (var Request = new HttpRequest())
                {
                    string SourcePage;


                    string[] raw;


                    SourcePage = Request.Get("http://sibtime.ru/catalog/ruchki_pishushchie_instrumenty/?COD=ruchki_pishushchie_instrumenty&PAGEN_2=" + Num).ToString();

                    raw = SourcePage.Substrings("\"name\">", "</div>", 0);

                    for (int i = 0; i < raw.Length; i++)
                    {
                        names += raw[i] + "\r\n";
                    }
                }
            }
            catch { }
            return(names);
        }
Exemple #2
0
        private void GetNames(ref string[,] MoneyValues)
        {
            string b = string.Empty;

            try
            {
                using (var Request = new HttpRequest())
                {
                    string SourcePage;
                    SourcePage = Request.Get("http://www.bank.gov.ua/control/uk/curmetal/detail/currency?period=daily").ToString();
                    for (int i = 0; i < 25; i++)
                    {
                        b = string.Empty;
                        MoneyValues[i, 0] = Convert.ToString(SourcePage.Substrings("<td class=\"cell\">", "</td>", 0)[i]);
                        MoneyValues[i, 1] = Convert.ToString(SourcePage.Substrings("</td>\r\n\r\n          <td class=\"cell_c\">", "</td>", 0)[i]);
                        MoneyValues[i, 2] = Convert.ToString(SourcePage.Substrings("</td>\r\n          <td class=\"cell_c\">", "</td>\r\n          <td class=\"cell\">", 0)[i]);
                        MoneyValues[i, 1] = MoneyValues[i, 1].Replace(".", ",");
                        for (int l = 0; l < MoneyValues[i, 2].Length; l++)
                        {
                            if (Char.IsDigit(MoneyValues[i, 2][l]))
                            {
                                b += MoneyValues[i, 2][l];
                            }
                        }
                        if (b.Length > 0)
                        {
                            value_format[i] = decimal.Parse(b);
                        }
                    }
                }
            }
            catch
            {
            }
        }
Exemple #3
0
        //Кол-во страниц
        private int GetCountPages()
        {
            int    countPages = 0;
            string SourcePage;

            try
            {
                using (var Request = new HttpRequest())
                {
                    SourcePage = Request.Get("http://vegetarian.ru/forum/users/").ToString();
                    MessageBox.Show(SourcePage);
                    countPages = Convert.ToInt32(SourcePage.Substrings("/forum/users/?PAGEN_1=", "\">", 0)[4]);
                }
            } catch {}

            return(countPages);
        }
Exemple #4
0
        private int GetCountPages()
        {
            int countPages = 0;

            try
            {
                using (var Request = new HttpRequest())
                {
                    string SourcePage;

                    SourcePage = Request.Get("http://sibtime.ru/catalog/ruchki_pishushchie_instrumenty/").ToString();
                    countPages = Convert.ToInt32(SourcePage.Substrings("/catalog/ruchki_pishushchie_instrumenty/?COD=ruchki_pishushchie_instrumenty&amp;PAGEN_2=", "\">", 0)[4]);
                }
            }
            catch {}

            return(countPages);
        }