Ejemplo n.º 1
0
 private void bgw1_DoWork(object sender, DoWorkEventArgs e)
 {
     DataGetter dg = new DataGetter();
     if (MainForm.selectedIndex > -1)
     {
         if (MainForm.selectedIndex == 0)
         {
             cln1Day = cln1.SelectionStart.Day; cln2Day = cln2.SelectionStart.Day;
             cln1Month = cln1.SelectionStart.Month; cln2Month = cln2.SelectionStart.Month;
             cln1Year = cln1.SelectionStart.Year; cln2Year = cln2.SelectionStart.Year;
             histdata1 = dg.getHistoryData(Constants.makeMariborHistory(cln1Year,cln1Month,cln1Day));
             histdata2 = dg.getHistoryData(Constants.makeMariborHistory(cln2Year, cln2Month, cln2Day));
         }
         else
         {
             cln1Day = cln1.SelectionStart.Day; cln2Day = cln2.SelectionStart.Day;
             cln1Month = cln1.SelectionStart.Month; cln2Month = cln2.SelectionStart.Month;
             cln1Year = cln1.SelectionStart.Year; cln2Year = cln2.SelectionStart.Year;
             histdata1 = dg.getHistoryData(Constants.makeIstanbulHistory(cln1Year, cln1Month, cln1Day));
             histdata2 = dg.getHistoryData(Constants.makeIstanbulHistory(cln2Year, cln2Month, cln2Day));
         }
     }
 }
Ejemplo n.º 2
0
 private void bgwSunMoon_DoWork(object sender, DoWorkEventArgs e)
 {
     DataGetter dg = new DataGetter();
     int selectedIndex = (int)e.Argument;
     if (selectedIndex > -1)
     {
         if (selectedIndex == 0)
         {
             sunmoon = dg.getSunMoonData(Constants.MARIBOR_SUN_MOON);
         }
         else
         {
             sunmoon = dg.getSunMoonData(Constants.ISTANBUL_SUN_MOON);
         }
     }
 }
Ejemplo n.º 3
0
 private void bgwSatellite_DoWork(object sender, DoWorkEventArgs e)
 {
     DataGetter dg = new DataGetter();
     int selectedIndex = (int)e.Argument;
     if (selectedIndex > -1)
     {
         if (selectedIndex == 0)
         {
             satellite = dg.getMariborSatelliteImage();
         }
         else
         {
             satellite = dg.getIstanbulSatelliteImage();
         }
     }
 }
Ejemplo n.º 4
0
 private void bgwRadar_DoWork(object sender, DoWorkEventArgs e)
 {
     DataGetter dg = new DataGetter();
     int selectedIndex = (int) e.Argument;
     if (selectedIndex > -1)
     {
         if (selectedIndex == 0)
         {
             radar = dg.getMariborRadarImage();
         }
         else
         {
             radar = dg.getIstanbulRadarImage();
         }
     }
 }
Ejemplo n.º 5
0
 private void bgwCurrent_DoWork(object sender, DoWorkEventArgs e)
 {
     DataGetter dg = new DataGetter();
     int selectedIndex = (int)e.Argument;
     if (selectedIndex > -1)
     {
         if (selectedIndex == 0)
         {
             currentData = dg.getCurrentData(Constants.MARIBOR_CURRENT_URL);
             weathericon = dg.getImage(currentData.current_observation.icon_url);
         }
         else
         {
             currentData = dg.getCurrentData(Constants.ISTANBUL_CURRENT_URL);
             weathericon = dg.getImage(currentData.current_observation.icon_url);
         }
     }
 }
Ejemplo n.º 6
0
 private void bgwCombined_DoWork(object sender, DoWorkEventArgs e)
 {
     DataGetter dg = new DataGetter();
     int selectedIndex = (int)e.Argument;
     if (selectedIndex > -1)
     {
         if (selectedIndex == 0)
         {
             combined = dg.getMariborCombinedImage();
         }
         else
         {
             combined = dg.getIstanbulCombinedImage();
         }
     }
 }