Ejemplo n.º 1
0
        private void BGWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            button1.Enabled    = true;
            this.returnElement = AgilityParser.Parse(SourceCode);

            foreach (Label lbl in this.groupBox2.Controls.OfType <Label>())
            {
                lbl.Visible = true;
            }

            nameLabel.Text           = returnElement.Name;
            symbolLabel.Text         = returnElement.Symbol;
            ANumberLabel.Text        = returnElement.ANumber;
            AMassLabel.Text          = returnElement.AMass;
            MPLabel.Text             = returnElement.MP;
            BPLabel.Text             = returnElement.BP;
            NoPELabel.Text           = returnElement.NoPE;
            DensityLabel.Text        = returnElement.Density + "³";
            ColorLabel.Text          = returnElement.Color;
            CSLabel.Text             = returnElement.CrystalGeo;
            ClassificationLabel.Text = returnElement.Classification;
            groupBox2.Text           = AOS.Text = string.Format("{0} ({1})", returnElement.Name, returnElement.Symbol.Replace(" ", ""));

            this.IsotopesString         = returnElement.GetIsotopes();
            this.IsotopesButton.Enabled = true;



            pBox.SizeMode = PictureBoxSizeMode.Zoom;
            pBox.Load(returnElement.AtomicStructureImage);
        }
Ejemplo n.º 2
0
        private void BGWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            this.returnElement = AgilityParser.Parse(SourceCode);
            this.toolStripProgressBar1.Value = 100;
            this.toolStripStatusLabel1.Text  = "Ready";

            foreach (Label lbl in this.groupBox2.Controls.OfType <Label>())
            {
                lbl.Visible = true;
            }

            nameLabel.Text           = this.Text = returnElement.Name;
            symbolLabel.Text         = returnElement.Symbol;
            ANumberLabel.Text        = returnElement.ANumber;
            AMassLabel.Text          = returnElement.AMass;
            MPLabel.Text             = returnElement.MP;
            BPLabel.Text             = returnElement.BP;
            NoPELabel.Text           = returnElement.NoPE;
            DensityLabel.Text        = returnElement.Density + "³";
            ColorLabel.Text          = returnElement.Color;
            CSLabel.Text             = returnElement.CrystalGeo;
            ClassificationLabel.Text = returnElement.Classification;
            groupBox2.Text           = string.Format("{0} ({1})", returnElement.Name, returnElement.Symbol.Replace(" ", ""));
        }