示例#1
0
        private void ImportFromFilesLocker_Click(object sender, EventArgs e)
        {
            Util.WTOpenFileDialog FromFile = new Util.WTOpenFileDialog("txt", "");
            FromFile.Multiselect(true);

            if (FromFile.ShowDialog() == DialogResult.OK)
            {
                foreach (String file in FromFile.FileNames())
                {
                    try
                    {
                        if (ImportFromTextLocker(System.IO.File.ReadAllText(file)))
                        {
                            LockerTree.SelectedNode = LockerTree.AllNodes.Last();
                        }
                    }
                    catch (System.IO.IOException)
                    {
                        MessageBox.Show("Unable to read file \"" + file + "\".");
                        continue;
                    }
                }
            }
        }