Esempio n. 1
0
        private void btnCreatePass_Click(object sender, RoutedEventArgs e)
        {
            List <PassWord> pwlist = new List <PassWord>();
            PassWord        pw     = new PassWord();

            pw.Pass    = txbPass.Text;
            pw.Service = txbService.Text;
            pwlist.Add(pw);
        }
Esempio n. 2
0
        public void ReadFrom()
        {
            List <PassWord> pwlist = new List <PassWord>();
            PassWord        pw     = new PassWord();
            StreamReader    read   = null;

            read = new StreamReader(File.Open(mydocpath, FileMode.Open));
            try
            {
                while (!read.EndOfStream)
                {
                    pw.Pass    = read.ReadLine();
                    pw.Service = read.ReadLine();
                    pwlist.Add(pw);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            finally {
                read.Close();
            }
        }
Esempio n. 3
0
 public void WriteTo(PassWord pass)
 {
     mydocpath = Path.Combine(mydocpath, folder);
     StreamWriter    write  = new StreamWriter(File.Open(mydocpath, FileMode.OpenOrCreate));
     List <PassWord> passes = new List <PassWord>();
 }