Beispiel #1
0
        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;
        }
Beispiel #2
0
        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;
        }
Beispiel #3
0
        private bool DumbNumber(string num)
        {
            try
            {
                DumbedNumber d = new DumbedNumber();
                d.number = num;
                d.TrueCallerInfo();

                if (dataBasemanager.NumberExisted(d.number) == false && d.Tostore())
                {
                    dataBasemanager.AddNew(d);
                }

                return(!d.HasError);// false;
            }
            catch { return(false); }
        }
Beispiel #4
0
        private bool DumbNumber(string num)
        {
            try
            {

                DumbedNumber d = new DumbedNumber();
                d.number = num;
                d.TrueCallerInfo();

                if (dataBasemanager.NumberExisted(d.number) == false && d.Tostore())
                    dataBasemanager.AddNew(d);

                return !d.HasError;// false;
            }
            catch { return false; }
        }
Beispiel #5
0
        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 {   }
        }
Beispiel #6
0
        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 {   }
        }