private void LoadDmbedBefore() { string[] lines = File.ReadAllLines(Program.ReturnLocalFile()); this.Dumbeds = new List <DumbedNumber>(); if (lines == null) { return; } foreach (string line in lines) { DumbedNumber d = DumbedNumber.Build(line); if (d.isValid() == false) { continue; } this.Dumbeds.Add(d); this.SearchResult.Add(d); } }
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 { } }