public void Create3DDocument(CurveType type)
        {
            SpectroGraphDock sd = new SpectroGraphDock();
            double xmax = Double.MinValue;

            foreach (File f in OpenFiles)
            {
                var curveList = from curve in f.InfoList where curve.Type == type select curve;
                foreach (CurveInfo c in curveList)
                {
                    if (c.PointPairList[c.PointPairList.Count - 1].X > xmax)
                    {
                        xmax = c.PointPairList[c.PointPairList.Count - 1].X;
                    }
                    sd.AddCurve(c, f.FileName);
                    //sd.AddCurve(c.Curve, c.Type, f.FileName);
                }
            }
            GlobalVars.XMAX = xmax;
            sd.Text = type + " Graphs";
            sd.GraphName = sd.Text;
            sd.UpdateMenu();
            GraphDockList.Add(sd);
            GraphEventInstance.CreatedGraph = sd;
            OnGraphCreated(GraphEventInstance);
        }
        public void Create3DDocument(List<TypeIndexPair> tipsList)
        {
            GraphEventInstance.GraphType = GraphType.ThreeD;
            SpectroGraphDock sd = new SpectroGraphDock();
            int index = 0;
            double xmax = 0;
            PointPairList temp;

            foreach (TypeIndexPair tip in tipsList)
            {
                String curveName = tip.GraphType.ToString() + " " + tip.FileName;
                Console.WriteLine(tip.GraphType.ToString() + " at index: " + tip.Index);
                index = tip.Index;
                switch (tip.GraphType)
                {
                    case CurveType.Acceleration:
                        sd.AddCurve(OpenFiles[index].AccelerationData, curveName);
                        temp = OpenFiles[index].AccelerationData.PointPairList;
                        xmax = Math.Max(xmax, temp[temp.Count - 1].X);
                        break;
                    case CurveType.Velocity:
                        sd.AddCurve(OpenFiles[index].VelocityData, curveName);
                        temp = OpenFiles[index].VelocityData.PointPairList;
                        xmax = Math.Max(xmax, temp[temp.Count - 1].X);
                        break;
                    case CurveType.Magnitude:
                        sd.AddCurve(OpenFiles[index].MagnitudeData, curveName);
                        temp = OpenFiles[index].VelocityData.PointPairList;
                        xmax = Math.Max(xmax, temp[temp.Count - 1].X);
                        break;
                    case CurveType.Power:
                        sd.AddCurve(OpenFiles[index].PowerData, curveName);
                        temp = OpenFiles[index].VelocityData.PointPairList;
                        xmax = Math.Max(xmax, temp[temp.Count - 1].X);
                        break;
                    default:
                        break;
                }
            }
            GraphEventInstance.CreatedGraph = sd;
            sd.Text = "User Graph " + GraphEventInstance.NumberOfUserCreatedGraphs;
            sd.GraphName = sd.Text;
            sd.UpdateMenu();
            GraphDockList.Add(sd);
            OnGraphCreated(GraphEventInstance);
        }