public void SetVedicDate(int gyear, int masa, int tithi)
 {
     keepSycnhro             = false;
     comboBox4.SelectedIndex = GPAppHelper.MasaToComboMasa(masa);
     textBox1.Text           = gyear.ToString();
     comboBox3.SelectedIndex = -1;
     keepSycnhro             = true;
     comboBox3.SelectedIndex = tithi;
 }
 private void WesternChanged()
 {
     if (keepSycnhro)
     {
         int year;
         keepSycnhro = false;
         if (location != null && int.TryParse(textBox1.Text, out year))
         {
             GPVedicTime     va = null;
             GPGregorianTime vc = new GPGregorianTime(location);
             vc.setDate(year, comboBox2.SelectedIndex + 1, comboBox1.SelectedIndex + 1);
             vc.setDayHours(0.0);
             GPEngine.VCTIMEtoVATIME(vc, out va, location);
             comboBox3.SelectedIndex = va.tithi;
             comboBox4.SelectedIndex = GPAppHelper.MasaToComboMasa(va.masa);
             textBox2.Text           = va.gyear.ToString();
         }
         keepSycnhro = true;
     }
 }