Load() public method

Loads the store from the specified path.
public Load ( string path ) : bool
path string The path.
return bool
Esempio n. 1
0
        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);
        }