Esempio n. 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);
        }
        public EntryBlockHolder(EntryBase entryElem, EditorFactory eFactory, Swoosh swooshMgr)
        {
            entryElement  = entryElem;
            editorFactory = eFactory;
            swooshManager = swooshMgr;

            Height = 100;

            lblName          = GlobalLayout.GenMetroLabel(GetNameFromEntry(entryElem));
            lblName.Location = new Point(0, 0);
            lblName.Height   = GlobalLayout.LineHeight;
            btnEdit          = GlobalLayout.GenMetroButton("Edit", Edit_Click);
            btnEdit.Size     = new Size(GlobalLayout.LabelWidth, GlobalLayout.LineHeight);
            btnEdit.Top      = 0;
            Controls.Add(lblName);
            Controls.Add(btnEdit);

            Type editorType = editorFactory.GetEditorTypeByEntry(entryElem);

            isEditorInline = EditorFactory.IsInline(editorType);
            if (isEditorInline)
            {
                displayControl          = (Control)editorFactory.CreateEditorForEntry(entryElem);
                displayControl.Location = new Point(0, GlobalLayout.LineHeight);
                displayControl.Enabled  = false;
            }
            else
            {
                lblLabel       = GlobalLayout.GenMetroLabel(entryElem.Label);
                displayControl = lblLabel;
            }
            Controls.Add(displayControl);
        }
Esempio n. 3
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);
        }
        public virtual void OnGlobalLayout()
        {
            var displayRect = new Rect();

            Window.DecorView.GetWindowVisibleDisplayFrame(displayRect);
            VisibleDisplayRect = displayRect;
            GlobalLayout?.Invoke(this, EventArgs.Empty);
        }
        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);
        }