Пример #1
0
        /// <summary>
        /// Creates the tab with its own graphHandler and masterGraphPanel
        /// </summary>
        /// <returns>A new graphPage</returns>
        private GraphPage GenerateTabPage()
        {
            var          mgp      = new P2Graph.MasterGraphPanel(628, 487);
            GraphHandler newGH    = new GraphHandler(mgp);
            GraphPage    testPage = new GraphPage(mgp);

            testPage.gh = newGH;
            synth.graphHandlers.Add(newGH);
            testPage.Location = new System.Drawing.Point(4, 22);
            testPage.Name     = "graphTab" + pTabs.Controls.Count + 1;
            testPage.Padding  = new System.Windows.Forms.Padding(3);
            testPage.Size     = new System.Drawing.Size(509, 384);
            testPage.Text     = "Graf " + (pTabs.Controls.Count + 1);
            testPage.UseVisualStyleBackColor = true;

            return(testPage);
        }
Пример #2
0
 /// <summary>
 /// Instantiates a new <see cref="P2.GraphPage"/>
 /// </summary>
 /// <param name="mgp">The Graph being displayed in the window</param>
 public GraphPage(P2Graph.MasterGraphPanel mgp)
     : base()
 {
     this._mgp = mgp;
     this.Controls.Add(_mgp);
 }