public MainWindow() { InitializeComponent(); root = MainWindowController.AccessDatabase(); BuildClassTable(); }
private void btn_open_Click(object sender, EventArgs e) { //opens a window to select a new file to open OpenFileDialog openFile = new OpenFileDialog(); openFile.InitialDirectory = @"C:\ClassRobot\"; openFile.RestoreDirectory = true; openFile.Filter = "json files (*.json)|*.json"; openFile.Title = "Select Class File"; openFile.Multiselect = false; if (openFile.ShowDialog() == DialogResult.OK) { string location = openFile.FileName; root = null; root = MainWindowController.AccessDatabase(location); BuildClassTable(); } }