private void LoadStore(string file) { store = new FileStore(); store.Load(file); storePath = file; if(store.Encrypt) { // show password window Password dialog = new Password(); if(dialog.ShowDialog() == DialogResult.OK) { SHA256Managed passwordHash = new SHA256Managed(); store.EncryptionKey = passwordHash.ComputeHash(Encoding.ASCII.GetBytes(dialog.textBox1.Text)); store.Load(file); } } treeView1.Nodes.Clear(); BuildTreeList(null, null); }