Exemplo n.º 1
0
        private void lifeCyclesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            LifeCycles lifeCycles = new LifeCycles();

            lifeCycles.WindowState   = FormWindowState.Normal;
            lifeCycles.StartPosition = FormStartPosition.CenterParent;

            lifeCycles.ShowDialog();
        }
Exemplo n.º 2
0
        private LifeCycles GetLifeCycleValue(DateTime dob, int wayOfLife, int year)
        {
            var age1 = year - dob.Year - 1;
            var age2 = age1 + 1;

            var lifeCycles = new LifeCycles();

            lifeCycles.BeforeBirthDay = GetMeaningfullLifeCycleValue(dob, LifeCycleHelper.GetLifeCycleValuePart(wayOfLife, age1));
            lifeCycles.AfterBirthDay  = GetMeaningfullLifeCycleValue(dob, LifeCycleHelper.GetLifeCycleValuePart(wayOfLife, age2));

            return(lifeCycles);
        }
Exemplo n.º 3
0
        private void ShowCycles2(Comparison comparison, int year)
        {
            cycles2 = GetLifeCycleValue(comparison.DOB, comparison.LifeWayNumber, year);

            if (cycles2.BeforeBirthDay != cycles2.AfterBirthDay)
            {
                lblLifeCycleValueBefore2.Text   = cycles2.BeforeBirthDay.ToString();
                lblLifeCycleValue2Slash.Visible = true;
                lblLifeCycleValueAfter2.Visible = true;
                lblLifeCycleValueAfter2.Text    = cycles2.AfterBirthDay.ToString();
            }
            else
            {
                lblLifeCycleValueBefore2.Text   = cycles2.BeforeBirthDay.ToString();
                lblLifeCycleValue2Slash.Visible = false;
                lblLifeCycleValueAfter2.Visible = false;
            }
        }