Exemplo n.º 1
0
        /// <summary>
        /// Display the star's details
        /// </summary>
        private void displayFromStar()
        {
            txtName.Text      = this.ourSystem.sysStars[this.starID].name;
            numInitMass.Value = (decimal)this.ourSystem.sysStars[this.starID].initMass;
            numCurrMass.Value = (decimal)this.ourSystem.sysStars[this.starID].currMass;

            txtInitLumin.Text = this.ourSystem.sysStars[this.starID].initLumin.ToString();
            txtCurrLumin.Text = this.ourSystem.sysStars[this.starID].currLumin.ToString();
            txtEffTemp.Text   = this.ourSystem.sysStars[this.starID].effTemp.ToString();

            createAcceptRanges(this.ourSystem.sysStars[this.starID].currLumin, this.ourSystem.sysStars[this.starID].effTemp);

            numAge.Value = (decimal)this.ourSystem.sysStars[this.starID].starAge;
            if ((double)numCurrMass.Value > .525)
            {
                chkFlareStar.Enabled = false;
            }

            if (this.ourSystem.sysStars[this.starID].isFlareStar)
            {
                chkFlareStar.Checked = true;
            }

            txtOrbitalParent.Text = this.ourSystem.sysStars[this.starID].parentName;
            txtRadius.Text        = this.ourSystem.sysStars[this.starID].orbitalRadius.ToString();
            numEccent.Value       = (decimal)this.ourSystem.sysStars[this.starID].orbitalEccent;

            lblStellarColor.Text = "Stellar Color: " + this.ourSystem.sysStars[this.starID].starColor;

            this.currAgeStatus   = this.ourSystem.sysStars[this.starID].evoLine.findCurrentAgeGroup((double)numAge.Value);
            lblCurrentStage.Text = "Current Status: " + StarAgeLine.descBranch(this.currAgeStatus);

            //MessageBox.Show(Star.getRadius(this.ourSystem.sysStars[this.starID].currMass, this.ourSystem.sysStars[this.starID].effTemp, this.ourSystem.sysStars[this.starID].currLumin, this.currAgeStatus).ToString());
            lblStellarRadius.Text  = "Star Radius: " + this.ourSystem.sysStars[this.starID].radius + " AU";
            lblInnerFormation.Text = "Inner Radius of Formation Zone: " + Star.innerRadius(this.ourSystem.sysStars[this.starID].initLumin, this.ourSystem.sysStars[this.starID].initMass) + " AU";
            lblOuterFormation.Text = "Outer Radius of Formation Zone: " + Star.outerRadius(this.ourSystem.sysStars[this.starID].initMass) + " AU";
            lblSnowLine.Text       = "Snow Line: " + Star.snowLine(this.ourSystem.sysStars[this.starID].initLumin) + " AU";

            lblPeriapsis.Text = "Periapsis: " + Star.getPeriapsis((double)numEccent.Value, Convert.ToDouble(txtRadius.Text)) + " AU";
            lblApapsis.Text   = "Apapsis: " + Star.getApapsis((double)numEccent.Value, Convert.ToDouble(txtRadius.Text)) + " AU";

            lblEndMain.Text       = "End of Main Sequence: " + this.ourSystem.sysStars[this.starID].evoLine.getMainLimit() + " GYr";
            lblEndSubGiant.Text   = "End of the Sub Giant Sequence: " + this.ourSystem.sysStars[this.starID].evoLine.getSubLimit() + " GYr";
            lblEndGiantPhase.Text = "End of the Giant Phase: " + this.ourSystem.sysStars[this.starID].evoLine.getGiantLimit() + " GYr";

            this.currAgeStatus   = this.ourSystem.sysStars[this.starID].evoLine.findCurrentAgeGroup((double)numAge.Value);
            lblCurrentStage.Text = "Current Status: " + StarAgeLine.descBranch(this.currAgeStatus);
        }