Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Dont work, it´s something whit the loops?

Dont work, it´s something whit the loops?

Scheduled Pinned Locked Moved The Lounge
graphicsquestionlounge
6 Posts 6 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Marketing Media Hub
    wrote on last edited by
    #1

    private void buttonCheck_Click(object sender, EventArgs e)
    {
    int[] ModPassword = { 1, 1, 1, 1, 1};
    int DerIndex;

    Random rnd = new Random();
    ModiPassword.ResetText();
    string PasswordUser = BoxPassword.Text;

    if (PasswordUser.Length >= 10)
    {
    ResultCheck1.ResetText();
    ResultCheck1.ForeColor = System.Drawing.Color.Green;
    ResultCheck1.Text += "Enough Charakters;";
    }
    else
    {
    ResultCheck1.ResetText();
    ResultCheck1.ForeColor = System.Drawing.Color.Red;
    ResultCheck1.Text += " Not enough Charakters;";
    ModPassword[0]++;
    }

    if (PasswordUser.Any(char.IsUpper))
    {
    ResultCheck2.ResetText();
    ResultCheck2.ForeColor = System.Drawing.Color.Green;
    ResultCheck2.Text += "Capital Letter(s);";
    }
    else
    {
    ResultCheck2.ResetText();
    ResultCheck2.ForeColor = System.Drawing.Color.Red;
    ResultCheck2.Text += "Has no Capital Letter(s);";
    ModPassword[1]++;
    }

    if (PasswordUser.Any(char.IsLower))
    {
    ResultCheck3.ResetText();
    ResultCheck3.ForeColor = System.Drawing.Color.Green;
    ResultCheck3.Text += "Low Letter(s)";
    }
    else
    {
    ResultCheck3.ResetText();
    ResultCheck3.ForeColor = System.Drawing.Color.Red;
    ResultCheck3.Text += "Has no low Letter(s)";
    ModPassword[2]++;
    }

    if (PasswordUser.Any(char.IsDigit))
    {
    ResultCheck4.ResetText();
    ResultCheck4.ForeColor = System.Drawing.Color.Green;
    ResultCheck4.Text += "Has a Number(s)";
    }
    else
    {
    ResultCheck4.ResetText();
    ResultCheck4.ForeColor = System.Drawing.Color.Red;
    ResultCheck4.Text += "Has no Number(s)";
    ModPassword[3]++;
    }

    if (PasswordUser.Contains("!"))
    {
    ResultCheck5.ResetText();
    ResultCheck5.ForeColor = System.Drawing.Color.Green;
    ResultCheck5.Text += "Has a !";
    }
    else
    {
    ResultCheck5.ResetText();
    ResultCheck5.ForeColor = System.Drawing.Color.Red;
    ResultCheck5.Text += "Has no !";
    ModPassword[4]++;
    }

    string newPsw = PasswordUser;
    string newPsw2 = "";
    string newPsw3 = "";
    string newPsw4 = "";
    string newPsw5 = "";
    string newPsw6 = "";
    string newPsw7 = "";
    string newPsw8 = "";
    string newPsw9 = "";
    string newPsw10 = "";
    string newPassword = "";
    string Number = "";
    int count = 0;
    for (int i = 0; i < ModPassword.Length; i++)
    {
    if (ModPassword == 2)
    {

    DerIndex = i;
    switch (i)
    {
    case 0:
    Guid B = Guid.NewGuid();
    string GuidStrings = Convert.ToBase64String(B.ToByteArray());
    GuidStrings = GuidStrings.Replace("=", "");
    GuidStrings = GuidStrings.Replace("+", "");
    newPassword = PasswordUser + GuidStrings;

    break;
    case 1:

    int numUps1 = rnd.Next(1, 11);
    int numUps2 = rnd.Next(1, numUps1);

    for (i

    M H OriginalGriffO Greg UtasG Mike HankeyM 5 Replies Last reply
    0
    • M Marketing Media Hub

      private void buttonCheck_Click(object sender, EventArgs e)
      {
      int[] ModPassword = { 1, 1, 1, 1, 1};
      int DerIndex;

      Random rnd = new Random();
      ModiPassword.ResetText();
      string PasswordUser = BoxPassword.Text;

      if (PasswordUser.Length >= 10)
      {
      ResultCheck1.ResetText();
      ResultCheck1.ForeColor = System.Drawing.Color.Green;
      ResultCheck1.Text += "Enough Charakters;";
      }
      else
      {
      ResultCheck1.ResetText();
      ResultCheck1.ForeColor = System.Drawing.Color.Red;
      ResultCheck1.Text += " Not enough Charakters;";
      ModPassword[0]++;
      }

      if (PasswordUser.Any(char.IsUpper))
      {
      ResultCheck2.ResetText();
      ResultCheck2.ForeColor = System.Drawing.Color.Green;
      ResultCheck2.Text += "Capital Letter(s);";
      }
      else
      {
      ResultCheck2.ResetText();
      ResultCheck2.ForeColor = System.Drawing.Color.Red;
      ResultCheck2.Text += "Has no Capital Letter(s);";
      ModPassword[1]++;
      }

      if (PasswordUser.Any(char.IsLower))
      {
      ResultCheck3.ResetText();
      ResultCheck3.ForeColor = System.Drawing.Color.Green;
      ResultCheck3.Text += "Low Letter(s)";
      }
      else
      {
      ResultCheck3.ResetText();
      ResultCheck3.ForeColor = System.Drawing.Color.Red;
      ResultCheck3.Text += "Has no low Letter(s)";
      ModPassword[2]++;
      }

      if (PasswordUser.Any(char.IsDigit))
      {
      ResultCheck4.ResetText();
      ResultCheck4.ForeColor = System.Drawing.Color.Green;
      ResultCheck4.Text += "Has a Number(s)";
      }
      else
      {
      ResultCheck4.ResetText();
      ResultCheck4.ForeColor = System.Drawing.Color.Red;
      ResultCheck4.Text += "Has no Number(s)";
      ModPassword[3]++;
      }

      if (PasswordUser.Contains("!"))
      {
      ResultCheck5.ResetText();
      ResultCheck5.ForeColor = System.Drawing.Color.Green;
      ResultCheck5.Text += "Has a !";
      }
      else
      {
      ResultCheck5.ResetText();
      ResultCheck5.ForeColor = System.Drawing.Color.Red;
      ResultCheck5.Text += "Has no !";
      ModPassword[4]++;
      }

      string newPsw = PasswordUser;
      string newPsw2 = "";
      string newPsw3 = "";
      string newPsw4 = "";
      string newPsw5 = "";
      string newPsw6 = "";
      string newPsw7 = "";
      string newPsw8 = "";
      string newPsw9 = "";
      string newPsw10 = "";
      string newPassword = "";
      string Number = "";
      int count = 0;
      for (int i = 0; i < ModPassword.Length; i++)
      {
      if (ModPassword == 2)
      {

      DerIndex = i;
      switch (i)
      {
      case 0:
      Guid B = Guid.NewGuid();
      string GuidStrings = Convert.ToBase64String(B.ToByteArray());
      GuidStrings = GuidStrings.Replace("=", "");
      GuidStrings = GuidStrings.Replace("+", "");
      newPassword = PasswordUser + GuidStrings;

      break;
      case 1:

      int numUps1 = rnd.Next(1, 11);
      int numUps2 = rnd.Next(1, numUps1);

      for (i

      M Offline
      M Offline
      Maximilien
      wrote on last edited by
      #2

      See the red "Got a programming question?" link at the top.

      CI/CD = Continuous Impediment/Continuous Despair

      1 Reply Last reply
      0
      • M Marketing Media Hub

        private void buttonCheck_Click(object sender, EventArgs e)
        {
        int[] ModPassword = { 1, 1, 1, 1, 1};
        int DerIndex;

        Random rnd = new Random();
        ModiPassword.ResetText();
        string PasswordUser = BoxPassword.Text;

        if (PasswordUser.Length >= 10)
        {
        ResultCheck1.ResetText();
        ResultCheck1.ForeColor = System.Drawing.Color.Green;
        ResultCheck1.Text += "Enough Charakters;";
        }
        else
        {
        ResultCheck1.ResetText();
        ResultCheck1.ForeColor = System.Drawing.Color.Red;
        ResultCheck1.Text += " Not enough Charakters;";
        ModPassword[0]++;
        }

        if (PasswordUser.Any(char.IsUpper))
        {
        ResultCheck2.ResetText();
        ResultCheck2.ForeColor = System.Drawing.Color.Green;
        ResultCheck2.Text += "Capital Letter(s);";
        }
        else
        {
        ResultCheck2.ResetText();
        ResultCheck2.ForeColor = System.Drawing.Color.Red;
        ResultCheck2.Text += "Has no Capital Letter(s);";
        ModPassword[1]++;
        }

        if (PasswordUser.Any(char.IsLower))
        {
        ResultCheck3.ResetText();
        ResultCheck3.ForeColor = System.Drawing.Color.Green;
        ResultCheck3.Text += "Low Letter(s)";
        }
        else
        {
        ResultCheck3.ResetText();
        ResultCheck3.ForeColor = System.Drawing.Color.Red;
        ResultCheck3.Text += "Has no low Letter(s)";
        ModPassword[2]++;
        }

        if (PasswordUser.Any(char.IsDigit))
        {
        ResultCheck4.ResetText();
        ResultCheck4.ForeColor = System.Drawing.Color.Green;
        ResultCheck4.Text += "Has a Number(s)";
        }
        else
        {
        ResultCheck4.ResetText();
        ResultCheck4.ForeColor = System.Drawing.Color.Red;
        ResultCheck4.Text += "Has no Number(s)";
        ModPassword[3]++;
        }

        if (PasswordUser.Contains("!"))
        {
        ResultCheck5.ResetText();
        ResultCheck5.ForeColor = System.Drawing.Color.Green;
        ResultCheck5.Text += "Has a !";
        }
        else
        {
        ResultCheck5.ResetText();
        ResultCheck5.ForeColor = System.Drawing.Color.Red;
        ResultCheck5.Text += "Has no !";
        ModPassword[4]++;
        }

        string newPsw = PasswordUser;
        string newPsw2 = "";
        string newPsw3 = "";
        string newPsw4 = "";
        string newPsw5 = "";
        string newPsw6 = "";
        string newPsw7 = "";
        string newPsw8 = "";
        string newPsw9 = "";
        string newPsw10 = "";
        string newPassword = "";
        string Number = "";
        int count = 0;
        for (int i = 0; i < ModPassword.Length; i++)
        {
        if (ModPassword == 2)
        {

        DerIndex = i;
        switch (i)
        {
        case 0:
        Guid B = Guid.NewGuid();
        string GuidStrings = Convert.ToBase64String(B.ToByteArray());
        GuidStrings = GuidStrings.Replace("=", "");
        GuidStrings = GuidStrings.Replace("+", "");
        newPassword = PasswordUser + GuidStrings;

        break;
        case 1:

        int numUps1 = rnd.Next(1, 11);
        int numUps2 = rnd.Next(1, numUps1);

        for (i

        OriginalGriffO Offline
        OriginalGriffO Offline
        OriginalGriff
        wrote on last edited by
        #3

        That's because the indentation is missing: that;'s a secret signal to the compiler to generate spurious errors to prevent your code from ever working until it's actually readable.

        "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!

        "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
        "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

        1 Reply Last reply
        0
        • M Marketing Media Hub

          private void buttonCheck_Click(object sender, EventArgs e)
          {
          int[] ModPassword = { 1, 1, 1, 1, 1};
          int DerIndex;

          Random rnd = new Random();
          ModiPassword.ResetText();
          string PasswordUser = BoxPassword.Text;

          if (PasswordUser.Length >= 10)
          {
          ResultCheck1.ResetText();
          ResultCheck1.ForeColor = System.Drawing.Color.Green;
          ResultCheck1.Text += "Enough Charakters;";
          }
          else
          {
          ResultCheck1.ResetText();
          ResultCheck1.ForeColor = System.Drawing.Color.Red;
          ResultCheck1.Text += " Not enough Charakters;";
          ModPassword[0]++;
          }

          if (PasswordUser.Any(char.IsUpper))
          {
          ResultCheck2.ResetText();
          ResultCheck2.ForeColor = System.Drawing.Color.Green;
          ResultCheck2.Text += "Capital Letter(s);";
          }
          else
          {
          ResultCheck2.ResetText();
          ResultCheck2.ForeColor = System.Drawing.Color.Red;
          ResultCheck2.Text += "Has no Capital Letter(s);";
          ModPassword[1]++;
          }

          if (PasswordUser.Any(char.IsLower))
          {
          ResultCheck3.ResetText();
          ResultCheck3.ForeColor = System.Drawing.Color.Green;
          ResultCheck3.Text += "Low Letter(s)";
          }
          else
          {
          ResultCheck3.ResetText();
          ResultCheck3.ForeColor = System.Drawing.Color.Red;
          ResultCheck3.Text += "Has no low Letter(s)";
          ModPassword[2]++;
          }

          if (PasswordUser.Any(char.IsDigit))
          {
          ResultCheck4.ResetText();
          ResultCheck4.ForeColor = System.Drawing.Color.Green;
          ResultCheck4.Text += "Has a Number(s)";
          }
          else
          {
          ResultCheck4.ResetText();
          ResultCheck4.ForeColor = System.Drawing.Color.Red;
          ResultCheck4.Text += "Has no Number(s)";
          ModPassword[3]++;
          }

          if (PasswordUser.Contains("!"))
          {
          ResultCheck5.ResetText();
          ResultCheck5.ForeColor = System.Drawing.Color.Green;
          ResultCheck5.Text += "Has a !";
          }
          else
          {
          ResultCheck5.ResetText();
          ResultCheck5.ForeColor = System.Drawing.Color.Red;
          ResultCheck5.Text += "Has no !";
          ModPassword[4]++;
          }

          string newPsw = PasswordUser;
          string newPsw2 = "";
          string newPsw3 = "";
          string newPsw4 = "";
          string newPsw5 = "";
          string newPsw6 = "";
          string newPsw7 = "";
          string newPsw8 = "";
          string newPsw9 = "";
          string newPsw10 = "";
          string newPassword = "";
          string Number = "";
          int count = 0;
          for (int i = 0; i < ModPassword.Length; i++)
          {
          if (ModPassword == 2)
          {

          DerIndex = i;
          switch (i)
          {
          case 0:
          Guid B = Guid.NewGuid();
          string GuidStrings = Convert.ToBase64String(B.ToByteArray());
          GuidStrings = GuidStrings.Replace("=", "");
          GuidStrings = GuidStrings.Replace("+", "");
          newPassword = PasswordUser + GuidStrings;

          break;
          case 1:

          int numUps1 = rnd.Next(1, 11);
          int numUps2 = rnd.Next(1, numUps1);

          for (i

          H Offline
          H Offline
          honey the codewitch
          wrote on last edited by
          #4

          STOP POSTING THIS HERE. READ THE TOP OF THE FORUM. REPORTED

          Real programmers use butterflies

          1 Reply Last reply
          0
          • M Marketing Media Hub

            private void buttonCheck_Click(object sender, EventArgs e)
            {
            int[] ModPassword = { 1, 1, 1, 1, 1};
            int DerIndex;

            Random rnd = new Random();
            ModiPassword.ResetText();
            string PasswordUser = BoxPassword.Text;

            if (PasswordUser.Length >= 10)
            {
            ResultCheck1.ResetText();
            ResultCheck1.ForeColor = System.Drawing.Color.Green;
            ResultCheck1.Text += "Enough Charakters;";
            }
            else
            {
            ResultCheck1.ResetText();
            ResultCheck1.ForeColor = System.Drawing.Color.Red;
            ResultCheck1.Text += " Not enough Charakters;";
            ModPassword[0]++;
            }

            if (PasswordUser.Any(char.IsUpper))
            {
            ResultCheck2.ResetText();
            ResultCheck2.ForeColor = System.Drawing.Color.Green;
            ResultCheck2.Text += "Capital Letter(s);";
            }
            else
            {
            ResultCheck2.ResetText();
            ResultCheck2.ForeColor = System.Drawing.Color.Red;
            ResultCheck2.Text += "Has no Capital Letter(s);";
            ModPassword[1]++;
            }

            if (PasswordUser.Any(char.IsLower))
            {
            ResultCheck3.ResetText();
            ResultCheck3.ForeColor = System.Drawing.Color.Green;
            ResultCheck3.Text += "Low Letter(s)";
            }
            else
            {
            ResultCheck3.ResetText();
            ResultCheck3.ForeColor = System.Drawing.Color.Red;
            ResultCheck3.Text += "Has no low Letter(s)";
            ModPassword[2]++;
            }

            if (PasswordUser.Any(char.IsDigit))
            {
            ResultCheck4.ResetText();
            ResultCheck4.ForeColor = System.Drawing.Color.Green;
            ResultCheck4.Text += "Has a Number(s)";
            }
            else
            {
            ResultCheck4.ResetText();
            ResultCheck4.ForeColor = System.Drawing.Color.Red;
            ResultCheck4.Text += "Has no Number(s)";
            ModPassword[3]++;
            }

            if (PasswordUser.Contains("!"))
            {
            ResultCheck5.ResetText();
            ResultCheck5.ForeColor = System.Drawing.Color.Green;
            ResultCheck5.Text += "Has a !";
            }
            else
            {
            ResultCheck5.ResetText();
            ResultCheck5.ForeColor = System.Drawing.Color.Red;
            ResultCheck5.Text += "Has no !";
            ModPassword[4]++;
            }

            string newPsw = PasswordUser;
            string newPsw2 = "";
            string newPsw3 = "";
            string newPsw4 = "";
            string newPsw5 = "";
            string newPsw6 = "";
            string newPsw7 = "";
            string newPsw8 = "";
            string newPsw9 = "";
            string newPsw10 = "";
            string newPassword = "";
            string Number = "";
            int count = 0;
            for (int i = 0; i < ModPassword.Length; i++)
            {
            if (ModPassword == 2)
            {

            DerIndex = i;
            switch (i)
            {
            case 0:
            Guid B = Guid.NewGuid();
            string GuidStrings = Convert.ToBase64String(B.ToByteArray());
            GuidStrings = GuidStrings.Replace("=", "");
            GuidStrings = GuidStrings.Replace("+", "");
            newPassword = PasswordUser + GuidStrings;

            break;
            case 1:

            int numUps1 = rnd.Next(1, 11);
            int numUps2 = rnd.Next(1, numUps1);

            for (i

            Greg UtasG Offline
            Greg UtasG Offline
            Greg Utas
            wrote on last edited by
            #5

            You are a student. A team leader, even a junior programmer, would know how to debug!

            Robust Services Core | Software Techniques for Lemmings | Articles
            The fox knows many things, but the hedgehog knows one big thing.

            <p><a href="https://github.com/GregUtas/robust-services-core/blob/master/README.md">Robust Services Core</a>
            <em>The fox knows many things, but the hedgehog knows one big thing.</em></p>

            1 Reply Last reply
            0
            • M Marketing Media Hub

              private void buttonCheck_Click(object sender, EventArgs e)
              {
              int[] ModPassword = { 1, 1, 1, 1, 1};
              int DerIndex;

              Random rnd = new Random();
              ModiPassword.ResetText();
              string PasswordUser = BoxPassword.Text;

              if (PasswordUser.Length >= 10)
              {
              ResultCheck1.ResetText();
              ResultCheck1.ForeColor = System.Drawing.Color.Green;
              ResultCheck1.Text += "Enough Charakters;";
              }
              else
              {
              ResultCheck1.ResetText();
              ResultCheck1.ForeColor = System.Drawing.Color.Red;
              ResultCheck1.Text += " Not enough Charakters;";
              ModPassword[0]++;
              }

              if (PasswordUser.Any(char.IsUpper))
              {
              ResultCheck2.ResetText();
              ResultCheck2.ForeColor = System.Drawing.Color.Green;
              ResultCheck2.Text += "Capital Letter(s);";
              }
              else
              {
              ResultCheck2.ResetText();
              ResultCheck2.ForeColor = System.Drawing.Color.Red;
              ResultCheck2.Text += "Has no Capital Letter(s);";
              ModPassword[1]++;
              }

              if (PasswordUser.Any(char.IsLower))
              {
              ResultCheck3.ResetText();
              ResultCheck3.ForeColor = System.Drawing.Color.Green;
              ResultCheck3.Text += "Low Letter(s)";
              }
              else
              {
              ResultCheck3.ResetText();
              ResultCheck3.ForeColor = System.Drawing.Color.Red;
              ResultCheck3.Text += "Has no low Letter(s)";
              ModPassword[2]++;
              }

              if (PasswordUser.Any(char.IsDigit))
              {
              ResultCheck4.ResetText();
              ResultCheck4.ForeColor = System.Drawing.Color.Green;
              ResultCheck4.Text += "Has a Number(s)";
              }
              else
              {
              ResultCheck4.ResetText();
              ResultCheck4.ForeColor = System.Drawing.Color.Red;
              ResultCheck4.Text += "Has no Number(s)";
              ModPassword[3]++;
              }

              if (PasswordUser.Contains("!"))
              {
              ResultCheck5.ResetText();
              ResultCheck5.ForeColor = System.Drawing.Color.Green;
              ResultCheck5.Text += "Has a !";
              }
              else
              {
              ResultCheck5.ResetText();
              ResultCheck5.ForeColor = System.Drawing.Color.Red;
              ResultCheck5.Text += "Has no !";
              ModPassword[4]++;
              }

              string newPsw = PasswordUser;
              string newPsw2 = "";
              string newPsw3 = "";
              string newPsw4 = "";
              string newPsw5 = "";
              string newPsw6 = "";
              string newPsw7 = "";
              string newPsw8 = "";
              string newPsw9 = "";
              string newPsw10 = "";
              string newPassword = "";
              string Number = "";
              int count = 0;
              for (int i = 0; i < ModPassword.Length; i++)
              {
              if (ModPassword == 2)
              {

              DerIndex = i;
              switch (i)
              {
              case 0:
              Guid B = Guid.NewGuid();
              string GuidStrings = Convert.ToBase64String(B.ToByteArray());
              GuidStrings = GuidStrings.Replace("=", "");
              GuidStrings = GuidStrings.Replace("+", "");
              newPassword = PasswordUser + GuidStrings;

              break;
              case 1:

              int numUps1 = rnd.Next(1, 11);
              int numUps2 = rnd.Next(1, numUps1);

              for (i

              Mike HankeyM Offline
              Mike HankeyM Offline
              Mike Hankey
              wrote on last edited by
              #6

              Line 42

              The less you need, the more you have. Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load? JaxCoder.com

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups