private void addReference(object sender, System.EventArgs e) { if (model.FileName.Length > 0) { OpenFileDialog openFileDialog1 = new OpenFileDialog(); openFileDialog1.Filter = "NitroGen Files (*.NitroGen)|*.NitroGen"; openFileDialog1.FilterIndex = 2; openFileDialog1.RestoreDirectory = true; if (openFileDialog1.ShowDialog() == DialogResult.OK) { model.AddReference( PathConverter.GetRelativePath( openFileDialog1.FileName, model.FileName)); } refreshTree(); } }