Ejemplo n.º 1
0
        private ArrayList GetRules(ref bool bSimpleLord)
        {
            bSimpleLord = false;
            switch (this.cbStrength.SelectedIndex)
            {
            case 0:
                bSimpleLord = true;
                return(FindStronger.RulesStrongerCoLord(h));

            case 1:
                return(FindStronger.RulesNaisargikaDasaGraha(h));

            case RVimsottariDasa:
                return(FindStronger.RulesVimsottariGraha(h));

            case RKarakaKendradiGrahaDasa:
                return(FindStronger.RulesKarakaKendradiGrahaDasaGraha(h));

            case RCoLordKarakaKendradiGrahaDasa:
                return(FindStronger.RulesKarakaKendradiGrahaDasaColord(h));

            default:
                return(FindStronger.RulesStrongerCoLord(h));
            }
        }
Ejemplo n.º 2
0
        private ArrayList GetRules()
        {
            switch (this.cbStrength.SelectedIndex)
            {
            case 0:
                return(FindStronger.RulesNarayanaDasaRasi(h));

            case 1:
                return(FindStronger.RulesNaisargikaDasaRasi(h));

            case 2:
                return(FindStronger.RulesMoolaDasaRasi(h));

            case 3:
                return(FindStronger.RulesKarakaKendradiGrahaDasaRasi(h));

            case 4:
                return(FindStronger.RulesNavamsaDasaRasi(h));

            case 5:
                return(FindStronger.RulesJaiminiFirstRasi(h));

            case 6:
                return(FindStronger.RulesJaiminiSecondRasi(h));

            default:
                return(FindStronger.RulesNarayanaDasaRasi(h));
            }
        }
Ejemplo n.º 3
0
        private void Compute()
        {
            this.mList.BeginUpdate();
            this.mList.Clear();

            this.mList.BackColor = Color.AliceBlue;


            this.mList.Columns.Add("Body", -1, System.Windows.Forms.HorizontalAlignment.Left);
            this.mList.Columns.Add("Winner", -1, System.Windows.Forms.HorizontalAlignment.Left);

            int winner = 0;

            if (this.cbRasi1.SelectedIndex < 0)
            {
                this.cbRasi1.SelectedIndex = 0;
            }
            if (this.cbRasi2.SelectedIndex < 0)
            {
                this.cbRasi2.SelectedIndex = 0;
            }

            ZodiacHouse.Name z1 = (ZodiacHouse.Name) this.cbRasi1.SelectedIndex + 1;
            ZodiacHouse.Name z2 = (ZodiacHouse.Name) this.cbRasi2.SelectedIndex + 1;

            ArrayList al = this.GetRules();

            for (int i = 0; i < al.Count; i++)
            {
                ArrayList rule = new ArrayList();
                rule.Add(al[i]);
                FindStronger     fs = new FindStronger(h, options.Division, rule);
                ZodiacHouse.Name zw = fs.StrongerRasi(z1, z2, false, ref winner);
                ListViewItem     li = new ListViewItem();
                li.Text = string.Format("{0}", EnumDescConverter.GetEnumDescription((System.Enum)al[i]));

                if (winner == 0)
                {
                    li.SubItems.Add(string.Format("{0}", zw));
                }

                this.mList.Items.Add(li);
            }

            this.mList.Columns[0].Width = -1;
            this.mList.Columns[1].Width = -2;

            this.mList.EndUpdate();
        }
Ejemplo n.º 4
0
        private void Compute()
        {
            this.mList.BeginUpdate();
            this.mList.Clear();

            this.mList.BackColor = Color.AliceBlue;


            this.mList.Columns.Add("Body", -1, System.Windows.Forms.HorizontalAlignment.Left);
            this.mList.Columns.Add("Winner", -1, System.Windows.Forms.HorizontalAlignment.Left);

            int winner = 0;

            Body.Name b1 = (Body.Name) this.cbGraha1.SelectedIndex;
            Body.Name b2 = (Body.Name) this.cbGraha2.SelectedIndex;

            bool      bSimpleLord = false;
            ArrayList al          = this.GetRules(ref bSimpleLord);

            for (int i = 0; i < al.Count; i++)
            {
                ArrayList rule = new ArrayList();
                rule.Add(al[i]);
                FindStronger fs = new FindStronger(h, options.Division, rule);
                Body.Name    bw = fs.StrongerGraha(b1, b2, bSimpleLord, ref winner);

                ListViewItem li = new ListViewItem();
                li.Text = string.Format("{0}", EnumDescConverter.GetEnumDescription((System.Enum)al[i]));

                if (winner == 0)
                {
                    li.SubItems.Add(Body.toString(bw));
                }

                this.mList.Items.Add(li);
            }

            this.mList.Columns[0].Width = -1;
            this.mList.Columns[1].Width = -2;

            this.mList.EndUpdate();
        }