public GPVedicTime GetVedicDate() { GPVedicTime va = new GPVedicTime(); va.tithi = comboBox3.SelectedIndex; va.masa = GPAppHelper.ComboMasaToMasa(comboBox4.SelectedIndex); int.TryParse(textBox2.Text, out va.gyear); return(va); }
private void VedicChanged() { if (keepSycnhro) { int gyear; keepSycnhro = false; if (location != null && int.TryParse(textBox2.Text, out gyear)) { GPGregorianTime vc = null; GPVedicTime va = new GPVedicTime(comboBox3.SelectedIndex, GPAppHelper.ComboMasaToMasa(comboBox4.SelectedIndex), gyear); GPEngine.VATIMEtoVCTIME(va, out vc, location); comboBox2.SelectedIndex = vc.getMonth() - 1; textBox1.Text = vc.getYear().ToString(); comboBox1.SelectedIndex = vc.getDay() - 1; } keepSycnhro = true; } }
public DateTimePickerControl() { InitializeComponent(); for (int i = 1; i <= 31; i++) { comboBox1.Items.Add(i); } for (int i = 0; i < 12; i++) { comboBox2.Items.Add(GPAppHelper.getMonthAbr(i + 1)); comboBox4.Items.Add(new GPMasa(GPAppHelper.ComboMasaToMasa(i))); } for (int i = 0; i < 30; i++) { comboBox3.Items.Add(new GPTithi(i, true)); } }