private void btnDumb_Click(object sender, EventArgs e) { int searched = 0; int hasImage = 0; int skiped = 0; rtxbxDumber.Text += " Starting ..... "; string prefix = txbx_Dumber_prefix.Text; int Num_length = int.Parse(numUD_length.Value.ToString()); int start = int.Parse(NumFrom.Value.ToString()); int end = int.Parse(NumTo.Value.ToString()); for (int i = start; i <= end; i++) { string num = prefix + LeftZaeros((i), Num_length - prefix.Length); if (!settings.GetsessionExpired()) { DumbedNumber d = new DumbedNumber(); d.number = num; if (this.onList(d) && this.ckbx_3_skipDumbedBefore.Checked) { skiped++; continue; } d.TrueCallerInfo(); if (dataBasemanager.NumberExisted(d.number) == false && d.Tostore()) { dataBasemanager.AddNew(d); } if (d.Has_Image()) { hasImage++; } searched++; rtxbxDumber.Text += (Environment.NewLine + num + ": Dumbed at" + DateTime.Now.ToShortTimeString()); if (d.HasError) { rtxbxDumber.Text += Environment.NewLine + " Error " + d.ErrorType.ToString(); return; } NumFrom.Value++; } } lbl_Dumber_Result_HasImage.Text = "With Images=" + hasImage.ToString(); lbl_Dumber_Result_Searched.Text = "Searched=" + searched.ToString(); lblSkipped.Text = "Skipped=" + skiped; }
private void ViewSearchedLocal() { int SelectedIndex___ = dataGridView1.CurrentCell.RowIndex; try { this.picbxLocal.Image = global::NumberDumber.Properties.Resources.defpic; } catch { } if (SelectedIndex___ < 0) { return; } if (this.lstbxLocal.SelectedIndex >= this.Dumbeds.Count) { return; } DumbedNumber d = this.SearchList[SelectedIndex___]; chkbx_name_loadOnline.Visible = d.Has_Image(); this.rtbxLocal.Text = d.ToString(Environment.NewLine + Environment.NewLine + "-"); string img_path = Application.StartupPath + "\\imgs\\" + d.CountryAbb.Trim() + "_" + d.number.Trim() + ".jpg"; try { chkbx_name_loadOnline.Visible = false; if (File.Exists(img_path)) { this.picbxLocal.Image = Image.FromFile(img_path); } else if (chkbx_name_loadOnline.Checked) { this.picbxLocal.Load(d.ImageLink); this.picbxLocal.Image.Save(img_path); } else { chkbx_name_loadOnline.Visible = true; } } catch { } gpx_Local_view.Visible = true; }
private void btnDumb_Click(object sender, EventArgs e) { int searched = 0; int hasImage = 0; int skiped = 0; rtxbxDumber.Text += " Starting ..... "; string prefix = txbx_Dumber_prefix.Text; int Num_length = int.Parse(numUD_length.Value.ToString()); int start = int.Parse(NumFrom.Value.ToString()); int end = int.Parse(NumTo.Value.ToString()); for(int i=start;i<=end;i++) { string num = prefix + LeftZaeros((i), Num_length-prefix.Length ); if (!settings.GetsessionExpired()) { DumbedNumber d = new DumbedNumber(); d.number = num; if (this.onList(d) && this.ckbx_3_skipDumbedBefore.Checked) { skiped++; continue; } d.TrueCallerInfo(); if (dataBasemanager.NumberExisted(d.number) == false && d.Tostore()) dataBasemanager.AddNew(d); if (d.Has_Image()) hasImage++; searched++; rtxbxDumber.Text += (Environment.NewLine + num + ": Dumbed at" + DateTime.Now.ToShortTimeString()); if (d.HasError) { rtxbxDumber.Text += Environment.NewLine + " Error " + d.ErrorType.ToString(); return; } NumFrom.Value++; } } lbl_Dumber_Result_HasImage.Text = "With Images="+hasImage.ToString(); lbl_Dumber_Result_Searched.Text = "Searched="+searched.ToString(); lblSkipped.Text = "Skipped=" + skiped; }
private void Check_Click(object sender, EventArgs e) { gpxInfo.Visible = false; try { try { this.PICBXnumber.Image = global::NumberDumber.Properties.Resources.defpic; } catch { } /*//////*/ lblNumberError.Visible = false; /*//////*/ DumbedNumber d = new DumbedNumber(); d.number = txbxNumber.Text.IntOnly(); d.CountryAbb = DumbedNumber.Abb(cmbx_Check_countryAbb.SelectedIndex); d.TrueCallerInfo(); /*//////*/ rtxbxInfo_Of_number.Text = d.ToString(Environment.NewLine + Environment.NewLine + "-"); if(d.ErrorType==NumberError.SessionError) rtxbxInfo_Of_number.Text += "\r\nPlease restart the session \r\n add cookie \r\n or \r\n log out and log in again "; gpxInfo.Text = d.name + "`s Info"; gpxInfo.Visible = true; PICBXnumber.Image = DefaultImage(); if (d.isValid() && onList(d)==false) this.Dumbeds.Add(d); /*//////*/ string ip = Application.StartupPath + "\\imgs\\" + d.CountryAbb.Trim() + "_" + d.number.Trim() + ".jpg"; if (d.Has_Image()) { try { if (File.Exists(ip)) this.PICBXnumber.Image = Image.FromFile(ip); else if (chkbx_name_loadOnline.Checked) { this.PICBXnumber.Load(d.ImageLink); this.PICBXnumber.Image.Save(ip); } } catch { } } /*//////*/ dataBasemanager.AddNew(d); lblNumberError.Visible = d.HasError; lnkLblPlzSignIn.Visible = (d.ErrorType == NumberError.SessionError); gpxInfo.Visible=true; } catch { } }
private void Check_Click(object sender, EventArgs e) { gpxInfo.Visible = false; try { try { this.PICBXnumber.Image = global::NumberDumber.Properties.Resources.defpic; } catch { } /*//////*/ lblNumberError.Visible = false; /*//////*/ DumbedNumber d = new DumbedNumber(); d.number = txbxNumber.Text.IntOnly(); d.CountryAbb = DumbedNumber.Abb(cmbx_Check_countryAbb.SelectedIndex); d.TrueCallerInfo(); /*//////*/ rtxbxInfo_Of_number.Text = d.ToString(Environment.NewLine + Environment.NewLine + "-"); if (d.ErrorType == NumberError.SessionError) { rtxbxInfo_Of_number.Text += "\r\nPlease restart the session \r\n add cookie \r\n or \r\n log out and log in again "; } gpxInfo.Text = d.name + "`s Info"; gpxInfo.Visible = true; PICBXnumber.Image = DefaultImage(); if (d.isValid() && onList(d) == false) { this.Dumbeds.Add(d); } /*//////*/ string ip = Application.StartupPath + "\\imgs\\" + d.CountryAbb.Trim() + "_" + d.number.Trim() + ".jpg"; if (d.Has_Image()) { try { if (File.Exists(ip)) { this.PICBXnumber.Image = Image.FromFile(ip); } else if (chkbx_name_loadOnline.Checked) { this.PICBXnumber.Load(d.ImageLink); this.PICBXnumber.Image.Save(ip); } } catch { } } /*//////*/ dataBasemanager.AddNew(d); lblNumberError.Visible = d.HasError; lnkLblPlzSignIn.Visible = (d.ErrorType == NumberError.SessionError); gpxInfo.Visible = true; } catch { } }