Ejemplo n.º 1
0
        private void Form2_Load(object sender, EventArgs e)
        {
            loadList();

            Console.WriteLine("***** Here for grading only *****");
            foreach (var account in accountList)
            {
                Console.WriteLine(account.IdNumber + "->" + CaesarCipher.decrypt(account.Password, PASS_KEY));
            }
        }
Ejemplo n.º 2
0
        /***************************************************
        * When button is clicked will start a timer for 10 seconds,
        * sets passwords in listBox to be visible
        * *************************************************/
        private void viewPasswordButton_Click(object sender, EventArgs e)
        {
            resultListBox.Items.Clear();

            myTimer.Interval = 10000;                                                                              //for 10 second
            myTimer.Start();                                                                                       //start timer

            string inSite   = siteNameSearchDataTextBox.Text;                                                      //bring in site name
            var    tupleRes = searchDataWork(inSite);                                                              //store if site was found + index location

            if (tupleRes.Item1)                                                                                    //site was found, print info
            {
                resultListBox.Items.Add(accountList[tupleRes.Item2].IdNumber.PadRight(3)                           //print account info
                                        + (accountList[tupleRes.Item2].SiteName.PadRight(10))
                                        + (CaesarCipher.decrypt(accountList[tupleRes.Item2].Password, PASS_KEY))); //show password
            }
        }