Beispiel #1
0
        private void InitializeGridLineManager()
        {
            structureViever = new StructureViewer(dataStruct);
            //structureViever.RebuildHalfAsync();
            structureViever.AfterSelect += structureViever1_AfterSelect;
            btnSelect = GlobalLayout.GenMetroButton("Select", Select_Click);

            var grid = new GridLineManager(this, true);
            int line = grid.AddLineFilling(GlobalLayout.LineHeight);

            grid.AddElementFilling(line, structureViever, GlobalLayout.MinFill);
            line = grid.AddLineFixed(GlobalLayout.LineHeight);
            grid.AddElementStretchable(line, btnSelect, GlobalLayout.MinFill, GlobalLayout.LabelWidth);
            grid.AddElementStretchable(line, GlobalLayout.GenMetroButton("Cancel", Cancel_Click), GlobalLayout.MinFill, GlobalLayout.LabelWidth);
        }
Beispiel #2
0
        private void InitializeGridLineManager()
        {
            Text                           = "TypeSelector";
            txtTypeCompile                 = new FastColoredTextBox();
            txtTypeCompile.Multiline       = false;
            txtTypeCompile.ShowLineNumbers = false;
            txtTypeCompile.Language        = Language.CSharp;
            txtTypeName                    = new TextBox();
            txtTypeName.ReadOnly           = true;

            var grid = new GridLineManager(this, true);
            int line = grid.AddLineFixed(GlobalLayout.LineHeight);

            grid.AddElementFixed(line, GlobalLayout.GenMetroLabel("TypeCompiler"), GlobalLayout.LabelWidth);
            grid.AddElementFilling(line, txtTypeCompile, GlobalLayout.MinFill);
            grid.AddElementStretchable(line, GlobalLayout.GenMetroButton("Compile", TypeCompiler_Click), GlobalLayout.MinFill, GlobalLayout.LabelWidth);
            line = grid.AddLineFixed(GlobalLayout.LineHeight);
            grid.AddElementFixed(line, GlobalLayout.GenMetroLabel("Type"), GlobalLayout.LabelWidth);
            grid.AddElementFilling(line, txtTypeName, GlobalLayout.MinFill);
            grid.AddElementStretchable(line, GlobalLayout.GenMetroButton("Pick", PickMethod_Click), GlobalLayout.MinFill, GlobalLayout.LabelWidth);
            line = grid.AddLineFixed(GlobalLayout.LineHeight);
            grid.AddElementFilling(line, null, 0);
            grid.AddElementFixed(line, GlobalLayout.GenMetroButton("OK", OK_Click), GlobalLayout.LabelWidth);
        }