示例#1
0
        private void InitializeGridLineManager()
        {
            lblPathILPFile       = GlobalLayout.GenMetroLabel("<<Patch File>>");
            lblPathNETFile       = GlobalLayout.GenMetroLabel("<< .NET Assembly >>");
            lbxPatchEntryListBox = new MListBox();
            structureViever      = new StructureViewer(dataStruct);
            loadingBox           = new MLoadingCircle();
            lbxErrors            = new MListBox();

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

            grid.AddElementFixed(line, GlobalLayout.GenMetroButton("Open patch file (*.ilp)", OpenILPatchFile_Click), GlobalLayout.LabelWidth);
            grid.AddElementFilling(line, lblPathILPFile, GlobalLayout.MinFill);
            grid.AddElementStretchable(line, GlobalLayout.GenMetroButton("Save", Save_Click), GlobalLayout.MinFill, GlobalLayout.LabelWidth);
            line = grid.AddLineFixed(GlobalLayout.LineHeight);
            grid.AddElementFixed(line, GlobalLayout.GenMetroButton("Open .NET assembly", OpenNETAssembly_Click), GlobalLayout.LabelWidth);
            grid.AddElementFilling(line, lblPathNETFile, GlobalLayout.MinFill);
            grid.AddElementFixed(line, loadingBox, GlobalLayout.LineHeight);
            line = grid.AddLineFilling(GlobalLayout.LineHeight);
            grid.AddElementFilling(line, structureViever, GlobalLayout.MinFill);
            grid.AddElementFilling(line, lbxPatchEntryListBox, GlobalLayout.MinFill);
            line = grid.AddLineFixed(GlobalLayout.LineHeight);
            grid.AddElementFilling(line, GlobalLayout.GenMetroButton("[Execute patches]", ExecutePatches_Click), GlobalLayout.MinFill);
            grid.AddElementFilling(line, GlobalLayout.GenMetroButton("(Testpatch)", Testpatch_Click), GlobalLayout.MinFill);
            grid.AddElementFilling(line, GlobalLayout.GenMetroButton("[New patch]", NewPatch_Click), GlobalLayout.MinFill);
            grid.AddElementFilling(line, GlobalLayout.GenMetroButton("[Edit patch]", EditPatch_Click), GlobalLayout.MinFill);
        }
示例#2
0
        private void InitializeGridLineManager()
        {
            mPatchAction              = new Panel();
            mTargetFinder             = new Panel();
            mTargetFinder.BorderStyle = BorderStyle.FixedSingle;
            glmFinder = new GridLineManager(mTargetFinder, false);
            glmFinder.ElementDistance = 0;
            txtName                      = new TextBox();
            txtName.TextChanged         += TxtName_TextChanged;
            actionPoolView               = new TreeView();
            finderPoolView               = new TreeView();
            finderPoolView.ShowPlusMinus = actionPoolView.ShowPlusMinus = false;
            finderPoolView.ShowRootLines = actionPoolView.ShowRootLines = false;
            actionPoolView.DoubleClick  += PoolView_DoubleClick;
            finderPoolView.DoubleClick  += PoolView_DoubleClick;

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

            grid.AddElementFixed(line, finderPoolView, GlobalLayout.LabelWidth);
            grid.AddElementFilling(line, mTargetFinder, GlobalLayout.MinFill);
            line = grid.AddLineStrechable(GlobalLayout.MinFill, 150);
            grid.AddElementFixed(line, actionPoolView, GlobalLayout.LabelWidth);
            grid.AddElementFilling(line, mPatchAction, GlobalLayout.MinFill);
            line = grid.AddLineFixed(GlobalLayout.LineHeight);
            grid.AddElementFixed(line, GlobalLayout.GenMetroLabel("Name"), GlobalLayout.LabelWidth);
            grid.AddElementFilling(line, txtName, GlobalLayout.MinFill);
            grid.AddElementFixed(line, GlobalLayout.GenMetroButton("Back", Save_Click), GlobalLayout.LabelWidth);
        }
        private void InitializeGridLineManager()
        {
            txtName                         = new TextBox();
            txtName.TextChanged            += TxtName_TextChanged;
            txtClassPath                    = new TextBox();
            txtClassPath.AutoCompleteMode   = AutoCompleteMode.Suggest;
            txtClassPath.AutoCompleteSource = AutoCompleteSource.CustomSource;
            txtClassPath.TextChanged       += TxtClassPath_TextChanged;

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

            grid.AddElementFixed(line, GlobalLayout.GenMetroLabel("Name"), GlobalLayout.LabelWidth);
            grid.AddElementFilling(line, txtName, GlobalLayout.MinFill);
            line = grid.AddLineFixed(GlobalLayout.LineHeight);
            grid.AddElementFixed(line, GlobalLayout.GenMetroLabel("ILNodePath"), GlobalLayout.LabelWidth);
            grid.AddElementFilling(line, txtClassPath, GlobalLayout.MinFill);
        }