Ejemplo n.º 1
0
        public static Form CreateOrAttachForm(GViewer gviewer, Form form)
        {
            GViewer = gviewer;
            if (form == null)
            {
                form = new Form();
            }
            form.SuspendLayout();
            form.Controls.Add(gviewer);
            gviewer.Dock = DockStyle.Fill;
            gviewer.SendToBack();
            form.StartPosition = FormStartPosition.CenterScreen;
            form.Size          = new System.Drawing.Size(Screen.PrimaryScreen.WorkingArea.Width,
                                                         Screen.PrimaryScreen.WorkingArea.Height);
            var statusStrip  = new StatusStrip();
            var toolStribLbl = new ToolStripStatusLabel("test");

            statusStrip.Items.Add(toolStribLbl);
            form.Controls.Add(statusStrip);
            form.MainMenuStrip = GetMainMenuStrip();
            form.Controls.Add(form.MainMenuStrip);
            form.ResumeLayout();
            form.Load += form_Load;
            return(form);
        }
Ejemplo n.º 2
0
        public void SetGViewer(GViewer gviewer)
        {
            GViewer = gviewer;
            SuspendLayout();
            Controls.Add(gviewer);
            gviewer.Dock = DockStyle.Fill;
            gviewer.SendToBack();
            StartPosition = FormStartPosition.CenterScreen;
            Size          = new Size(Screen.PrimaryScreen.WorkingArea.Width,
                                     Screen.PrimaryScreen.WorkingArea.Height);

            var statusStrip  = new StatusStrip();
            var toolStribLbl = new ToolStripStatusLabel("test");

            statusStrip.Items.Add(toolStribLbl);
            Controls.Add(statusStrip);
            MainMenuStrip = GetMainMenuStrip();
            Controls.Add(MainMenuStrip);
            SetMonotonicityCoefficientTrackBar();
            ResumeLayout();
            gviewer.GraphChanged += gviewer_GraphChanged;
        }