Пример #1
0
        private void InitializeComponent()
        {
            SuspendLayout();

            if (fPasswordMode)
            {
                txtValue = new PasswordBox();
                ((PasswordBox)txtValue).PasswordChar = '*';
            }
            else
            {
                txtValue = new TextBox();
            }
            //txtValue.Size = new Size(354, 20);

            label1 = new Label();
            //label1.Size = new Size(35, 13);
            label1.Text = "label1";

            btnAccept = new Button();
            btnAccept.ImagePosition = ButtonImagePosition.Left;
            btnAccept.Size          = new Size(130, 26);
            btnAccept.Text          = "btnAccept";
            btnAccept.Click        += btnAccept_Click;
            btnAccept.Image         = UIHelper.LoadResourceImage("Resources.btn_accept.gif");

            btnCancel = new Button();
            btnCancel.ImagePosition = ButtonImagePosition.Left;
            btnCancel.Size          = new Size(130, 26);
            btnCancel.Text          = "btnCancel";
            btnCancel.Click        += btnCancel_Click;
            btnCancel.Image         = UIHelper.LoadResourceImage("Resources.btn_cancel.gif");

            Content = new DefTableLayout {
                Rows =
                {
                    new TableRow(label1),
                    new TableRow(txtValue),
                    UIHelper.MakeDialogFooter(null,btnAccept, btnCancel)
                }
            };

            Maximizable   = false;
            Minimizable   = false;
            ShowInTaskbar = false;
            Title         = "InputBox";
            Topmost       = true;

            SetPredefProperties(380, 100);
            ResumeLayout();
        }