private void AddAddressControls(String addressline1, String addressline2, String city, String state, String zip)
        {
            PictureBox tbx   = this.Controls.Find("dynamicpbx_chevdown", true).FirstOrDefault() as PictureBox;
            Label      label = this.Controls.Find("dynamiclbl_address", true).FirstOrDefault() as Label;


            if (tbx != null)
            {
                tbx.Dispose();
                label.Dispose();
            }
            this.Size = new Size(627, 470);
            PictureBox pbx = uiBuilder.GeneratePictureBox(17, 293, "dynamicpbx_chevup", Properties.Resources.chevup, 15, 15);

            pbx.Click += new EventHandler(this.RemoveUiClick);
            this.Controls.Add(pbx);
            this.Controls.Add(uiBuilder.GenerateLongTextBox(42, 310, "dynamictxt_addressline1", addressline1));
            this.Controls.Add(uiBuilder.GenerateLongTextBox(330, 310, "dynamictxt_addressline2", addressline2));
            this.Controls.Add(uiBuilder.GenerateShortTextBox(42, 372, "dynamictxt_city", city));
            this.Controls.Add(uiBuilder.GenerateShortTextBox(243, 372, "dynamictxt_state", state));
            this.Controls.Add(uiBuilder.GenerateShortTextBox(451, 372, "dynamictxt_zip", zip));
            this.Controls.Add(uiBuilder.GenerateLabel(40, 293, "dynamiclbl_addressline1", "Address Line 1 "));
            this.Controls.Add(uiBuilder.GenerateLabel(329, 293, "dynamiclbl_addressline2", "Address Line 2 "));
            this.Controls.Add(uiBuilder.GenerateLabel(40, 355, "dynamiclbl_city", "City "));
            this.Controls.Add(uiBuilder.GenerateLabel(241, 355, "dynamiclbl_state", "State "));
            this.Controls.Add(uiBuilder.GenerateLabel(449, 355, "dynamiclbl_zip", "Zip "));
            this.btn_save.Location = new Point(181, 427);
            this.btn_save.Left     = this.Width / 2 - this.btn_save.Width / 2;
            this.CenterToParent();
        }
Пример #2
0
        private void AddAddressControls()
        {
            PictureBox tbx   = this.Controls.Find("dynamicpbx_chevdown", true).FirstOrDefault() as PictureBox;
            Label      label = this.Controls.Find("dynamiclbl_address", true).FirstOrDefault() as Label;

            if (tbx != null)
            {
                tbx.Dispose();
                label.Dispose();
            }

            Label rLabel = Controls.Find("lbl_repeatfor", true).FirstOrDefault() as Label;

            if (rLabel != null)
            {
                this.Size = new Size(627, 750);
            }
            else
            {
                this.Size = new Size(627, 700);
            }
            this.Controls.Add(uiBuilder.GenerateLongTextBox(42, 400, "dynamictxt_addressline1", userEvent.AddressLine1));
            this.Controls.Add(uiBuilder.GenerateLongTextBox(330, 400, "dynamictxt_addressline2", userEvent.AddressLine2));
            this.Controls.Add(uiBuilder.GenerateShortTextBox(42, 467, "dynamictxt_city", userEvent.City));
            this.Controls.Add(uiBuilder.GenerateShortTextBox(243, 467, "dynamictxt_state", userEvent.State));
            this.Controls.Add(uiBuilder.GenerateShortTextBox(451, 467, "dynamictxt_zip", userEvent.Zipcode));
            this.Controls.Add(uiBuilder.GenerateLabel(40, 388, "dynamiclbl_addressline1", "Address Line 1 "));
            this.Controls.Add(uiBuilder.GenerateLabel(329, 388, "dynamiclbl_addressline2", "Address Line 2 "));
            this.Controls.Add(uiBuilder.GenerateLabel(40, 445, "dynamiclbl_city", "City "));
            this.Controls.Add(uiBuilder.GenerateLabel(241, 445, "dynamiclbl_state", "State "));
            this.Controls.Add(uiBuilder.GenerateLabel(449, 445, "dynamiclbl_zip", "Zip "));

            PictureBox pbx = uiBuilder.GeneratePictureBox(17, 390, "dynamicpbx_chevup", Properties.Resources.chevup, 15, 15);

            pbx.Click += new EventHandler(this.RemoveUiClick);
            this.Controls.Add(pbx);

            this.CenterToParent();
        }