Пример #1
0
 private void tsbDownload_Click(object sender, EventArgs e)
 {
     tslMain.Text = "";
     FrmWebDownload frmWebDownload = new FrmWebDownload();
     string uriText = "";
     if (dgvCashAccounts.SelectedRows.Count > 0)
         uriText = BankAccount.DownloadUri(Convert.ToInt32(
             dgvCashAccounts.CurrentRow.Cells["BankAccountID"].Value.ToString()));
     if (dgvCreditAccounts.SelectedRows.Count > 0)
         uriText = BankAccount.DownloadUri(Convert.ToInt32(
             dgvCreditAccounts.CurrentRow.Cells["BankAccountID"].Value.ToString()));
     Uri uri = new Uri(uriText);
     frmWebDownload.wbWebDownload.Url = uri;
     frmWebDownload.WindowState = FormWindowState.Maximized;
     frmWebDownload.MdiParent = this;
     frmWebDownload.Show();
 }
Пример #2
0
 private void NewAccount()
 {
     tslMain.Text = "";
     Uri uri;
     frmWebAddress _frmWebAddress = new frmWebAddress();
     if (_frmWebAddress.ShowDialog() == DialogResult.OK)
     {
         try
         {
             uri = new Uri(_frmWebAddress.tbWebsiteAddress.Text);
             FrmWebDownload frmWebDownload = new FrmWebDownload();
             frmWebDownload.wbWebDownload.Url = uri;
             frmWebDownload.WindowState = FormWindowState.Maximized;
             frmWebDownload.MdiParent = this;
             frmWebDownload.Show();
         }
         catch
         {
             MessageBox.Show("invalid url format");
         }
     }
 }