Beispiel #1
0
      private async void MainForm_Load(object sender, EventArgs e) {
         try {
            using(var objProvider = new BankProvider()) {
               var objLoadingForm = new LoadingForm();
               objLoadingForm.MdiParent = this;
               objLoadingForm.Show();

               await objProvider.LoadCurrencyRateInfo();
               objLoadingForm.Close();
            }
            var objGmapForm = new GmapForm();
            objGmapForm.MdiParent = this;
            googleMapToolStripMenuItem.Enabled = true;
            loadGoogleMapToolStripMenuItem.Enabled = true;
            objGmapForm.Show();
         }
         catch(Exception ex) {
            MessageBox.Show(ex.Message);
         }
      }
Beispiel #2
0
        private async void MainForm_Load(object sender, EventArgs e)
        {
            try {
                using (var objProvider = new BankProvider()) {
                    var objLoadingForm = new LoadingForm();
                    objLoadingForm.MdiParent = this;
                    objLoadingForm.Show();

                    await objProvider.LoadCurrencyRateInfo();

                    objLoadingForm.Close();
                }
                var objGmapForm = new GmapForm();
                objGmapForm.MdiParent = this;
                googleMapToolStripMenuItem.Enabled     = true;
                loadGoogleMapToolStripMenuItem.Enabled = true;
                objGmapForm.Show();
            }
            catch (Exception ex) {
                MessageBox.Show(ex.Message);
            }
        }