private void openButton_Click(object sender, EventArgs e) { openFileDialog.InitialDirectory = m_Settings.DefaultDir; if (openFileDialog.ShowDialog() == DialogResult.OK) { String filename = openFileDialog.FileName; String ext = Path.GetExtension(filename).ToLower(); if (ext == ".epub") { ebook = new EPUBebook(filename); } if (ext == ".prc") { ebook = new PRCebook(filename); } SelectPanel(documentPanel); documentPanel_Load(sender, e); } }
private void openButton_Click(object sender, EventArgs e) { openFileDialog.InitialDirectory = m_Settings.DefaultDir; if (openFileDialog.ShowDialog() == DialogResult.OK) { String filename = openFileDialog.FileName; String ext = Path.GetExtension(filename).ToLower(); if (ext == ".epub") { ebook = new EPUBebook(filename); } if (ext == ".prc") { ebook = new PRCebook(filename); } SelectPanel(documentPanel); documentPanel_Load(sender, e); } }