private void importInputsToolStripMenuItem_Click(object sender, EventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); ofd.CheckFileExists = true; ofd.AutoUpgradeEnabled = true; if (ofd.ShowDialog() == DialogResult.Cancel) { return; } using (FileStream fs = new FileStream(ofd.FileName, FileMode.Open, FileAccess.Read)) { while (fs.Position != fs.Length) { TxOutId txi = TxOutId.FromStream(fs); TxOut txo = TxOut.FromStream(fs); UTXO.Add(txi, txo); } fs.Close(); } updateUTXOList(); }