void HandleImportCommand (object sender, EventArgs e) { db.Sync = false; ImportCommand command = new ImportCommand (main_window); if (command.ImportFromFile (db.Photos, null) > 0) { query.RollSet = new RollSet (db.Rolls.GetRolls (1)[0]); UpdateQuery (); } db.Sync = true; }
public void ImportFile (string path) { ImportCommand command = new ImportCommand (main_window); if (command.ImportFromFile (db.Photos, path) > 0) { query.RollSet = new RollSet (db.Rolls.GetRolls (1)[0]); UpdateQuery (); } }