Exemple #1
0
        private void buttonCalc_Click(object sender, EventArgs e)
        {
            if (theAstrolobe == null)
            {
                theAstrolobe = new Astrolabe("Unknown", utcMoment);
            }
            else if (theAstrolobe.Moment != utcMoment)
            {
                theAstrolobe.Moment = utcMoment;
            }

            theAstrolobe.Calculate();

            if (astrolabeBindingSource.DataSource == null)
            {
                astrolabeBindingSource.DataSource = theAstrolobe.StarPositions.Values;
            }
            else
            {
                astrolabeBindingSource.DataSource = null;
                astrolabeBindingSource.DataSource = theAstrolobe.StarPositions.Values;
                //astrolabeBindingSource.ResetBindings(false);
            }

            this.textBoxRelations.Text = theAstrolobe.PetternDescription;
        }
Exemple #2
0
        private void buttonGo_Click(object sender, EventArgs e)
        {
            //List<PlanetPairAspect> pairs = new List<PlanetPairAspect>();

            //PlanetPairAspect pairAspect = new PlanetPairAspect(utcMoment, interior, exterior);

            //pairs.Add(pairAspect);

            //if (pairAspect.Pattern != AspectType.None)
            //{
            //    AspectHelper foreteller = new AspectHelper(pairAspect.Kind, utcMoment);
            //    DateTime exactMoment = foreteller.GetEventTime();
            //    pairAspect = new PlanetPairAspect(exactMoment, interior, exterior);
            //    pairs.Add(pairAspect);
            //}

            //phenomenonTable = DataTableGenerator.DataTableHelper<PlanetPairAspect>.DataTableOf(pairs);

            if (theAstrolobe == null)
            {
                theAstrolobe = new Astrolabe("Unknown", utcMoment);
            }
            else if (theAstrolobe.Moment != utcMoment)
            {
                theAstrolobe.Moment = utcMoment;
            }

            theAstrolobe.Calculate();

            patternTable = DataTableHelper <Relation> .DataTableOf(theAstrolobe.Patterns.Values);

            dataGridView1.DataSource = patternTable;

            List <Phenomenon> phenomena = theAstrolobe.GetNearbyPhenonema();

            phenomenonTable = DataTableGenerator.DataTableHelper <Phenomenon> .DataTableOf(phenomena);

            dataGridView2.DataSource = phenomenonTable;
        }