コード例 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (CheckAllEnteredValues())
            {
                if (!FarFieldRequestNameMatching(textBoxTitle.Text) || reducting)
                {
                    if (radioButtonType1.Checked)
                    {
                        parentForm.renderControl1.removingArc(templateLable);
                        DrawFarFieldArc(Title);
                    }

                    SaveCurrentParameters();

                    FarFieldRequestTemplate fft = new FarFieldRequestTemplate(this);
                    if (reducting)
                    {
                        parentForm.ChangeFarFieldRequest(parentTemplate.Lable, fft);
                    }
                    else
                    {
                        parentForm.AddFarFieldRequest(fft);
                    }
                    Close();
                }
                else
                {
                    textBoxTitle.BackColor = Color.Red;
                }
            }
        }
コード例 #2
0
        private void LoadParameters(FarFieldRequestTemplate template)
        {
            string format = "0.####";

            loading = true;
            textBoxThetaFinish.Text = Convert.ToString(template.ThetaFinish).Replace(",", ".");
            textBoxThetaStart.Text  = Convert.ToString(template.ThetaStart).Replace(",", ".");
            textBoxPhiStart.Text    = Convert.ToString(template.PhiStart).Replace(",", ".");
            textBoxStep.Text        = Convert.ToString(template.Delta).Replace(",", ".");

            comboBoxDirection.SelectedIndex = comboBoxDirection.FindString(template.Direction);
            textBoxBodyAngle.Text           = template.BodyAngle.ToString(format);
            textBoxBodyAngleStep.Text       = template.BodyAngleStep.ToString(format);

            comboBoxFarFieldSystem.SelectedIndex = template.SystemOfCoordinates;

            checkBoxSolutionA.Checked            = template.AntenaField;
            checkBoxSolutionR.Checked            = template.RadomeField;
            checkBoxSolutionRef.Checked          = template.ReflactedField;
            checkBoxSolutionRefIteration.Checked = template.ReflactedItField;

            textBoxTitle.Text = template.Lable;
            Title             = textBoxTitle.Text;
            loading           = false;

            if (template.FarFieldType == 0)
            {
                radioButtonType1.Checked = true;
            }
            else
            {
                radioButtonType2.Checked = true;
            }
        }
コード例 #3
0
        public FarFieldRequestForm(Form1 ParentForm, FarFieldRequestTemplate ParentTemplate)
        {
            InitializeComponent();
            parentForm     = ParentForm;
            parentTemplate = ParentTemplate;
            LoadParameters(ParentTemplate);

            templateLable = ParentTemplate.Lable;
            reducting     = true;

            Show();
        }
コード例 #4
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (!reducting)
            {
                parentForm.renderControl1.removingArc(templateLable);
            }
            else
            {
                FarFieldRequestTemplate fft = Logic.Instance.Requests.Find(x => x.Lable == templateLable);
                if (fft.FarFieldType == 0)
                {
                    parentForm.renderControl1.removingArc(templateLable);
                    parentForm.renderControl1.Draw(fft.Lable, fft.ThetaStart, fft.ThetaFinish, fft.PhiStart, fft.Delta, fft.SystemOfCoordinates);
                }
                else
                {
                    parentForm.renderControl1.removingArc(templateLable);
                }
            }


            Close();
        }