Example #1
0
    public MatrixPanel()
    {
        AutoSize    = true;
        Padding     = new Padding(Font.Height);
        ColumnCount = 2;

        SuspendLayout();

        for (int i = 0; i < 6; i++)
        {
            Label lbl = new Label();
            lbl.Parent   = this;
            lbl.AutoSize = true;
            lbl.Anchor   = AnchorStyles.Left;
            lbl.Text     = new string[] { "X Scale:", "Y Shear:", "X Shear:",
                                          "Y Scale:", "X Translate:",
                                          "Y Translate:" }[i];

            numscan[i]               = new NumericScan();
            numscan[i].Parent        = this;
            numscan[i].AutoSize      = true;
            numscan[i].Anchor        = AnchorStyles.Right;
            numscan[i].Minimum       = -1000;
            numscan[i].Maximum       = 1000;
            numscan[i].DecimalPlaces = 2;
            numscan[i].ValueChanged += NumericScanOnValueChanged;
        }
        ResumeLayout();

        Matrix = new Matrix();
    }
Example #2
0
    public TestProgram()
    {
        Text = "Test Program";

        FlowLayoutPanel pnl = new FlowLayoutPanel();

        pnl.Parent = this;
        pnl.Dock   = DockStyle.Fill;

        numscan1               = new NumericScan();
        numscan1.Parent        = pnl;
        numscan1.AutoSize      = true;
        numscan1.ValueChanged += NumericScanOnValueChanged;

        numscan2               = new NumericScan();
        numscan2.Parent        = pnl;
        numscan2.AutoSize      = true;
        numscan2.ValueChanged += NumericScanOnValueChanged;

        lbl          = new Label();
        lbl.Parent   = pnl;
        lbl.AutoSize = true;
    }