Exemplo n.º 1
0
        private void UpdateGuiValues(ExperimentXml experiment)
        {
            dataGridView1.Visible      = experiment.IsValid;
            LaserPowerGroupBox.Visible = experiment.IsValid;
            ImageGroupBox.Visible      = experiment.IsValid;
            PmtGainGroupBox.Visible    = experiment.IsValid;
            SettingsGroupBox.Visible   = experiment.IsValid;

            if (experiment.IsValid)
            {
                dataGridView1.DataSource = experiment.GetFrameDataTable();
                foreach (DataGridViewColumn col in dataGridView1.Columns)
                {
                    col.SortMode = DataGridViewColumnSortMode.NotSortable;
                }
                dataGridView1.SelectionMode = DataGridViewSelectionMode.FullColumnSelect;
                dataGridView1.AutoResizeColumns();

                MiraPowerLabel.Text      = experiment.PowerMira.ToString();
                X3FixedPowerLabel.Text   = experiment.PowerX3Fixed.ToString();
                X3TunablePowerLabel.Text = experiment.PowerX3Tunable.ToString();
                ImageWidthLabel.Text     = experiment.PixelsPerLine.ToString();
                ImageHeightLabel.Text    = experiment.LinesPerFrame.ToString();
                ImageScaleLabel.Text     = Math.Round(experiment.MicronsPerPixel, 4).ToString();
                PmtCh1Label.Text         = experiment.PmtGainCh1.ToString();
                PmtCh2Label.Text         = experiment.PmtGainCh2.ToString();
                DwellLabel.Text          = experiment.DwellTime.ToString();
                ZoomLabel.Text           = experiment.OpticalZoom.ToString();
            }
        }
Exemplo n.º 2
0
        private void LoadXmlFile(string filePath)
        {
            filePath = Path.GetFullPath(filePath);
            XmlFilePathLabel.Text = Path.GetDirectoryName(filePath);
            XmlFileNameLabel.Text = Path.GetFileName(filePath);

            var experiment = new ExperimentXml(filePath);

            UpdateGuiValues(experiment);
        }