BrrrBayBay.PwmGUIControl.GenericPwmControl.initFrequencyBox C# (CSharp) Метод

initFrequencyBox() приватный Метод

Loads the frequency edit controls
private initFrequencyBox ( int xPos, int yPos ) : void
xPos int The X position where the controls should be placed
yPos int The Y position where the controls should be placed
Результат void
        private void initFrequencyBox(int xPos, int yPos)
        {
            frequencyLabel = new Label();
            frequencyLabel.Font = new System.Drawing.Font(frequencyLabel.Font.FontFamily, frequencyLabel.Font.Size + 0.4f, System.Drawing.FontStyle.Bold);
            frequencyLabel.Text = "frequency:";
            frequencyLabel.Size = new System.Drawing.Size(75, 16);
            frequencyLabel.Location = new Point(5 , yPos + 1);
            frequencyLabel.Update();
            frequencyLabel.AutoSize = false;

            frequencyBox = new TextBox();
            frequencyBox.Size = new Size(60, 20);
            frequencyBox.Location = new Point(frequencyLabel.Location.X + frequencyLabel.Size.Width + 3, yPos);
            frequencyBox.Text = synchronousPwmFrequency.ToString();
            frequencyBox.TextChanged += new EventHandler(frequencyChangedHandler);
            frequencyBox.KeyDown += new KeyEventHandler(frequencySettings_KeyDown);

            fUnitsBox = new ComboBox();
            fUnitsBox.Size = new Size(45, 21);
            fUnitsBox.Location = new Point(frequencyBox.Location.X + frequencyBox.Size.Width + 3, yPos);
            fUnitsBox.DropDownStyle = ComboBoxStyle.DropDownList;
            fUnitsBox.Items.Add("Hz");
            fUnitsBox.Items.Add("KHz");
            fUnitsBox.Text = "Hz";
            fUnitsBox.SelectedIndexChanged += new EventHandler(frequencyChangedHandler);
            fUnitsBox.KeyDown += new KeyEventHandler(frequencySettings_KeyDown);

            this.Controls.Add(frequencyLabel);
            this.Controls.Add(frequencyBox);
            this.Controls.Add(fUnitsBox);
        }