private void buttonClicked(object sender, EventArgs e) { SimpleButton sb = sender as SimpleButton; if (System.IO.File.Exists(sb.ToolTip)) { Chapters ch = new Chapters(sb.ToolTip); ch.MdiParent = Globals.mainForm; ch.Show(); } }
private void bbiOpenBook_ItemClick(object sender, ItemClickEventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); ofd.AddExtension = true; ofd.DefaultExt = "ecb"; ofd.Filter = "ECB文件(*.ECB)|*.ECB"; if (ofd.ShowDialog() == DialogResult.OK) { Chapters ch = new Chapters(ofd.FileName); ch.MdiParent = this; ch.Show(); } }
//输入地址 private void barButtonItemInputUri_ItemClick(object sender, ItemClickEventArgs e) { InputIndex ii = new InputIndex(); if (ii.ShowDialog() == DialogResult.OK) { Chapters ch = new Chapters(); ch.Address = ii.BookCatalogUrl; ch.LocalSavedFolder = ii.SelectedFolder; ch.MdiParent = this; ch.Show(); //this.bbiDownloadChapters.Enabled = true; //Globals.SaveSettingToXml(); } else { this.bbiDownloadChapters.Enabled = false; } }