Ejemplo n.º 1
0
        private async void BtnGetChapter_ClickAsync(object sender, EventArgs e)
        {
            btnGetChapter.Enabled = false;
            var titleUrl = cbTitleUrl.Text;

            try
            {
                await Presenter.GetChapterListAsync(titleUrl, checkBoxForPrefix.Checked);
            }
            catch (OperationCanceledException ex)
            {
                txtMessage.Text = @"Download cancelled! Reason: " + ex.Message;
            }
            catch (Exception ex)
            {
                Logger.Error(ex);
                txtMessage.Text = @"Download cancelled! Reason: " + ex.Message;
                MessageBox.Show(ex.Message, ex.Source, MessageBoxButtons.OK, MessageBoxIcon.Information);
                btnGetChapter.Enabled = true;
                btnDownload.Enabled   = true;
            }
        }