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

            Lab1      = new Label();
            Lab1.Text = "XXX1";

            Lab2      = new Label();
            Lab2.Text = "XXX2";

            Edit1          = new TextBox();
            Edit1.ReadOnly = true;
            Edit1.Width    = 350;

            Edit2          = new TextBox();
            Edit2.ReadOnly = true;
            Edit2.Width    = 350;

            btnRec1Select        = new Button();
            btnRec1Select.Size   = new Size(80, 26);
            btnRec1Select.Text   = "btnRec1Select";
            btnRec1Select.Click += btnRec1Select_Click;

            btnRec2Select        = new Button();
            btnRec2Select.Size   = new Size(80, 26);
            btnRec2Select.Text   = "btnRec2Select";
            btnRec2Select.Click += btnRec2Select_Click;

            btnMergeToLeft         = new Button();
            btnMergeToLeft.Enabled = false;
            btnMergeToLeft.Size    = new Size(80, 26);
            btnMergeToLeft.Text    = "<<<";
            btnMergeToLeft.Click  += btnMergeToLeft_Click;

            btnMergeToRight         = new Button();
            btnMergeToRight.Enabled = false;
            btnMergeToRight.Size    = new Size(80, 26);
            btnMergeToRight.Text    = ">>>";
            btnMergeToRight.Click  += btnMergeToRight_Click;

            fView1 = new HyperView();
            fView2 = new HyperView();

            var contPan = new DefTableLayout(2, 4);

            contPan.SetRowScale(0, false);
            contPan.SetRowScale(1, false);
            contPan.SetRowScale(2, true);
            contPan.SetRowScale(3, false);
            contPan.SetColumnScale(0, true);
            contPan.SetColumnScale(1, true);

            contPan.Add(Lab1, 0, 0);
            contPan.Add(Lab2, 1, 0);
            contPan.Add(TableLayout.Horizontal(Edit1, null, btnRec1Select), 0, 1);
            contPan.Add(TableLayout.Horizontal(Edit2, null, btnRec2Select), 1, 1);
            contPan.Add(fView1, 0, 2);
            contPan.Add(fView2, 1, 2);
            contPan.Add(TableLayout.Horizontal(null, btnMergeToLeft), 0, 3);
            contPan.Add(TableLayout.Horizontal(btnMergeToRight, null), 1, 3);

            Content = contPan;

            UIHelper.SetControlFont(this, UIHelper.GetDefaultFont());
            ResumeLayout();
        }