예제 #1
0
        //
        //
        //
        // *****************************************************************
        // ****             NewGraphWindow_Click()                      ****
        // *****************************************************************
        private void NewGraphWindow_Click(object sender, EventArgs e)
        {
            if (GraphDisplay == null)
            {
                Graphs.GraphHolder holder = new Graphs.GraphHolder();
                GraphDisplay = holder;

                holder.FormClosed    += new FormClosedEventHandler(GraphDisplay_FormClosed);
                holder.IsMdiContainer = true;
                if (m_ClusterList.Count < holder.m_NumberOfColumns)
                {
                    holder.m_NumberOfColumns = m_ClusterList.Count;
                }
                GraphDisplay.Show();

                List <Form> m_GraphForms = new List <Form>();
                foreach (Cluster cluster in m_ClusterList)
                {
                    List <IEngine> engineList = cluster.m_Header.GetEngines();
                    foreach (IEngine eng in engineList)
                    {
                        if (eng is Graphs.ZGraphControl)
                        {
                            Graphs.ZGraphControl zcontrol = (Graphs.ZGraphControl)eng;
                            if (zcontrol.ParentForm != null)
                            {
                                zcontrol.ParentForm.MdiParent = holder;
                                ((FrontEnds.PopUps.IPopUp)zcontrol.ParentForm).ShowMe(cluster.m_Header);
                            }
                        }
                    }
                }
            }
        }
예제 #2
0
 //
 // *********************************************************
 // ****             GraphDisplay_FormClosed()           ****
 // *********************************************************
 /// <summary>
 /// Event handler for user closing out the graph window.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void GraphDisplay_FormClosed(object sender, FormClosedEventArgs e)
 {
     GraphDisplay = null;
 }