Example #1
0
 public PaperDiaper(Form1 f, Appointment app, Mail163<PaperDiaper> em)
 {
     form1 = f;
     appointment = app;
     mail = em;
     sizeType = f.selectedType;
 }
Example #2
0
 public PaperDiaper(Form1 f, Appointment app, Mail163<PaperDiaper> em, string countyForMulti, string shopForMulti, string eventId, bool requireVeriCode)
 {
     form1 = f;
     appointment = app;
     mail = em;
     sizeType = f.selectedType;
     this.requireVeriCode = requireVeriCode;
     this.countyForMulti =countyForMulti;
     this.shopForMulti = shopForMulti;
     this.eventId = eventId;
 }
Example #3
0
        // test button
        private void button1_Click(object sender, EventArgs e)
        {
            // for texting indexer begin
            Form1 stringCollection = new Form1();
            // Use [] notation on the type.
            stringCollection[0] = "test indexer";
            System.Console.WriteLine(stringCollection[0]);
            // for texting indexer end

            //for safe call window form
            delegate2 tttt8987 = new delegate2(
                delegate() { }
                );
            appointmentGrid.Invoke(tttt8987);

            //new thread to run an anominous function
            Thread thread1111 = new System.Threading.Thread(
                delegate()
              {

                  string[] aaa = new string[] { "222", "333"};

                  Console.Write((int)aaaa.f);

                  //test Mail Reading
                  Mail163<PaperDiaper> testMailReading = new Mail163<PaperDiaper>("*****@*****.**", "dyyr7921129", this);
                  //      setLogT(testMailReading.queery("20151117test1", @"(\s|\S)*"));
                  setLogT(testMailReading.queeryReaded("20151117test1", @"(\s|\S)*"));

                  /*
                  foreach (TimeZoneInfo z in TimeZoneInfo.GetSystemTimeZones())
                      setLogT(z.Id);
                  */

                    rgx = @"(?<=予約"" >\n.+event_id"" value="")\d+?(?="")";  //there will be a veri code, and we can cheeck up with captcha

                    Match myM33atch = (new Regex(rgx)).Match("<input type=\"submit\" name=\"sbmt\" value=\"予約\" >\n<input type=\"hidden\" name=\"event_id\" value=\"4500175502\" ><input type=\"submit\" name=\"sbmt\" value=\"予約キャンセル\" >\n<input type=\"hidden\" name=\"event_id\" value=\"4500175502\" >");
                    while (myM33atch.Success)
                    {
                        setLogT(myM33atch.Value);
                        myM33atch = myM33atch.NextMatch();
                    }

                  /*
                  //searchMailDirectely
                  PaperDiaper paper = new PaperDiaper(
                            this,
                            new Appointment("2800056599132", "guoguo01", "李花", "りはな", "090-1234-2580"),
                            new Mail163<PaperDiaper>("*****@*****.**", "dyyr7921129", this));
                  //paper.searchMailDirectely();
                  paper.searchMailDirectelyFromReaded();
                  */

                  /*
               // let code help me making code -- get counties
                   //<option value="%96k%8aC%93%b9" >北海道</option>
                   string result22="";
                   string html = weLoveYue(
                       this,
                   "http://aksale.advs.jp/cp/akachan_sale_pc/search_shop_top.cgi?event_type=7",
                   "GET",
                   "",
                   false,
                   "",
                   ref cookieContainerForTest,
                   false);
                                           //      <option value="%96k%8aC%93%b9" >北海道</option>
                   Match match = (new Regex(@"(?<=\<option value=""(\s|\S)+?"" \>).+?(?=\<\/option)")).Match(html);
                   while(match.Success){
                       string t_county = match.Groups[0].Value;
                       result22+="Countylist.Add(new County("+"\n\""+t_county+"\",\n";
                       html = weLoveYue(
                       this,
                       "http://aksale.advs.jp/cp/akachan_sale_pc/search_shop_area3.cgi",
                       "POST",
                       "",
                       false,
                       "area2="
                           +Form1.ToUrlEncode(t_county, System.Text.Encoding.GetEncoding("shift-jis"))
                           + "&sbmt=%81%40%8C%9F%8D%F5%81%40&event_type=7",
                       ref cookieContainerForTest,
                       false
                       );
                       //<a href="./search_event_list.cgi?area2=%96k%8aC%93%b9&event_type=7&sid=37116&kmws=">旭川店</a><br />
                       string r1 = @"(?<=area2=(\s|\S)+?\&event_type=7\&sid=)\d+";
                       Match match2 = (new Regex(r1)).Match(html);
                       {
                           string t_shop = "";
                           string t_sid = "";
                           while (match2.Success)
                           {
                               t_sid += "\""+ match2.Groups[0].Value+"\", ";
                               string r2 = @"(?<=" + match2.Groups[0].Value + @"\&kmws=""\>).+?(?=\<\/a\>)";
                               Match match3 = (new Regex(r2)).Match(html);
                               t_shop += "\""+ match3.Groups[0].Value+"\", ";

                               match2 = match2.NextMatch();
                           }

                           t_shop = t_shop.Substring(0,t_shop.Length-2);
                           t_sid = t_sid.Substring(0, t_sid.Length - 2);

                           result22 += "new List<string> { " + t_shop + " },\n";
                           result22 += "new List<string> { " + t_sid + " })\n);\n";

                       }

                       match = match.NextMatch();
                   }
                   setLogT(result22);

                  */

             //       setLogT(Form1.ToUrlEncode("北海道", System.Text.Encoding.GetEncoding("shift-jis")));

                    //     %9b%c1     %94%f2%94%f2          %83t          %83C%83q%83q      090      8619      3569
                    //"&sei=%9B%C1&mei=%94%F2%94%F2&sei_kana=%83T&mei_kana=%83C%83q%83q&tel1=090&tel2=8619&tel3=3569"

                    string x1 = Form1.ToUrlEncode("崔飛飛".Substring(0, 1), System.Text.Encoding.GetEncoding("shift-jis")),
                            x2 = Form1.ToUrlEncode("崔飛飛".Substring(1, "崔飛飛".Length - 1), System.Text.Encoding.GetEncoding("shift-jis")),
                            y1 = Form1.ToUrlEncode("サイヒヒ".Substring(0, 1), System.Text.Encoding.GetEncoding("shift-jis")),
                            y2 = Form1.ToUrlEncode("サイヒヒ".Substring(1, "サイヒヒ".Length - 1), System.Text.Encoding.GetEncoding("shift-jis")),
                            z1 = Regex.Match("090-8619-3569", @"\d+(?=\-)").Value,
                            z2 = Regex.Match("090-8619-3569", @"(?<=\d+\-)\d+(?=-)").Value,
                            z3 = Regex.Match("090-8619-3569", @"(?<=\d+\-\d+\-)\d+").Value;
                    setLogT(x1 + " " + x2 + " " + y1 + " " + y2 + " " + z1 + " " + z2 + " " + z3);

                /*
                    string pattern = @"^";
                    string replacement = "1-1-";
                    string result = Regex.Replace("12345", pattern, replacement);
                    setLogT(result);

                    rgx = @"(?<=aa).*?(?=aa)";
                    myMatch = (new Regex(rgx)).Match("qqqqqaaqwdsfaafferaafe222aa2222444aa444444222faaloveaa");
                    while (myMatch.Success)
                    {
                        setLogT(myMatch.Groups[0].Value);
                        myMatch = myMatch.NextMatch();
                    }

                    string message = "4344.34334.23.24.";
                    Regex rex = new Regex(@"^(\.|\d)+$");
                    if (rex.IsMatch(message))
                    {
                        //float result2 = float.Parse(message);
                        setLogT("match");
                    }
                    else
                        setLogT("not match");

                    int aa;
                    if ((aa = 4) == 4)
                    {
                        setLogT(aa.ToString());
                    }

                    Regex regex = new Regex(@"( ){2,}");
                    setLogT(regex.Replace("22      22", " "));
                    string[] s = regex.Replace(" abc def kkk   333 ppp ".Trim(), " ").Split(' ');
                    setLogT(s.Length.ToString());

                    string test2 = "abc";
                    //       testCall(test2);
                    setLogT(test2);

                    Appointment test3 = new Appointment("159", "", "", "", "");
                    testCall(ref test3);
                    setLogT(test3.CardNo);

                    setLogT("崔飛飛 " + Form1.ToUrlEncode("崔飛飛", System.Text.Encoding.GetEncoding("shift-jis")));//Shift_JIS     ??
                    setLogT("サイヒヒ " + Form1.ToUrlEncode("サイヒヒ"));
                    setLogT("090-8619-3569 " + Form1.ToUrlEncode("090-8619-3569"));

                string respHtml = Form1.weLoveYue(
                    this,
                    "https://aksale.advs.jp/cp/akachan_sale_pc/form_card_no.cgi"
                    ,
                    "POST",
                    "https://aksale.advs.jp/cp/akachan_sale_pc/mail_form.cgi",
                    false,
                    "card_no=" + "1234567890123" + "&sbmt=%8E%9F%82%D6",
                    ref cookieContainerForTest,
                    false
                    );

                setLogT("崔飛飛 ".Length.ToString());

                    */

              });
            thread1111.Start();
        }