Exemplo n.º 1
0
 private void Open(string fileName)
 {
     try
     {
         treeView.Nodes.Clear();
         dataGridView.Rows.Clear();
         this.Text = fileName + " - Ego TNG Editor";
         file = new TngFile(File.Open(fileName, FileMode.Open, FileAccess.Read, FileShare.Read));
         file.CreateTreeViewList(treeView);
     }
     catch (Exception ex)
     {
         MessageBox.Show("Failed to open the file: " + Environment.NewLine + Environment.NewLine + ex.Message,
             "Tng Editor", MessageBoxButtons.OK, MessageBoxIcon.Error);
         this.Text = "Ego TNG Editor";
     }
 }