예제 #1
0
        private void LoadProject()
        {
            if (Project != null)
            {
                textBox1.Text = Project.ProjectName;
                propertyGrid1.SelectedObject = Project;
                propertyGrid1.ExpandAllGridItems();

                richTextBox1.Text = Project.ToString();


                comboBoxPos.Items.Clear();
                var props = Project.GetType().GetProperties();
                foreach (var p in props)
                {
                    if (p.PropertyType == typeof(List <PosXYZU>))
                    {
                        comboBoxPos.Items.Add(p.Name);
                    }

                    if (p.PropertyType == typeof(List <PosXYZ>))
                    {
                        comboBoxPos.Items.Add(p.Name);
                    }
                }
            }
        }
        private void Display()
        {
            if (Station != null)
            {
                groupBoxStation.Text = $"{Station.Name} {Station.Description}";
            }

            if (!string.IsNullOrEmpty(ProjectFile))
            {
                richTextBoxFile.Text = ProjectFile;
            }

            if (Project != null)
            {
                richTextBoxMprj.Text = Project.ToString();
            }
        }