コード例 #1
0
ファイル: MainForm.cs プロジェクト: zyhong/MobiEPUB
 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);
     }
 }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: Papafox/MobiEPUB
 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);
     }
 }