private void _btnImport1_Click(object sender, EventArgs e) { OpenFileDialog dialog = new OpenFileDialog(); if (dialog.ShowDialog() == DialogResult.OK) { DocumentReader reader = new DocumentReader(_txtPwd.Text); reader.LoadFromFile(dialog.FileName); ClearState state = reader.State; SecurityCenterDocument2 doc2 = new SecurityCenterDocument2(); IterateDoc1Group(doc2, state.ClearGroup); Program.ThePassword = _txtPwd.Text; Program.CurrentDoc = doc2; FormAction.Instance.OnDocLoaded(doc2); FormAction.Instance.OnStateChanged(); } }