static public bool checkDay(ZodiacHouse janmaRasi, Basics.Weekday wd) { ZodiacHouse.Name ja = janmaRasi.value; Basics.Weekday gh = Basics.Weekday.Sunday; switch (ja) { case ZodiacHouse.Name.Ari: gh = Basics.Weekday.Sunday; break; case ZodiacHouse.Name.Tau: gh = Basics.Weekday.Saturday; break; case ZodiacHouse.Name.Gem: gh = Basics.Weekday.Monday; break; case ZodiacHouse.Name.Can: gh = Basics.Weekday.Wednesday; break; case ZodiacHouse.Name.Leo: gh = Basics.Weekday.Saturday; break; case ZodiacHouse.Name.Vir: gh = Basics.Weekday.Saturday; break; case ZodiacHouse.Name.Lib: gh = Basics.Weekday.Thursday; break; case ZodiacHouse.Name.Sco: gh = Basics.Weekday.Friday; break; case ZodiacHouse.Name.Sag: gh = Basics.Weekday.Friday; break; case ZodiacHouse.Name.Cap: gh = Basics.Weekday.Tuesday; break; case ZodiacHouse.Name.Aqu: gh = Basics.Weekday.Thursday; break; case ZodiacHouse.Name.Pis: gh = Basics.Weekday.Friday; break; } return(wd == gh); }
public void OnRecalculate(Object o) { Division dtype = new Division(Basics.DivisionType.Rasi); BodyPosition l1 = h.getPosition(Body.Name.Lagna); BodyPosition l2 = h2.getPosition(Body.Name.Lagna); BodyPosition m1 = h.getPosition(Body.Name.Moon); BodyPosition m2 = h2.getPosition(Body.Name.Moon); ZodiacHouse z1 = m1.toDivisionPosition(dtype).zodiac_house; ZodiacHouse z2 = m2.toDivisionPosition(dtype).zodiac_house; Nakshatra n1 = m1.longitude.toNakshatra(); Nakshatra n2 = m2.longitude.toNakshatra(); this.lView.Items.Clear(); { ListViewItem li = new ListViewItem("Nakshatra Yoni"); li.SubItems.Add(KutaNakshatraYoni.getType(n1).ToString() + " (" + KutaNakshatraYoni.getSex(n1).ToString() + ")"); li.SubItems.Add(KutaNakshatraYoni.getType(n2).ToString() + " (" + KutaNakshatraYoni.getSex(n2).ToString() + ")"); lView.Items.Add(li); } { ListViewItem li = new ListViewItem("Rasi Yoni"); li.SubItems.Add(KutaRasiYoni.getType(z1).ToString()); li.SubItems.Add(KutaRasiYoni.getType(z2).ToString()); lView.Items.Add(li); } { ListViewItem li = new ListViewItem("Varna"); li.SubItems.Add(KutaVarna.getType(n1).ToString()); li.SubItems.Add(KutaVarna.getType(n2).ToString()); li.SubItems.Add(KutaVarna.getScore(n1, n2).ToString() + "/" + KutaVarna.getMaxScore().ToString()); lView.Items.Add(li); } { ListViewItem li = new ListViewItem("Gana (Chandra)"); li.SubItems.Add(KutaGana.getType(n1).ToString()); li.SubItems.Add(KutaGana.getType(n2).ToString()); li.SubItems.Add(KutaGana.getScore(n1, n2).ToString() + "/" + KutaGana.getMaxScore().ToString()); lView.Items.Add(li); } { ListViewItem li = new ListViewItem("Gana (Lagna)"); li.SubItems.Add(KutaGana.getType(l1.longitude.toNakshatra()).ToString()); li.SubItems.Add(KutaGana.getType(l2.longitude.toNakshatra()).ToString()); li.SubItems.Add(KutaGana.getScore(l1.longitude.toNakshatra(), l2.longitude.toNakshatra()).ToString() + "/" + KutaGana.getMaxScore().ToString()); lView.Items.Add(li); } { ListViewItem li = new ListViewItem("Vedha"); li.SubItems.Add(KutaVedha.getType(n1).ToString()); li.SubItems.Add(KutaVedha.getType(n2).ToString()); li.SubItems.Add(KutaVedha.getScore(n1, n2).ToString() + "/" + KutaVedha.getMaxScore().ToString()); lView.Items.Add(li); } { ListViewItem li = new ListViewItem("Rajju"); li.SubItems.Add(KutaRajju.getType(n1).ToString()); li.SubItems.Add(KutaRajju.getType(n2).ToString()); li.SubItems.Add(KutaRajju.getScore(n1, n2).ToString() + "/" + KutaRajju.getMaxScore().ToString()); lView.Items.Add(li); } { ListViewItem li = new ListViewItem("Nadi"); li.SubItems.Add(KutaNadi.getType(n1).ToString()); li.SubItems.Add(KutaNadi.getType(n2).ToString()); li.SubItems.Add(KutaNadi.getScore(n1, n2).ToString() + "/" + KutaNadi.getMaxScore().ToString()); lView.Items.Add(li); } { ListViewItem li = new ListViewItem("Gotra (TD:Abhi)"); li.SubItems.Add(KutaGotra.getType(n1).ToString()); li.SubItems.Add(KutaGotra.getType(n2).ToString()); li.SubItems.Add(KutaGotra.getScore(n1, n2).ToString() + "/" + KutaGotra.getMaxScore().ToString()); lView.Items.Add(li); } { ListViewItem li = new ListViewItem("Vihanga"); li.SubItems.Add(KutaVihanga.getType(n1).ToString()); li.SubItems.Add(KutaVihanga.getType(n2).ToString()); li.SubItems.Add(KutaVihanga.getDominator(n1, n2).ToString()); lView.Items.Add(li); } { ListViewItem li = new ListViewItem("Bhuta (Nakshatra)"); li.SubItems.Add(KutaBhutaNakshatra.getType(n1).ToString()); li.SubItems.Add(KutaBhutaNakshatra.getType(n2).ToString()); li.SubItems.Add(KutaBhutaNakshatra.getScore(n1, n2).ToString() + "/" + KutaBhutaNakshatra.getMaxScore().ToString()); lView.Items.Add(li); } { ListViewItem li = new ListViewItem("Ghataka (Moon)"); ZodiacHouse ja = h.getPosition(Body.Name.Moon).toDivisionPosition(dtype).zodiac_house; ZodiacHouse ch = h2.getPosition(Body.Name.Moon).toDivisionPosition(dtype).zodiac_house; bool isGhataka = GhatakaMoon.checkGhataka(ja, ch); li.SubItems.Add(ja.ToString()); li.SubItems.Add(ch.ToString()); li.SubItems.Add(getGhatakaString(isGhataka)); lView.Items.Add(li); } { ListViewItem li = new ListViewItem("Ghataka (Tithi)"); ZodiacHouse ja = h.getPosition(Body.Name.Moon).toDivisionPosition(dtype).zodiac_house; Longitude ltithi = h2.getPosition(Body.Name.Moon).longitude.sub(h2.getPosition(Body.Name.Sun).longitude); Tithi t = ltithi.toTithi(); bool isGhataka = GhatakaTithi.checkTithi(ja, t); li.SubItems.Add(ja.ToString()); li.SubItems.Add(t.ToString()); li.SubItems.Add(getGhatakaString(isGhataka)); lView.Items.Add(li); } { ListViewItem li = new ListViewItem("Ghataka (Day)"); ZodiacHouse ja = h.getPosition(Body.Name.Moon).toDivisionPosition(dtype).zodiac_house; Basics.Weekday wd = h2.wday; bool isGhataka = GhatakaDay.checkDay(ja, wd); li.SubItems.Add(ja.ToString()); li.SubItems.Add(wd.ToString()); li.SubItems.Add(getGhatakaString(isGhataka)); lView.Items.Add(li); } { ListViewItem li = new ListViewItem("Ghataka (Star)"); ZodiacHouse ja = h.getPosition(Body.Name.Moon).toDivisionPosition(dtype).zodiac_house; Nakshatra na = h2.getPosition(Body.Name.Moon).longitude.toNakshatra(); bool isGhataka = GhatakaStar.checkStar(ja, na); li.SubItems.Add(ja.ToString()); li.SubItems.Add(na.ToString()); li.SubItems.Add(getGhatakaString(isGhataka)); lView.Items.Add(li); } { ListViewItem li = new ListViewItem("Ghataka Lagna(S)"); ZodiacHouse ja = h.getPosition(Body.Name.Moon).toDivisionPosition(dtype).zodiac_house; ZodiacHouse sa = h2.getPosition(Body.Name.Lagna).toDivisionPosition(dtype).zodiac_house; bool isGhataka = GhatakaLagnaSame.checkLagna(ja, sa); li.SubItems.Add(ja.ToString()); li.SubItems.Add(sa.ToString()); li.SubItems.Add(getGhatakaString(isGhataka)); lView.Items.Add(li); } { ListViewItem li = new ListViewItem("Ghataka Lagna(O)"); ZodiacHouse ja = h.getPosition(Body.Name.Moon).toDivisionPosition(dtype).zodiac_house; ZodiacHouse op = h2.getPosition(Body.Name.Lagna).toDivisionPosition(dtype).zodiac_house; bool isGhataka = GhatakaLagnaOpp.checkLagna(ja, op); li.SubItems.Add(ja.ToString()); li.SubItems.Add(op.ToString()); li.SubItems.Add(getGhatakaString(isGhataka)); lView.Items.Add(li); } this.ColorAndFontRows(this.lView); }