Esempio n. 1
0
        private void btnSelectPersonOne_Click(object sender, EventArgs e)
        {
            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                var fullPath = openFileDialog1.FileName;
                txbFile1.Text = Path.GetFileName(fullPath);

                comparison1 = numerologyObject.ReadPersonalData(fullPath);
                ShowComparison1(comparison1);

                var year = GetCmbSelectedValue(cmbYears);
                GetPeakBottom1Values(year, out var peak1, out var bottom1);
                SetPeakBottom1ValuesOnUI(peak1, bottom1);

                if (comparison1 != null && comparison2 != null)
                {
                    // Show working and personal compatibility
                    ShowWorkingPersonalCompatibility(comparison1, comparison2, year);

                    var yearsRelationsStart = GetCmbSelectedValue(cmbYearsRelationsStart);
                    var period = GetCmbSelectedValue(cmbRelationPeriod);
                    if (!ShowEveryDayAndSpiritualityCompatibility(comparison1, comparison2, yearsRelationsStart, period))
                    {
                        MessageBox.Show(evaryDayGraphErrorMsg);
                    }
                }
            }
        }
Esempio n. 2
0
        private void btnSelectPerson_Click(object sender, EventArgs e)
        {
            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                var fullPath = openFileDialog1.FileName;
                txbFile.Text = Path.GetFileName(fullPath);

                comparison = numerologyObject.ReadPersonalData(fullPath);
                var peaks = CalculateLifePeaks(comparison.DOB, CUSTOMER_ESTIMATED_LIFE_EXPECTATION);
                ShowComparison(peaks);
            }
        }
Esempio n. 3
0
        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                try
                {
                    openSaved        = true;
                    numerologyObject = null;
                    InitUI();
                    numerologyObject = InitNumerologyObject();

                    var fullPath = openFileDialog1.FileName;
                    var loaded   = numerologyObject.ReadPersonalData(fullPath);

                    var day   = loaded.DOB.Day;
                    var month = loaded.DOB.Month;
                    var year  = loaded.DOB.Year;

                    cmbDate.SelectedItem   = day;
                    cmbMonth.SelectedValue = month;
                    cmbYear.SelectedItem   = year;

                    var lang = Language.ENG.ToString();
                    if (!string.IsNullOrEmpty(loaded.Language))
                    {
                        lang = loaded.Language;
                    }

                    cmbLang.SelectedItem = lang;
                    txbName.Text         = loaded.Name;
                    txbSurname.Text      = loaded.Surname;

                    HandleLanguagesDifference((Language)Enum.Parse(typeof(Language), lang) == Language.RUS);
                    txbFathersName.Text = loaded.Fathername;

                    if (!CheckDateOfBirth(day, month, year))
                    {
                        MessageBox.Show("Несуществующая комбинация дня,месяца и года.");
                        openSaved = false;
                        return;
                    }
                    numerologyObject.DOBObject.SetDate(day, month, year);
                    //numerologyObject.NameObject.SetName((Language)Enum.Parse(typeof(Language), cmbLang.SelectedItem.ToString()), txbName.Text.Trim(), txbSurname.Text.Trim(), numerologyObject.DOBObject.GetLifeWayNumber);
                    numerologyObject.NameObject.SetName((Language)Enum.Parse(typeof(Language), cmbLang.SelectedItem.ToString()), txbName.Text.Trim(), txbSurname.Text.Trim(), (Language)Enum.Parse(typeof(Language), cmbLang.SelectedItem.ToString()) == Language.RUS ? txbFathersName.Text.Trim() : null, numerologyObject.DOBObject.GetLifeWayNumber);

                    SetDOBValuesToUI();
                    SetNameValuesToUI();
                    SetMatrixIntersection(Matrix.TwoMatrixAnalisys(numerologyObject.DOBObject.DOBMatrix, numerologyObject.NameObject.NameMatrix));
                }
                finally { openSaved = false; }
            }
        }