Esempio n. 1
0
        public void GraphDraw()
        {
            DataPlotter.DataSeries pSeries1 = new DataPlotter.DataSeries();

            ///plotter1.ColorBg = Color.LightYellow;
            plotter1.ColorGrid = Color.LightGray;
            //plotter1.XLogBase = 0;
            plotter1.XRangeStart = 0;
            plotter1.XRangeEnd = 8000;
            plotter1.XGrid = 1000;
            //plotter1.YLogBase = 0;
            plotter1.YRangeStart = 0;
            plotter1.YRangeEnd = 1;
            plotter1.YGrid = 0.2;
            plotter1.Series.Clear();

            pSeries1.Name  = "Data 01";
            pSeries1.Color = Color.Blue ;

            plotter1.bIsColorMap = false;

            bool DataExist = false;

            if(SAClass1 != null)
            {
                #region ����
            //				object [] ar = new object[3];
            //
            //				DataTable table = new DataTable();
            //
            //				table.Columns.Add("GroupName",typeof(int));
            //				table.Columns.Add("my_X",typeof(double));
            //				table.Columns.Add("my_Y",typeof(double));

            //				for(int i = 0 ; i < SAClass1.Frequency.GetCount() ; i++)
            //				{
            //					DataRow row = table.NewRow();
            //					ar[0] = i.ToString();
            //					ar[1] = SAClass1.Frequency.GetData(i).ToString();
            //					try
            //					{
            //						ar[2] = double.Parse(SAClass1.Igraph.GetData(i).ToString());
            //						if (ar[2].ToString() == "NaN") ar[2]=0;
            //					}
            //					catch
            //					{
            //						ar[2] = 0;
            //					}
            //					row.ItemArray = ar;
            //					table.Rows.Add(row);
            //
            //					DataExist = true;
            //				}
                #endregion

                DataExist = true;

                pSeries1.XData = SAClass1.Frequency.GetData();
                pSeries1.YData = SAClass1.Igraph.GetData();

                switch(SAClass1.GraphType)
                {
                    case 1 :
                        plotter1.YLabel = "Transmission Loss [dB]";
                        plotter1.XLabel = "Frequency [Hz]";
                        break;
                    case 2 :
                        plotter1.YLabel = "Absorption Coefficient for Rigid Backing";
                        plotter1.XLabel = "Frequency [Hz]";
                        break;
                    case 3 :
                        plotter1.YLabel = "Absotpyion Coefficient for Anechoic termiation";
                        plotter1.XLabel = "Frequency [Hz]";
                        break;
                }

                if(DataExist == true)
                {
                    #region ����
            //					ultraChart1.DataSource = table;
            //					ultraChart1.ScatterChart.IconSize = Infragistics.UltraChart.Shared.Styles.SymbolIconSize.Small;
            //					ultraChart1.ScatterChart.ConnectWithLines = true;
                    #endregion

                    plotter1.Series.Clear();
                    plotter1.Series.Add(pSeries1);
                    pSeries_Prev = pSeries1;
                    //plotter1.IsOctave = true;
                    plotter1.Refresh();
                }
            //				else
            //				{
            //					NullGraph();
            //				}
            }
            //			else
            //			{
            //				NullGraph();
            //			}
        }
Esempio n. 2
0
        public void GraphDraw()
        {
            DataPlotter.DataSeries pSeries1;
            DataPlotter.DataSeries pSeries2;
            DataPlotter.DataSeries pSeries3;

            plotter1.ColorGrid = Color.LightGray;
            plotter1.XRangeStart = 0;
            plotter1.XRangeEnd = 6400;
            plotter1.XGrid = 1000;
            plotter1.YRangeStart = 0;
            plotter1.YRangeEnd = 1;
            plotter1.YGrid = 0.2;
            plotter1.Series.Clear();

            plotter2.ColorGrid = Color.LightGray;
            plotter2.XRangeStart = 0;
            plotter2.XRangeEnd = 6400;
            plotter2.XGrid = 1000;
            plotter2.YRangeStart = 0;
            plotter2.YRangeEnd = 1;
            plotter2.YGrid = 0.2;
            plotter2.Series.Clear();

            plotter3.ColorGrid = Color.LightGray;
            plotter3.XRangeStart = 0;
            plotter3.XRangeEnd = 6400;
            plotter3.XGrid = 1000;
            plotter3.YRangeStart = 0;
            plotter3.YRangeEnd = 60;
            plotter3.YGrid = 10;
            plotter3.Series.Clear();

            bool DataExist = false;

            MPEData MPEData1;
            MD_DB MD_DB1 = new MD_DB();

            int dGraph_ID = 0;

            for(int i = 0 ; i < strID.Length ; i++)
            {
                dGraph_ID = MD_DB1.IsGraphExist(bIsSingle,Measured,Incidence,FreqBand,1,int.Parse(strID[i]));
                if(dGraph_ID != -1)
                {
                    MPEData1 = new MPEData();

                    if(MPEData1.DBLoad(bIsSingle,dGraph_ID) == true)
                    {
                        DataExist = true;

                        pSeries1 = new DataPlotter.DataSeries();
                        pSeries1.Name = "Data " + i.ToString();

                        int dR = (30 * i * 1000) % 256;
                        int dG = (20 * i * 200) % 256;
                        int dB = (10 * i * 10) % 256;

                        pSeries1.Color = Color.FromArgb(dR,dG,dB);

            //						switch(i)
            //						{
            //							case 0 :
            //								pSeries1.Color = Color.Blue ;
            //								break;
            //							case 1 :
            //								pSeries1.Color = Color.Red ;
            //								break;
            //							case 2 :
            //								pSeries1.Color = Color.Yellow ;
            //								break;
            //							case 3 :
            //								pSeries1.Color = Color.Green ;
            //								break;
            //						}

                        pSeries1.XData = MPEData1.Frequency.GetData();
                        pSeries1.YData = MPEData1.MAbsorption.GetData();

                        plotter1.YLabel = "Absorption Coefficient for Rigid Backing";
                        plotter1.XLabel = "Frequency [Hz]";

                        if(DataExist == true)
                        {
                            plotter1.Series.Add(pSeries1);
                        }
                    }
                }
            }

            //plotter1.AutoRange();
            plotter1.Refresh();

            for(int i = 0 ; i < strID.Length ; i++)
            {
                dGraph_ID = MD_DB1.IsGraphExist(bIsSingle,Measured,Incidence,FreqBand,2,int.Parse(strID[i]));
                if(dGraph_ID != -1)
                {
                    MPEData1 = new MPEData();

                    if(MPEData1.DBLoad(bIsSingle,dGraph_ID) == true)
                    {
                        DataExist = true;

                        pSeries2 = new DataPlotter.DataSeries();
                        pSeries2.Name = "Data " + i.ToString();

                        pSeries2.XData = MPEData1.Frequency.GetData();
                        pSeries2.YData = MPEData1.MAbsorption.GetData();

                        int dR = (30 * i * 1000) % 256;
                        int dG = (20 * i * 200) % 256;
                        int dB = (10 * i * 10) % 256;

                        pSeries2.Color = Color.FromArgb(dR,dG,dB);

            //						switch(i)
            //						{
            //							case 0 :
            //								pSeries2.Color = Color.Blue ;
            //								break;
            //							case 1 :
            //								pSeries2.Color = Color.Red ;
            //								break;
            //							case 2 :
            //								pSeries2.Color = Color.Yellow ;
            //								break;
            //							case 3 :
            //								pSeries2.Color = Color.Green ;
            //								break;
            //						}

                        if(DataExist == true)
                        {
                            plotter2.Series.Add(pSeries2);
                        }

                        plotter2.YLabel = "Absotpyion Coefficient for Anechoic termiation";
                        plotter2.XLabel = "Frequency [Hz]";
                    }
                }

                //plotter2.AutoRange();
                plotter2.Refresh();
            }

            for(int i = 0 ; i < strID.Length ; i++)
            {
                dGraph_ID = MD_DB1.IsGraphExist(bIsSingle,Measured,Incidence,FreqBand,3,int.Parse(strID[i]));
                if(dGraph_ID != -1)
                {
                    MPEData1 = new MPEData();

                    if(MPEData1.DBLoad(bIsSingle,dGraph_ID) == true)
                    {
                        DataExist = true;

                        pSeries3 = new DataPlotter.DataSeries();
                        pSeries3.Name = "Data " + i.ToString();

                        int dR = (30 * i * 1000) % 256;
                        int dG = (20 * i * 200) % 256;
                        int dB = (10 * i * 10) % 256;

                        pSeries3.Color = Color.FromArgb(dR,dG,dB);

            //						switch(i)
            //						{
            //							case 0 :
            //								pSeries3.Color = Color.Blue ;
            //								break;
            //							case 1 :
            //								pSeries3.Color = Color.Red ;
            //								break;
            //							case 2 :
            //								pSeries3.Color = Color.Yellow ;
            //								break;
            //							case 3 :
            //								pSeries3.Color = Color.Green ;
            //								break;
            //						}

                        pSeries3.XData = MPEData1.Frequency.GetData();
                        pSeries3.YData = MPEData1.MAbsorption.GetData();

                        plotter3.YLabel = "Transmission Loss [dB]";
                        plotter3.XLabel = "Frequency [Hz]";

                        if(DataExist == true)
                        {
                            plotter3.Series.Add(pSeries3);
                        }
                    }
                }
            }

            //plotter3.AutoRange();
            plotter3.Refresh();
        }
Esempio n. 3
0
        public void GraphDraw_Result(string strPerformance)
        {
            DataPlotter.DataSeries pSeries1 = new DataPlotter.DataSeries();

            //plotter1.ColorBg = Color.LightYellow;
            plotter1.ColorGrid = Color.LightGray;
            //plotter1.XLogBase = 0;
            plotter1.XRangeStart = 0;
            plotter1.XRangeEnd = 8000;
            plotter1.XGrid = 1000;
            //plotter1.YLogBase = 0;
            plotter1.YRangeStart = 0;
            plotter1.YRangeEnd = 1;
            plotter1.YGrid = 0.2;
            plotter1.Series.Clear();

            pSeries1.Name  = "Data 01";
            pSeries1.Color = Color.Red ;

            plotter1.bIsColorMap = false;
            plotter1.IsOctave = false;

            bool DataExist = false;

            plotter1.Series.Clear();

            if(SAClass1 != null)
            {
                #region ����
            //				object [] ar = new object[3];
            //
            //				DataTable table = new DataTable();
            //
            //				table.Columns.Add("GroupName",typeof(int));
            //				table.Columns.Add("my_X",typeof(double));
            //				table.Columns.Add("my_Y",typeof(double));
                #endregion

                if(strPerformance == null || strPerformance == "")
                {
                    strPerformance = "Transmission Loss";
                }

                if(strPerformance == "Transmission Loss")
                {
                    #region ����
            //					for(int i = 0 ; i < SAClass1.Frequency.GetCount() ; i++)
            //					{
            //						DataRow row = table.NewRow();
            //						ar[0] = i.ToString();
            //						ar[1] = SAClass1.Frequency.GetData(i).ToString();
            //						ar[2] = SAClass1.Rgraph_TL.GetData(i).ToString();
            //						row.ItemArray = ar;
            //						table.Rows.Add(row);
            //					}
                    #endregion

                    DataExist = true;

                    pSeries1.XData = SAClass1.Frequency.GetData();
                    pSeries1.YData = SAClass1.Rgraph_TL.GetData();

                    plotter1.YGrid = 20;
                    plotter1.YRangeEnd = 100;
                }
                else if(strPerformance == "Absorption coefficient for rigid backing")
                {
                    #region ����
            //					for(int i = 0 ; i < SAClass1.Frequency.GetCount() ; i++)
            //					{
            //						DataRow row = table.NewRow();
            //						ar[0] = i.ToString();
            //						ar[1] = SAClass1.Frequency.GetData(i).ToString();
            //						ar[2] = SAClass1.Rgraph_RB.GetData(i).ToString();
            //						row.ItemArray = ar;
            //						table.Rows.Add(row);
            //					}
                    #endregion

                    DataExist = true;

                    pSeries1.XData = SAClass1.Frequency.GetData();
                    pSeries1.YData = SAClass1.Rgraph_RB.GetData();
                }
                else if(strPerformance == "Absorption coefficient for anechoic termination")
                {
                    #region ����
            //					for(int i = 0 ; i < SAClass1.Frequency.GetCount() ; i++)
            //					{
            //						DataRow row = table.NewRow();
            //						ar[0] = i.ToString();
            //						ar[1] = SAClass1.Frequency.GetData(i).ToString();
            //						ar[2] = SAClass1.Rgraph_AT.GetData(i).ToString();
            //						row.ItemArray = ar;
            //						table.Rows.Add(row);
            //					}
                    #endregion

                    DataExist = true;

                    pSeries1.XData = SAClass1.Frequency.GetData();
                    pSeries1.YData = SAClass1.Rgraph_AT.GetData();
                }

                if(DataExist == true)
                {
                    #region ����
            //					ultraChart1.DataSource = table;
            //					ultraChart1.ScatterChart.IconSize = Infragistics.UltraChart.Shared.Styles.SymbolIconSize.Small;
            //					ultraChart1.ScatterChart.ConnectWithLines = true;
                    #endregion

                    if(pSeries_Prev != null)
                    {
                        plotter1.Series.Add(pSeries_Prev);
                    }
                    plotter1.Series.Add(pSeries1);

                    plotter1.Refresh();
                }
            }
        }
Esempio n. 4
0
        //        private void NullGraph()
        //        {
        //            object [] ar = new object[3];
        //        
        //            DataTable table = new DataTable();
        //        
        //            table.Columns.Add("GroupName",typeof(int));
        //            table.Columns.Add("my_X",typeof(int));
        //            table.Columns.Add("my_Y",typeof(int));
        //        
        //            DataRow row = table.NewRow();
        //            ar[0] = "1";
        //            ar[1] = 0;
        //            ar[2] = 0;
        //            row.ItemArray = ar;
        //            table.Rows.Add(row);
        //
        //            ultraChart1.DataSource = table;
        //            ultraChart1.ScatterChart.IconSize = Infragistics.UltraChart.Shared.Styles.SymbolIconSize.Small;
        //            ultraChart1.ScatterChart.ConnectWithLines = true;
        //        }
        public void GraphDraw_Step()
        {
            DataPlotter.DataSeries pSeries1;

            //plotter1.ColorBg = Color.LightYellow;
            plotter1.ColorGrid = Color.LightGray;
            //plotter1.XLogBase = 0;
            plotter1.XRangeStart = 0;
            plotter1.XRangeEnd = 8000;
            plotter1.XGrid = 1000;
            //plotter1.YLogBase = 0;
            plotter1.YRangeStart = 0;
            plotter1.YRangeEnd = 1;
            plotter1.YGrid = 0.2;
            plotter1.Series.Clear();

            plotter1.bIsColorMap = true;
            plotter1.IsOctave = true;

            bool DataExist = false;

            plotter1.Series.Clear();

            if(SAClass1 != null)
            {
                #region ����
            //				object [] ar = new object[3];
            //
            //				DataTable table = new DataTable();
            //
            //				table.Columns.Add("GroupName",typeof(int));
            //				table.Columns.Add("my_X",typeof(double));
            //				table.Columns.Add("my_Y",typeof(double));
                #endregion

                // Z ���� ���Ѵ�
                SAClass1.Cal_Z_Data();

                for(int i = 0 ; i < SAClass1.Sgraph.Count ; i++)
                {
                    ClsData cls = (ClsData)SAClass1.Sgraph[i];

                    pSeries1 = new DataPlotter.DataSeries();

                    pSeries1.Name  = "Data 01";
                    pSeries1.Color = Color.Blue ;

                    #region ����
            //					for(int j = 0 ; j < cls.GetCount() ; j++)
            //					{
            //						DataRow row = table.NewRow();
            //						ar[0] = i.ToString();
            //						ar[1] = cls.GetData(j).ToString();
            //						ar[2] = cls.GetData(j).ToString();
            //						row.ItemArray = ar;
            //						table.Rows.Add(row);
            //					}
                    #endregion

                    pSeries1.XData = SAClass1.Frequency.GetData();
                    pSeries1.YData = cls.GetData();

                    // Z ���� �ִ´�
                    pSeries1.ZData = new double[1];
                    pSeries1.ZData[0] = SAClass1.Get_Z_Data(i);

                    DataExist = true;

                    plotter1.Series.Add(pSeries1);
                }

                if(DataExist == true)
                {
                    #region ����
            //					ultraChart1.DataSource = table;
            //					ultraChart1.ScatterChart.IconSize = Infragistics.UltraChart.Shared.Styles.SymbolIconSize.Small;
            //					ultraChart1.ScatterChart.ConnectWithLines = true;
                    #endregion

                    plotter1.YLabel = "Parameter Value";
                    plotter1.Interval = 2;
                    plotter1.AutoRange();
                    plotter1.Refresh();
                }
            }
        }
        public void GraphDraw(string strType)
        {
            DataPlotter.DataSeries pSeries1 = new DataPlotter.DataSeries();

            //plotter1.ColorBg = Color.LightYellow;
            plotter1.ColorGrid = Color.LightGray;
            //plotter1.XLogBase = 0;
            plotter1.XRangeStart = 0;
            plotter1.XRangeEnd   = 8000;
            plotter1.XGrid       = 1000;
            //plotter1.YLogBase = 0;
            plotter1.YRangeStart = 0;
            plotter1.YRangeEnd   = 1;
            plotter1.YGrid       = 2;
            plotter1.Series.Clear();

            pSeries1.Name  = "Data 01";
            pSeries1.Color = Color.Blue;

            bool DataExist = false;

            if (MPALayer1 != null)
            {
                #region 예전
//				object [] ar = new object[3];
//
//				DataTable table = new DataTable();
//
//				table.Columns.Add("GroupName",typeof(int));
//				table.Columns.Add("my_X",typeof(double));
//				table.Columns.Add("my_Y",typeof(double));
                #endregion

                if (strType == "")
                {
                    strType = "Absorption Coefficient for rigid backing";
                }

                if (strType == "Absorption Coefficient for rigid backing")
                {
                    #region 예전
//					for(int i = 0 ; i < MPALayer1.Frequency.GetCount() ; i++)
//					{

//						DataRow row = table.NewRow();
//						ar[0] = i.ToString();
//						ar[1] = MPALayer1.Frequency.GetData(i).ToString();
//						ar[2] = MPALayer1.RigidBacking.GetData(i).ToString();
//						row.ItemArray = ar;
//						table.Rows.Add(row);
//					}
                    #endregion

                    pSeries1.XData = MPALayer1.Frequency.GetData();
                    pSeries1.YData = MPALayer1.RigidBacking.GetData();

                    DataExist = true;

                    plotter1.YGrid = 0.2;
                }
                else if (strType == "Absorption Coefficient for anechoic termination")
                {
                    #region 예전
//					for(int i = 0 ; i < MPALayer1.Frequency.GetCount() ; i++)
//					{

//						DataRow row = table.NewRow();
//						ar[0] = i.ToString();
//						ar[1] = MPALayer1.Frequency.GetData(i).ToString();
//						ar[2] = MPALayer1.AnechoicTermination.GetData(i).ToString();
//						row.ItemArray = ar;
//						table.Rows.Add(row);
//					}
                    #endregion

                    pSeries1.XData = MPALayer1.Frequency.GetData();
                    pSeries1.YData = MPALayer1.AnechoicTermination.GetData();

                    DataExist = true;

                    plotter1.YGrid = 0.2;
                }
                else if (strType == "Transmission Loss")
                {
                    #region 예전
//					for(int i = 0 ; i < MPALayer1.Frequency.GetCount() ; i++)
//					{

//						DataRow row = table.NewRow();
//						ar[0] = i.ToString();
//						ar[1] = MPALayer1.Frequency.GetData(i).ToString();
//						ar[2] = MPALayer1.TransmissionLoss.GetData(i).ToString();
//						row.ItemArray = ar;
//						table.Rows.Add(row);
//					}
                    #endregion

                    pSeries1.XData = MPALayer1.Frequency.GetData();
                    pSeries1.YData = MPALayer1.TransmissionLoss.GetData();

                    DataExist = true;

                    plotter1.YGrid       = 20;
                    plotter1.YRangeEnd   = 100;
                    plotter1.XRangeStart = 0;
                    plotter1.XRangeEnd   = 8000;
                }

                if (DataExist == true)
                {
                    #region 예전
//					ultraChart1.DataSource = table;
//					ultraChart1.ScatterChart.IconSize = Infragistics.UltraChart.Shared.Styles.SymbolIconSize.Small;
//					ultraChart1.ScatterChart.ConnectWithLines = true;
                    #endregion

                    if (dOctave != 0)
                    {
                        //plotter1.IsOctave = true;

                        if (dOctave == 2)
                        {
                            plotter1.Interval = 2;
                        }
                        else
                        {
                            plotter1.Interval = 0;
                        }
                    }
                    else
                    {
                        plotter1.IsOctave = false;

                        plotter1.XRangeEnd = 7000;
                        plotter1.XGrid     = 1000;
                    }
                    plotter1.Series.Clear();
                    plotter1.Series.Add(pSeries1);
                    plotter1.Refresh();
                }
//				else
//				{
//					NullGraph();
//				}
            }
//			else
//			{
//				NullGraph();
//			}
        }
        public void GraphDraw(string strType)
        {
            DataPlotter.DataSeries pSeries1 = new DataPlotter.DataSeries();

            //plotter1.ColorBg = Color.LightYellow;
            plotter1.ColorGrid = Color.LightGray;
            //plotter1.XLogBase = 0;
            plotter1.XRangeStart = 0;
            plotter1.XRangeEnd = 8000;
            plotter1.XGrid = 1000;
            //plotter1.YLogBase = 0;
            plotter1.YRangeStart = 0;
            plotter1.YRangeEnd = 1;
            plotter1.YGrid = 2;
            plotter1.Series.Clear();

            pSeries1.Name  = "Data 01";
            pSeries1.Color = Color.Blue ;

            bool DataExist = false;

            if(MPALayer1 != null)
            {
                #region ����
            //				object [] ar = new object[3];
            //
            //				DataTable table = new DataTable();
            //
            //				table.Columns.Add("GroupName",typeof(int));
            //				table.Columns.Add("my_X",typeof(double));
            //				table.Columns.Add("my_Y",typeof(double));
                #endregion

                if(strType == "")
                {
                    strType = "Absorption Coefficient for rigid backing";
                }

                if(strType == "Absorption Coefficient for rigid backing")
                {
                    #region ����
            //					for(int i = 0 ; i < MPALayer1.Frequency.GetCount() ; i++)
            //					{

            //						DataRow row = table.NewRow();
            //						ar[0] = i.ToString();
            //						ar[1] = MPALayer1.Frequency.GetData(i).ToString();
            //						ar[2] = MPALayer1.RigidBacking.GetData(i).ToString();
            //						row.ItemArray = ar;
            //						table.Rows.Add(row);
            //					}
                    #endregion

                    pSeries1.XData = MPALayer1.Frequency.GetData();
                    pSeries1.YData = MPALayer1.RigidBacking.GetData();

                    DataExist = true;

                    plotter1.YGrid = 0.2;
                }
                else if(strType == "Absorption Coefficient for anechoic termination")
                {
                    #region ����
            //					for(int i = 0 ; i < MPALayer1.Frequency.GetCount() ; i++)
            //					{

            //						DataRow row = table.NewRow();
            //						ar[0] = i.ToString();
            //						ar[1] = MPALayer1.Frequency.GetData(i).ToString();
            //						ar[2] = MPALayer1.AnechoicTermination.GetData(i).ToString();
            //						row.ItemArray = ar;
            //						table.Rows.Add(row);
            //					}
                    #endregion

                    pSeries1.XData = MPALayer1.Frequency.GetData();
                    pSeries1.YData = MPALayer1.AnechoicTermination.GetData();

                    DataExist = true;

                    plotter1.YGrid = 0.2;
                }
                else if(strType == "Transmission Loss")
                {
                    #region ����
            //					for(int i = 0 ; i < MPALayer1.Frequency.GetCount() ; i++)
            //					{

            //						DataRow row = table.NewRow();
            //						ar[0] = i.ToString();
            //						ar[1] = MPALayer1.Frequency.GetData(i).ToString();
            //						ar[2] = MPALayer1.TransmissionLoss.GetData(i).ToString();
            //						row.ItemArray = ar;
            //						table.Rows.Add(row);
            //					}
                    #endregion

                    pSeries1.XData = MPALayer1.Frequency.GetData();
                    pSeries1.YData = MPALayer1.TransmissionLoss.GetData();

                    DataExist = true;

                    plotter1.YGrid = 20;
                    plotter1.YRangeEnd = 100;
                    plotter1.XRangeStart = 0;
                    plotter1.XRangeEnd = 8000;
                }

                if(DataExist == true)
                {
                    #region ����
            //					ultraChart1.DataSource = table;
            //					ultraChart1.ScatterChart.IconSize = Infragistics.UltraChart.Shared.Styles.SymbolIconSize.Small;
            //					ultraChart1.ScatterChart.ConnectWithLines = true;
                    #endregion

                    if(dOctave != 0)
                    {
                        //plotter1.IsOctave = true;

                        if(dOctave == 2)
                        {
                            plotter1.Interval = 2;
                        }
                        else
                        {
                            plotter1.Interval = 0;
                        }
                    }
                    else
                    {
                        plotter1.IsOctave = false;

                        plotter1.XRangeEnd = 7000;
                        plotter1.XGrid = 1000;
                    }
                    plotter1.Series.Clear();
                    plotter1.Series.Add(pSeries1);
                    plotter1.Refresh();
                }
            //				else
            //				{
            //					NullGraph();
            //				}
            }
            //			else
            //			{
            //				NullGraph();
            //			}
        }
Esempio n. 7
0
        public void GraphDraw_Result(string strPerformance)
        {
            DataPlotter.DataSeries pSeries1 = new DataPlotter.DataSeries();

            //plotter1.ColorBg = Color.LightYellow;
            plotter1.ColorGrid = Color.LightGray;
            //plotter1.XLogBase = 0;
            plotter1.XRangeStart = 0;
            plotter1.XRangeEnd   = 8000;
            plotter1.XGrid       = 1000;
            //plotter1.YLogBase = 0;
            plotter1.YRangeStart = 0;
            plotter1.YRangeEnd   = 1;
            plotter1.YGrid       = 0.2;
            plotter1.Series.Clear();

            pSeries1.Name  = "Data 01";
            pSeries1.Color = Color.Red;

            plotter1.bIsColorMap = false;
            plotter1.IsOctave    = false;

            bool DataExist = false;

            plotter1.Series.Clear();

            if (SAClass1 != null)
            {
                #region 예전
//				object [] ar = new object[3];
//
//				DataTable table = new DataTable();
//
//				table.Columns.Add("GroupName",typeof(int));
//				table.Columns.Add("my_X",typeof(double));
//				table.Columns.Add("my_Y",typeof(double));
                #endregion

                if (strPerformance == null || strPerformance == "")
                {
                    strPerformance = "Transmission Loss";
                }

                if (strPerformance == "Transmission Loss")
                {
                    #region 예전
//					for(int i = 0 ; i < SAClass1.Frequency.GetCount() ; i++)
//					{
//						DataRow row = table.NewRow();
//						ar[0] = i.ToString();
//						ar[1] = SAClass1.Frequency.GetData(i).ToString();
//						ar[2] = SAClass1.Rgraph_TL.GetData(i).ToString();
//						row.ItemArray = ar;
//						table.Rows.Add(row);
//					}
                    #endregion

                    DataExist = true;

                    pSeries1.XData = SAClass1.Frequency.GetData();
                    pSeries1.YData = SAClass1.Rgraph_TL.GetData();

                    plotter1.YGrid     = 20;
                    plotter1.YRangeEnd = 100;
                }
                else if (strPerformance == "Absorption coefficient for rigid backing")
                {
                    #region 예전
//					for(int i = 0 ; i < SAClass1.Frequency.GetCount() ; i++)
//					{
//						DataRow row = table.NewRow();
//						ar[0] = i.ToString();
//						ar[1] = SAClass1.Frequency.GetData(i).ToString();
//						ar[2] = SAClass1.Rgraph_RB.GetData(i).ToString();
//						row.ItemArray = ar;
//						table.Rows.Add(row);
//					}
                    #endregion

                    DataExist = true;

                    pSeries1.XData = SAClass1.Frequency.GetData();
                    pSeries1.YData = SAClass1.Rgraph_RB.GetData();
                }
                else if (strPerformance == "Absorption coefficient for anechoic termination")
                {
                    #region 예전
//					for(int i = 0 ; i < SAClass1.Frequency.GetCount() ; i++)
//					{
//						DataRow row = table.NewRow();
//						ar[0] = i.ToString();
//						ar[1] = SAClass1.Frequency.GetData(i).ToString();
//						ar[2] = SAClass1.Rgraph_AT.GetData(i).ToString();
//						row.ItemArray = ar;
//						table.Rows.Add(row);
//					}
                    #endregion

                    DataExist = true;

                    pSeries1.XData = SAClass1.Frequency.GetData();
                    pSeries1.YData = SAClass1.Rgraph_AT.GetData();
                }

                if (DataExist == true)
                {
                    #region 예전
//					ultraChart1.DataSource = table;
//					ultraChart1.ScatterChart.IconSize = Infragistics.UltraChart.Shared.Styles.SymbolIconSize.Small;
//					ultraChart1.ScatterChart.ConnectWithLines = true;
                    #endregion

                    if (pSeries_Prev != null)
                    {
                        plotter1.Series.Add(pSeries_Prev);
                    }
                    plotter1.Series.Add(pSeries1);

                    plotter1.Refresh();
                }
            }
        }
        public void GraphDraw(MPEClass mpeClass)
        {
            DataPlotter.DataSeries pSeries1 = new DataPlotter.DataSeries();
            DataPlotter.DataSeries pSeries2 = new DataPlotter.DataSeries();
            DataPlotter.DataSeries pSeries3;
            DataPlotter.DataSeries pSeries4;
            DataPlotter.DataSeries pSeries5;
            DataPlotter.DataSeries pSeries6;
            DataPlotter.DataSeries pSeries7;
            DataPlotter.DataSeries pSeries8;

            //plotter1.ColorBg = Color.LightYellow;
            plotter1.ColorGrid = Color.LightGray;
            //plotter1.XLogBase = 0;
            plotter1.XRangeStart = -100;
            plotter1.XRangeEnd = 1000;
            plotter1.XGrid = 100;
            //plotter1.YLogBase = 0;
            plotter1.YRangeStart = 0;
            plotter1.YRangeEnd = 1;
            plotter1.YGrid = 2;
            plotter1.Series.Clear();

            pSeries1.Name  = "Data 01";
            pSeries1.Color = Color.Blue ;

            pSeries2.Name  = "Data 02";
            pSeries2.Color = Color.Red ;

            if(mpeClass != null)
            {
                this.mpeClass = mpeClass;

                #region ����
            //				object [] ar = new object[3];

            //				DataTable table = new DataTable();

            //				table.Columns.Add("GroupName",typeof(int));
            //				table.Columns.Add("my_X",typeof(double));
            //				table.Columns.Add("my_Y",typeof(double));
                #endregion

                if(rdoAbsorption.Checked)
                {
                    #region ����
            //					for(int i = 0 ; i < mpeClass.Frequency.GetCount() ; i++)
            //					{
            //						DataRow row = table.NewRow();
            //						ar[0] = "1";
            //						ar[1] = mpeClass.Frequency.GetData(i).ToString();
            //						ar[2] = mpeClass.MAbsorption.GetData(i).ToString();
            //						row.ItemArray = ar;
            //						table.Rows.Add(row);
            //					}
                    #endregion

                    pSeries1.XData = mpeClass.Frequency.GetData();
                    pSeries1.YData = mpeClass.MAbsorption.GetData();

                    pSeries2.XData = mpeClass.Frequency.GetData();
                    pSeries2.YData = mpeClass.CAbsorption.GetData();

                    plotter1.YLabel ="Absorption Coefficient";
                    plotter1.XLabel ="Frequency [Hz]";

                }
                else
                {
                    #region ����
            //					for(int i = 0 ; i < mpeClass.Frequency.GetCount() ; i++)
            //					{
            //						DataRow row = table.NewRow();
            //						ar[0] = "1";
            //						ar[1] = mpeClass.Frequency.GetData(i).ToString();
            //						ar[2] = mpeClass.MSurfaceImpedance.GetData(i).ToString();
            //						row.ItemArray = ar;
            //						table.Rows.Add(row);
            //					}
                    #endregion

                    pSeries1.XData = mpeClass.Frequency.GetData();
                    pSeries1.YData = mpeClass.MRealSurfaceImpedance.GetData();

                    pSeries2.XData = mpeClass.Frequency.GetData();
                    pSeries2.YData = mpeClass.CRealSurfaceImpedance.GetData();

                    pSeries5 = new DataPlotter.DataSeries();
                    pSeries6 = new DataPlotter.DataSeries();

                    pSeries5.Name  = "Data 05";
                    pSeries5.Color = Color.Blue ;

                    pSeries6.Name  = "Data 06";
                    pSeries6.Color = Color.Red ;

                    pSeries5.XData = mpeClass.Frequency.GetData();
                    pSeries5.YData = mpeClass.MImagSurfaceImpedance.GetData();

                    pSeries6.XData = mpeClass.Frequency.GetData();
                    pSeries6.YData = mpeClass.CImagSurfaceImpedance.GetData();

                    plotter1.Series.Add(pSeries5);
                    plotter1.Series.Add(pSeries6);

                    plotter1.YLabel ="Normalized Surface Impdedance";
                    plotter1.XLabel ="Frequency [Hz]";
                }

            //				plotter1.IsOctave_ = true;
            //				plotter1.Interval_ = 50;
                plotter1.Series.Add(pSeries1);
                plotter1.Series.Add(pSeries2);

                for(int i = 1 ; i < mpeClass.EstData.Count ; i++)
                {
                    MPEData MPEDataTemp = (MPEData)mpeClass.EstData[i];
                    pSeries3 = new DataPlotter.DataSeries();
                    pSeries4 = new DataPlotter.DataSeries();
                    pSeries7 = new DataPlotter.DataSeries();
                    pSeries8 = new DataPlotter.DataSeries();

                    pSeries3.Name  = "Data 03";
                    pSeries3.Color = Color.Yellow ;

                    pSeries4.Name  = "Data 04";
                    pSeries4.Color = Color.Green ;

                    pSeries7.Name  = "Data 07";
                    pSeries7.Color = Color.Yellow ;

                    pSeries8.Name  = "Data 08";
                    pSeries8.Color = Color.Green ;

                    if(rdoAbsorption.Checked)
                    {
                        pSeries3.XData = MPEDataTemp.Frequency.GetData();
                        pSeries3.YData = MPEDataTemp.MAbsorption.GetData();

                        plotter1.Series.Add(pSeries3);

                        pSeries4.XData = MPEDataTemp.Frequency.GetData();
                        pSeries4.YData = MPEDataTemp.CAbsorption.GetData();

                        plotter1.Series.Add(pSeries4);
                    }
                    else
                    {
                        pSeries3.XData = MPEDataTemp.Frequency.GetData();
                        pSeries3.YData = MPEDataTemp.MRealSurfaceImpedance.GetData();

                        plotter1.Series.Add(pSeries3);

                        pSeries4.XData = MPEDataTemp.Frequency.GetData();
                        pSeries4.YData = MPEDataTemp.CRealSurfaceImpedance.GetData();

                        plotter1.Series.Add(pSeries4);

                        pSeries7.XData = mpeClass.Frequency.GetData();
                        pSeries7.YData = mpeClass.MImagSurfaceImpedance.GetData();

                        plotter1.Series.Add(pSeries7);

                        pSeries8.XData = mpeClass.Frequency.GetData();
                        pSeries8.YData = mpeClass.CImagSurfaceImpedance.GetData();

                        plotter1.Series.Add(pSeries8);
                    }
                }

                plotter1.AutoRange();
                if(rdoAbsorption.Checked)
                {
                    plotter1.YRangeStart = 0.0;
                    plotter1.YGrid = 0.2;
                    plotter1.YRangeEnd = 1.0;
                }
                else
                {
                    plotter1.YRangeStart = -20.0;
                    plotter1.YGrid = 5;
                    plotter1.YRangeEnd = 20;
                }
                plotter1.Refresh();//.DataSource = table;
            }
            //			else
            //			{
            //				NullGraph();
            //			}
        }
Esempio n. 9
0
        public void GraphDraw()
        {
            DataPlotter.DataSeries pSeries1 = new DataPlotter.DataSeries();

            ///plotter1.ColorBg = Color.LightYellow;
            plotter1.ColorGrid = Color.LightGray;
            //plotter1.XLogBase = 0;
            plotter1.XRangeStart = 0;
            plotter1.XRangeEnd   = 8000;
            plotter1.XGrid       = 1000;
            //plotter1.YLogBase = 0;
            plotter1.YRangeStart = 0;
            plotter1.YRangeEnd   = 1;
            plotter1.YGrid       = 0.2;
            plotter1.Series.Clear();

            pSeries1.Name  = "Data 01";
            pSeries1.Color = Color.Blue;

            plotter1.bIsColorMap = false;

            bool DataExist = false;

            if (SAClass1 != null)
            {
                #region 예전
//				object [] ar = new object[3];
//
//				DataTable table = new DataTable();
//
//				table.Columns.Add("GroupName",typeof(int));
//				table.Columns.Add("my_X",typeof(double));
//				table.Columns.Add("my_Y",typeof(double));

//				for(int i = 0 ; i < SAClass1.Frequency.GetCount() ; i++)
//				{
//					DataRow row = table.NewRow();
//					ar[0] = i.ToString();
//					ar[1] = SAClass1.Frequency.GetData(i).ToString();
//					try
//					{
//						ar[2] = double.Parse(SAClass1.Igraph.GetData(i).ToString());
//						if (ar[2].ToString() == "NaN") ar[2]=0;
//					}
//					catch
//					{
//						ar[2] = 0;
//					}
//					row.ItemArray = ar;
//					table.Rows.Add(row);
//
//					DataExist = true;
//				}
                #endregion

                DataExist = true;

                pSeries1.XData = SAClass1.Frequency.GetData();
                pSeries1.YData = SAClass1.Igraph.GetData();

                switch (SAClass1.GraphType)
                {
                case 1:
                    plotter1.YLabel = "Transmission Loss [dB]";
                    plotter1.XLabel = "Frequency [Hz]";
                    break;

                case 2:
                    plotter1.YLabel = "Absorption Coefficient for Rigid Backing";
                    plotter1.XLabel = "Frequency [Hz]";
                    break;

                case 3:
                    plotter1.YLabel = "Absotpyion Coefficient for Anechoic termiation";
                    plotter1.XLabel = "Frequency [Hz]";
                    break;
                }

                if (DataExist == true)
                {
                    #region 예전
//					ultraChart1.DataSource = table;
//					ultraChart1.ScatterChart.IconSize = Infragistics.UltraChart.Shared.Styles.SymbolIconSize.Small;
//					ultraChart1.ScatterChart.ConnectWithLines = true;
                    #endregion

                    plotter1.Series.Clear();
                    plotter1.Series.Add(pSeries1);
                    pSeries_Prev = pSeries1;
                    //plotter1.IsOctave = true;
                    plotter1.Refresh();
                }
//				else
//				{
//					NullGraph();
//				}
            }
//			else
//			{
//				NullGraph();
//			}
        }
Esempio n. 10
0
//		private void NullGraph()
//		{
//			object [] ar = new object[3];
//
//			DataTable table = new DataTable();
//
//			table.Columns.Add("GroupName",typeof(int));
//			table.Columns.Add("my_X",typeof(int));
//			table.Columns.Add("my_Y",typeof(int));
//
//			DataRow row = table.NewRow();
//			ar[0] = "1";
//			ar[1] = 0;
//			ar[2] = 0;
//			row.ItemArray = ar;
//			table.Rows.Add(row);
//
//			ultraChart1.DataSource = table;
//			ultraChart1.ScatterChart.IconSize = Infragistics.UltraChart.Shared.Styles.SymbolIconSize.Small;
//			ultraChart1.ScatterChart.ConnectWithLines = true;
//		}


        public void GraphDraw_Step()
        {
            DataPlotter.DataSeries pSeries1;

            //plotter1.ColorBg = Color.LightYellow;
            plotter1.ColorGrid = Color.LightGray;
            //plotter1.XLogBase = 0;
            plotter1.XRangeStart = 0;
            plotter1.XRangeEnd   = 8000;
            plotter1.XGrid       = 1000;
            //plotter1.YLogBase = 0;
            plotter1.YRangeStart = 0;
            plotter1.YRangeEnd   = 1;
            plotter1.YGrid       = 0.2;
            plotter1.Series.Clear();

            plotter1.bIsColorMap = true;
            plotter1.IsOctave    = true;

            bool DataExist = false;

            plotter1.Series.Clear();

            if (SAClass1 != null)
            {
                #region 예전
//				object [] ar = new object[3];
//
//				DataTable table = new DataTable();
//
//				table.Columns.Add("GroupName",typeof(int));
//				table.Columns.Add("my_X",typeof(double));
//				table.Columns.Add("my_Y",typeof(double));
                #endregion

                // Z 값을 구한다
                SAClass1.Cal_Z_Data();

                for (int i = 0; i < SAClass1.Sgraph.Count; i++)
                {
                    ClsData cls = (ClsData)SAClass1.Sgraph[i];

                    pSeries1 = new DataPlotter.DataSeries();

                    pSeries1.Name  = "Data 01";
                    pSeries1.Color = Color.Blue;

                    #region 예전
//					for(int j = 0 ; j < cls.GetCount() ; j++)
//					{
//						DataRow row = table.NewRow();
//						ar[0] = i.ToString();
//						ar[1] = cls.GetData(j).ToString();
//						ar[2] = cls.GetData(j).ToString();
//						row.ItemArray = ar;
//						table.Rows.Add(row);
//					}
                    #endregion

                    pSeries1.XData = SAClass1.Frequency.GetData();
                    pSeries1.YData = cls.GetData();

                    // Z 값을 넣는다
                    pSeries1.ZData    = new double[1];
                    pSeries1.ZData[0] = SAClass1.Get_Z_Data(i);

                    DataExist = true;

                    plotter1.Series.Add(pSeries1);
                }

                if (DataExist == true)
                {
                    #region 예전
//					ultraChart1.DataSource = table;
//					ultraChart1.ScatterChart.IconSize = Infragistics.UltraChart.Shared.Styles.SymbolIconSize.Small;
//					ultraChart1.ScatterChart.ConnectWithLines = true;
                    #endregion

                    plotter1.YLabel   = "Parameter Value";
                    plotter1.Interval = 2;
                    plotter1.AutoRange();
                    plotter1.Refresh();
                }
            }
        }
Esempio n. 11
0
        private string AbsorptionCoefficient_AnechoicTerminationCheck(DataSet ds,clsAbsorptionCoefficient_Find cls)
        {
            string strIDs = "";
            string strFreq = "";
            string strY = "";
            string [] arrFreq;
            string [] arrY;

            string Y_16 = ""; // ���ļ��� 16 �϶� Y ��
            string Y_31_5 = "";
            string Y_63 = "";
            string Y_125 = "";
            string Y_250 = "";
            string Y_500 = "";
            string Y_1000 = "";
            string Y_2000 = "";
            string Y_4000 = "";
            string Y_8000 = "";
            string Y_10000 = "";

            pSeries_Search = new DataPlotter.DataSeries();
            double [] dimdf_X = new double[11];
            double [] dimdf_Y = new double[11];

            pSeries_Search.Color = Color.SkyBlue;
            pSeries_Search.Name = "Search Axis";

            for(int i = 0 ; i < ds.Tables[0].Rows.Count ; i++)
            {
                bool bResult = true;

                strFreq = ds.Tables[0].Rows[i]["X_Axis"].ToString();
                strY = ds.Tables[0].Rows[i]["Y_AnechoicTermination"].ToString();
                if(strFreq != "")
                {
                    arrFreq = strFreq.Split(",".ToCharArray());
                    arrY = strY.Split(",".ToCharArray());

                    if(arrFreq.Length == arrY.Length)
                    {
                        for(int j = 0 ; j < arrFreq.Length ; j++)
                        {
                            #region DB ���� �� ���ļ����� Y �� ������ ����
                            switch(arrFreq[j].ToString())
                            {
                                case "16" :
                                    Y_16 = arrY[j].ToString();
                                    break;
                                case "31.5" :
                                    Y_31_5 = arrY[j].ToString();
                                    break;
                                case "63" :
                                    Y_63 = arrY[j].ToString();
                                    break;
                                case "125" :
                                    Y_125 = arrY[j].ToString();
                                    break;
                                case "250" :
                                    Y_250 = arrY[j].ToString();
                                    break;
                                case "500" :
                                    Y_500 = arrY[j].ToString();
                                    break;
                                case "1000" :
                                    Y_1000 = arrY[j].ToString();
                                    break;
                                case "2000" :
                                    Y_2000 = arrY[j].ToString();
                                    break;
                                case "4000" :
                                    Y_4000 = arrY[j].ToString();
                                    break;
                                case "8000" :
                                    Y_8000 = arrY[j].ToString();
                                    break;
                                case "10000" :
                                    Y_10000 = arrY[j].ToString();
                                    break;
                            }
                            #endregion
                        }

                        #region ������ ����� üũ ������ ���� �ʴ°� �ϳ��� ������ false
                        double temp_cls = 0.0;
                        double temp_db = 0.0;

                        if(cls.str500 != "")
                        {
                            temp_cls = double.Parse(cls.str500);
                            temp_db = double.Parse(Y_500);
                            if(temp_cls > temp_db)
                            {
                                bResult = false;
                            }

                            dimdf_X[5] = 500;
                            dimdf_Y[5] = temp_db;
                        }
                        if(cls.str1000 != "")
                        {
                            temp_cls = double.Parse(cls.str1000);
                            temp_db = double.Parse(Y_1000);
                            if(temp_cls > temp_db)
                            {
                                bResult = false;
                            }

                            dimdf_X[6] = 1000;
                            dimdf_Y[6] = temp_db;
                        }
                        if(cls.str2000 != "")
                        {
                            temp_cls = double.Parse(cls.str2000);
                            temp_db = double.Parse(Y_2000);
                            if(temp_cls > temp_db)
                            {
                                bResult = false;
                            }

                            dimdf_X[7] = 2000;
                            dimdf_Y[7] = temp_db;
                        }
                        if(cls.str4000 != "")
                        {
                            temp_cls = double.Parse(cls.str4000);
                            temp_db = double.Parse(Y_4000);
                            if(temp_cls > temp_db)
                            {
                                bResult = false;
                            }

                            dimdf_X[8] = 4000;
                            dimdf_Y[8] = temp_db;
                        }
                        if(cls.str8000 != "")
                        {
                            temp_cls = double.Parse(cls.str8000);
                            temp_db = double.Parse(Y_8000);
                            if(temp_cls > temp_db)
                            {
                                bResult = false;
                            }

                            dimdf_X[9] = 8000;
                            dimdf_Y[9] = temp_db;
                        }
                        if(cls.str10000 != "")
                        {
                            temp_cls = double.Parse(cls.str10000);
                            temp_db = double.Parse(Y_10000);
                            if(temp_cls > temp_db)
                            {
                                bResult = false;
                            }

                            dimdf_X[10] = 10000;
                            dimdf_Y[10] = temp_db;
                        }
                        #endregion
                    }
                    else
                    {
                        bResult = false;
                    }
                }
                else
                {
                    bResult = false;
                }

                if(bResult == true) // ���ǿ� �����ϸ�ID �� �߰��Ѵ�
                {
                    strIDs = strIDs + ds.Tables[0].Rows[i]["SGID"].ToString() + ",";
                }
            }

            pSeries_Search.XData = dimdf_X;
            pSeries_Search.YData = dimdf_Y;

            if(strIDs != "")
            {
                strIDs = strIDs.Substring(0,strIDs.Length - 1);
            }

            return strIDs;
        }
Esempio n. 12
0
        public void Search(string Category,string IncidenceCondition,string MaterialType,string Option,string Frequency,
			clsAbsorptionCoefficient_FindDetail clsAbsorptionCoefficient_RB,clsAbsorptionCoefficient_FindDetail clsAbsorptionCoefficient_AT,
			clsAbsorptionCoefficient_FindDetail clsAbsorptionCoefficient_TL,clsParameters clsParameters1,clsMultiLayer_Find clsMultiLayer_Find1,string strVendor,
			string strProducing,string strDate,int dMeasured)
        {
            string strIDs = "";
            bool bFlag = false;

            MD_DB MD_DB1 = new MD_DB();

            switch(Option)
            {
                case "Absorption coefficient-rigid backing":
                    dsSearchResult = MD_DB1.Search(Category,IncidenceCondition,MaterialType,Frequency,clsAbsorptionCoefficient_RB.strName,strVendor,strProducing,strDate,dMeasured);
                    strIDs = AbsorptionCoefficient_RigidBackingCheck(dsSearchResult,clsAbsorptionCoefficient_RB);
                    break;
                case "Absorption coefficient-anechoic termination":
                    dsSearchResult = MD_DB1.Search(Category,IncidenceCondition,MaterialType,Frequency,clsAbsorptionCoefficient_AT.strName,strVendor,strProducing,strDate,dMeasured);
                    strIDs = AbsorptionCoefficient_AnechoicTerminationCheck(dsSearchResult,clsAbsorptionCoefficient_AT);
                    break;
                case "Transmission Loss":
                    dsSearchResult = MD_DB1.Search(Category,IncidenceCondition,MaterialType,Frequency,clsAbsorptionCoefficient_TL.strName,strVendor,strProducing,strDate,dMeasured);
                    strIDs = TransmissionLossCheck(dsSearchResult,clsAbsorptionCoefficient_TL);
                    break;
                case "Parameters":
                    dsSearchResult = MD_DB1.Search(Category,IncidenceCondition,MaterialType,Frequency,clsParameters1.strName,strVendor,strProducing,strDate,dMeasured);
                    strIDs = ParametersCheck(dsSearchResult,clsParameters1);

                    pSeries_Search = null;
                    break;
                case "MultiLayer":
                    dsSearchResult = MD_DB1.Search("Multi",IncidenceCondition,MaterialType,Frequency,"",strVendor,strProducing,strDate,dMeasured);
                    Category = "Multi";
                    strIDs = MultiLayerCheck(dsSearchResult,clsMultiLayer_Find1.strName,clsMultiLayer_Find1.strTotalThick);
                    bFlag = true;

                    pSeries_Search = null;
                    break;
                case "Select":
                    dsSearchResult = MD_DB1.Search(Category,IncidenceCondition,MaterialType,Frequency,"",strVendor,strProducing,strDate,dMeasured);
                    bFlag = true;

                    pSeries_Search = null;
                    break;
            }
            if(bFlag == false)
            {
                dsSearchResult = MD_DB1.Search_IDs(Category,strIDs);
            }

            strSingle_Multi = Category;

            lstSearchResultList.Items.Clear();

            if(dsSearchResult != null)
            {
                if(Category != "Single")
                {
                    MultiListSetting();
                }
                else
                {
                    SearchResultList_Init();

                    MeterialTypeChange(this.strMeterialTypeChange);
                }

                for(int i = 0 ; i < dsSearchResult.Tables[0].Rows.Count ; i++)
                {
                    ListViewItem item = new ListViewItem();

                    if(Category == "Single")
                    {
                        item.SubItems[0].Text = dsSearchResult.Tables[0].Rows[i]["SID"].ToString();

                        item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["Name"].ToString());
                        item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["Thick"].ToString());
                        item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["BulkDens"].ToString());
                        item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["LossFactor"].ToString());
                        item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["FlowRes"].ToString());
                        item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["Ymodulus"].ToString());
                        item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["PoissionR"].ToString());
                        item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["ThermalCL"].ToString());
                        item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["ViscousCL"].ToString());
                        item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["Prosity"].ToString());
                        item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["Sfactor"].ToString());
                        item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["EmP1"].ToString());
                        item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["PRatioP1"].ToString());
                        item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["DensityP1"].ToString());
                        item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["EmP2"].ToString());
                        item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["HP2"].ToString());
                        item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["HP2"].ToString());
                        item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["HP1"].ToString());
                        item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["PRatioP2"].ToString());
                        item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["MID"].ToString());

                        bIsSingle = true;
                    }
                    else
                    {
                        item.SubItems[0].Text = dsSearchResult.Tables[0].Rows[i]["LID"].ToString();

                        item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["MultiLayer.Name"].ToString());
                        item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["TotalThick"].ToString());

                        bIsSingle = false;
                    }

                    lstSearchResultList.Items.Add(item);

                    //strSearchResult_Selected_ID = item.SubItems[0].Text;
                }
            }

            if(dsSearchResult == null || dsSearchResult.Tables[0].Rows.Count == 0)
            {
                MessageBox.Show("�˻� ����� �����ϴ�");
            }

            pnlGraphOption.Enabled = false;
            pnlGraphOption2.Enabled = false;
        }
Esempio n. 13
0
        private string TransmissionLossCheck(DataSet ds,clsAbsorptionCoefficient_FindDetail cls)
        {
            string strIDs = "";
            string strFreq = "";
            string strY = "";
            string [] arrFreq;
            string [] arrY;

            string Y_400 = "";
            string Y_500 = "";
            string Y_630 = "";
            string Y_800 = "";
            string Y_1000 = "";
            string Y_1250 = "";
            string Y_1600 = "";
            string Y_2000 = "";
            string Y_3150 = "";
            string Y_4000 = "";
            string Y_5000 = "";
            string Y_6300 = "";
            string Y_8000 = "";
            string Y_10000 = "";

            pSeries_Search = new DataPlotter.DataSeries();
            double [] dimdf_X = new double[14];
            double [] dimdf_Y = new double[14];

            pSeries_Search.Color = Color.SkyBlue;
            pSeries_Search.Name = "Search Axis";

            for(int i = 0 ; i < ds.Tables[0].Rows.Count ; i++)
            {
                bool bResult = true;

                strFreq = ds.Tables[0].Rows[i]["X_Axis"].ToString();
                strY = ds.Tables[0].Rows[i]["Y_TransmissionLoss"].ToString();
                if(strFreq != "" && strY != "")
                {
                    arrFreq = strFreq.Split(",".ToCharArray());
                    arrY = strY.Split(",".ToCharArray());

                    if(arrFreq.Length == arrY.Length)
                    {
                        for(int j = 0 ; j < arrFreq.Length ; j++)
                        {
                            #region DB ���� �� ���ļ����� Y �� ������ ����
                            switch(arrFreq[j].ToString())
                            {
                                case "400" :
                                    Y_400 = arrY[j].ToString();
                                    break;
                                case "500" :
                                    Y_500 = arrY[j].ToString();
                                    break;
                                case "630" :
                                    Y_630 = arrY[j].ToString();
                                    break;
                                case "800" :
                                    Y_800 = arrY[j].ToString();
                                    break;
                                case "1000" :
                                    Y_1000 = arrY[j].ToString();
                                    break;
                                case "1250" :
                                    Y_1250 = arrY[j].ToString();
                                    break;
                                case "1600" :
                                    Y_1600 = arrY[j].ToString();
                                    break;
                                case "2000" :
                                    Y_2000 = arrY[j].ToString();
                                    break;
                                case "3150" :
                                    Y_3150 = arrY[j].ToString();
                                    break;
                                case "4000" :
                                    Y_4000 = arrY[j].ToString();
                                    break;
                                case "5000" :
                                    Y_5000 = arrY[j].ToString();
                                    break;
                                case "6300" :
                                    Y_6300 = arrY[j].ToString();
                                    break;
                                case "8000" :
                                    Y_8000 = arrY[j].ToString();
                                    break;
                                case "10000" :
                                    Y_10000 = arrY[j].ToString();
                                    break;
                            }
                            #endregion
                        }

                        #region ������ ����� üũ ������ ���� �ʴ°� �ϳ��� ������ false
                        double temp_cls = 0.0;
                        double temp_db = 0.0;

                        if(cls.str400 != "")
                        {
                            if(cls.strAlpha == "")
                            {
                                temp_cls = double.Parse(cls.str400);
                            }
                            else
                            {
                                temp_cls = double.Parse(cls.strAlpha);
                                temp_cls = Math.Log10(400) + temp_cls;
                            }

                            temp_db = double.Parse(Y_400);
                            if(temp_cls > temp_db)
                            {
                                bResult = false;
                            }

                            dimdf_X[0] = 400;
                            dimdf_Y[0] = temp_cls;
                        }
                        if(cls.str500 != "")
                        {
                            if(cls.strAlpha == "")
                            {
                                temp_cls = double.Parse(cls.str500);
                            }
                            else
                            {
                                temp_cls = double.Parse(cls.strAlpha);
                                temp_cls = Math.Log10(500) + temp_cls;
                            }

                            temp_db = double.Parse(Y_500);
                            if(temp_cls > temp_db)
                            {
                                bResult = false;
                            }

                            dimdf_X[1] = 500;
                            dimdf_Y[1] = temp_cls;
                        }
                        if(cls.str630 != "")
                        {
                            if(cls.strAlpha == "")
                            {
                                temp_cls = double.Parse(cls.str630);
                            }
                            else
                            {
                                temp_cls = double.Parse(cls.strAlpha);
                                temp_cls = Math.Log10(630) + temp_cls;
                            }

                            temp_db = double.Parse(Y_630);
                            if(temp_cls > temp_db)
                            {
                                bResult = false;
                            }

                            dimdf_X[2] = 630;
                            dimdf_Y[2] = temp_cls;
                        }
                        if(cls.str800 != "")
                        {
                            if(cls.strAlpha == "")
                            {
                                temp_cls = double.Parse(cls.str800);
                            }
                            else
                            {
                                temp_cls = double.Parse(cls.strAlpha);
                                temp_cls = Math.Log10(800) + temp_cls;
                            }

                            temp_db = double.Parse(Y_800);
                            if(temp_cls > temp_db)
                            {
                                bResult = false;
                            }

                            dimdf_X[3] = 800;
                            dimdf_Y[3] = temp_cls;
                        }
                        if(cls.str1000 != "")
                        {
                            if(cls.strAlpha == "")
                            {
                                temp_cls = double.Parse(cls.str1000);
                            }
                            else
                            {
                                temp_cls = double.Parse(cls.strAlpha);
                                temp_cls = Math.Log10(1000) + temp_cls;
                            }

                            temp_db = double.Parse(Y_1000);
                            if(temp_cls > temp_db)
                            {
                                bResult = false;
                            }

                            dimdf_X[4] = 1000;
                            dimdf_Y[4] = temp_cls;
                        }
                        if(cls.str1250 != "")
                        {
                            if(cls.strAlpha == "")
                            {
                                temp_cls = double.Parse(cls.str1250);
                            }
                            else
                            {
                                temp_cls = double.Parse(cls.strAlpha);
                                temp_cls = Math.Log10(1250) + temp_cls;
                            }

                            temp_db = double.Parse(Y_1250);
                            if(temp_cls > temp_db)
                            {
                                bResult = false;
                            }

                            dimdf_X[5] = 1250;
                            dimdf_Y[5] = temp_cls;
                        }
                        if(cls.str1600 != "")
                        {
                            if(cls.strAlpha == "")
                            {
                                temp_cls = double.Parse(cls.str1600);
                            }
                            else
                            {
                                temp_cls = double.Parse(cls.strAlpha);
                                temp_cls = Math.Log10(1600) + temp_cls;
                            }

                            temp_db = double.Parse(Y_1600);
                            if(temp_cls > temp_db)
                            {
                                bResult = false;
                            }

                            dimdf_X[6] = 1600;
                            dimdf_Y[6] = temp_cls;
                        }
                        if(cls.str2000 != "")
                        {
                            if(cls.strAlpha == "")
                            {
                                temp_cls = double.Parse(cls.str2000);
                            }
                            else
                            {
                                temp_cls = double.Parse(cls.strAlpha);
                                temp_cls = Math.Log10(2000) + temp_cls;
                            }

                            temp_db = double.Parse(Y_2000);
                            if(temp_cls > temp_db)
                            {
                                bResult = false;
                            }

                            dimdf_X[7] = 2000;
                            dimdf_Y[7] = temp_cls;
                        }
                        if(cls.str3150 != "")
                        {
                            if(cls.strAlpha == "")
                            {
                                temp_cls = double.Parse(cls.str3150);
                            }
                            else
                            {
                                temp_cls = double.Parse(cls.strAlpha);
                                temp_cls = Math.Log10(3150) + temp_cls;
                            }

                            temp_db = double.Parse(Y_3150);
                            if(temp_cls > temp_db)
                            {
                                bResult = false;
                            }

                            dimdf_X[8] = 3150;
                            dimdf_Y[8] = temp_cls;
                        }
                        if(cls.str4000 != "")
                        {
                            if(cls.strAlpha == "")
                            {
                                temp_cls = double.Parse(cls.str4000);
                            }
                            else
                            {
                                temp_cls = double.Parse(cls.strAlpha);
                                temp_cls = Math.Log10(4000) + temp_cls;
                            }

                            temp_db = double.Parse(Y_4000);
                            if(temp_cls > temp_db)
                            {
                                bResult = false;
                            }

                            dimdf_X[9] = 4000;
                            dimdf_Y[9] = temp_cls;
                        }
                        if(cls.str5000 != "")
                        {
                            if(cls.strAlpha == "")
                            {
                                temp_cls = double.Parse(cls.str5000);
                            }
                            else
                            {
                                temp_cls = double.Parse(cls.strAlpha);
                                temp_cls = Math.Log10(5000) + temp_cls;
                            }

                            temp_db = double.Parse(Y_5000);
                            if(temp_cls > temp_db)
                            {
                                bResult = false;
                            }

                            dimdf_X[10] = 5000;
                            dimdf_Y[10] = temp_cls;
                        }
                        if(cls.str6300 != "")
                        {
                            if(cls.strAlpha == "")
                            {
                                temp_cls = double.Parse(cls.str6300);
                            }
                            else
                            {
                                temp_cls = double.Parse(cls.strAlpha);
                                temp_cls = Math.Log10(6300) + temp_cls;
                            }

                            temp_db = double.Parse(Y_6300);
                            if(temp_cls > temp_db)
                            {
                                bResult = false;
                            }

                            dimdf_X[11] = 6300;
                            dimdf_Y[11] = temp_cls;
                        }
                        if(cls.str8000 != "")
                        {
                            if(cls.strAlpha == "")
                            {
                                temp_cls = double.Parse(cls.str8000);
                            }
                            else
                            {
                                temp_cls = double.Parse(cls.strAlpha);
                                temp_cls = Math.Log10(8000) + temp_cls;
                            }

                            temp_db = double.Parse(Y_8000);
                            if(temp_cls > temp_db)
                            {
                                bResult = false;
                            }

                            dimdf_X[12] = 8000;
                            dimdf_Y[12] = temp_cls;
                        }
                        if(cls.str10000 != "")
                        {
                            if(cls.strAlpha == "")
                            {
                                temp_cls = double.Parse(cls.str10000);
                            }
                            else
                            {
                                temp_cls = double.Parse(cls.strAlpha);
                                temp_cls = Math.Log10(10000) + temp_cls;
                            }

                            temp_db = double.Parse(Y_10000);
                            if(temp_cls > temp_db)
                            {
                                bResult = false;
                            }

                            dimdf_X[13] = 10000;
                            dimdf_Y[13] = temp_cls;
                        }
                        #endregion
                    }
                    else
                    {
                        bResult = false;
                    }
                }
                else
                {
                    bResult = false;
                }

                if(bResult == true) // ���ǿ� �����ϸ�ID �� �߰��Ѵ�
                {
                    strIDs = strIDs + ds.Tables[0].Rows[i]["SGID"].ToString() + ",";
                }
            }

            if(strIDs != "")
            {
                strIDs = strIDs.Substring(0,strIDs.Length - 1);
            }

            pSeries_Search.XData = dimdf_X;
            pSeries_Search.YData = dimdf_Y;

            return strIDs;
        }
Esempio n. 14
0
        //        private void NullGraph()
        //        {
        //            object [] ar = new object[3];
        //        
        //            DataTable table = new DataTable();
        //        
        //            table.Columns.Add("GroupName",typeof(int));
        //            table.Columns.Add("my_X",typeof(int));
        //            table.Columns.Add("my_Y",typeof(int));
        //        
        //            DataRow row = table.NewRow();
        //            ar[0] = "1";
        //            ar[1] = 0;
        //            ar[2] = 0;
        //            row.ItemArray = ar;
        //            table.Rows.Add(row);
        //
        //            ultraChart1.DataSource = table;
        //            ultraChart1.ScatterChart.IconSize = Infragistics.UltraChart.Shared.Styles.SymbolIconSize.Small;
        //            ultraChart1.ScatterChart.ConnectWithLines = true;
        //        }
        public void GraphDraw()
        {
            DataPlotter.DataSeries pSeries1;

            //plotter1.ColorBg = Color.LightYellow;
            plotter1.ColorGrid = Color.LightGray;
            //plotter1.XLogBase = 0;
            plotter1.XRangeStart = -100;
            plotter1.XRangeEnd = 1000;
            plotter1.XGrid = 100;
            //plotter1.YLogBase = 0;
            plotter1.YRangeStart = 0;
            plotter1.YRangeEnd = 1;
            plotter1.YGrid = 2;
            plotter1.Series.Clear();

            if(pSeries_Search != null)
            {
                plotter1.Series.Add(pSeries_Search);
            }

            bool DataExist = false;

            MPEData MPEData1;
            MD_DB MD_DB1 = new MD_DB();

            for(int i = 0 ; i < lstSearchResultList.SelectedIndices.Count ; i++)
            {
                dGraph_ID = MD_DB1.IsGraphExist(bIsSingle,GetMeasured(),GetIncidence(),GetFreqBand(),GetGraphType(),int.Parse(lstSearchResultList.SelectedItems[i].Text));

                if(dGraph_ID != -1)
                {
                    MPEData1 = new MPEData();
                    if(MPEData1.DBLoad(bIsSingle,dGraph_ID) == true)
                    {
                        #region ����
                        //				object [] ar = new object[3];
                        //
                        //				DataTable table = new DataTable();
                        //
                        //				table.Columns.Add("GroupName",typeof(int));
                        //				table.Columns.Add("my_X",typeof(double));
                        //				table.Columns.Add("my_Y",typeof(double));

                        //				for(int i = 0 ; i < MPEData1.Frequency.GetCount() ; i++)
                        //				{
                        //					DataRow row = table.NewRow();
                        //					ar[0] = i.ToString();
                        //					ar[1] = MPEData1.Frequency.GetData(i).ToString();
                        //					ar[2] = MPEData1.MAbsorption.GetData(i).ToString();
                        //					row.ItemArray = ar;
                        //					table.Rows.Add(row);
                        //
                        //					DataExist = true;
                        //				}
                        #endregion

                        DataExist = true;

                        pSeries1 = new DataPlotter.DataSeries();
                        pSeries1.Name  = "Data " + i.ToString();

                        int dR = (30 * i * 1000) % 256;
                        int dG = (20 * i * 200) % 256;
                        int dB = (10 * i * 10) % 256;

                        pSeries1.Color = Color.FromArgb(dR,dG,dB);

            //						switch(i)
            //						{
            //							case 0 :
            //								pSeries1.Color = Color.Blue ;
            //								break;
            //							case 1 :
            //								pSeries1.Color = Color.Red ;
            //								break;
            //							case 2 :
            //								pSeries1.Color = Color.Yellow ;
            //								break;
            //							case 3 :
            //								pSeries1.Color = Color.Green ;
            //								break;
            //						}

                        pSeries1.XData = MPEData1.Frequency.GetData();
                        pSeries1.YData = MPEData1.MAbsorption.GetData();

                        if(DataExist == true)
                        {
                            #region ����
                            //					ultraChart1.DataSource = table;
                            //					ultraChart1.ScatterChart.IconSize = Infragistics.UltraChart.Shared.Styles.SymbolIconSize.Small;
                            //					ultraChart1.ScatterChart.ConnectWithLines = true;
                            #endregion

                            if(pSeries1.XData.Length == pSeries1.YData.Length)
                            {
                                plotter1.Series.Add(pSeries1);
                            }

                            //plotter1.IsOctave_ = true;
                        }
                    }
                }
            }

            switch(GetGraphType())
            {
                case 1 :
                    plotter1.YLabel = "Absorption Coefficient for Rigid Backing";
                    plotter1.XLabel = "Frequency [Hz]";
                    break;
                case 2 :
                    plotter1.YLabel = "Absotpyion Coefficient for Anechoic termiation";
                    plotter1.XLabel = "Frequency [Hz]";
                    break;
                case 3 :
                    plotter1.YLabel = "Transmission Loss [dB]";
                    plotter1.XLabel = "Frequency [Hz]";
                    break;
            }

            plotter1.AutoRange();
            plotter1.Refresh();
        }
Esempio n. 15
0
        public void GraphDraw()
        {
            DataPlotter.DataSeries pSeries1;
            DataPlotter.DataSeries pSeries2;
            DataPlotter.DataSeries pSeries3;

            plotter1.ColorGrid   = Color.LightGray;
            plotter1.XRangeStart = 0;
            plotter1.XRangeEnd   = 6400;
            plotter1.XGrid       = 1000;
            plotter1.YRangeStart = 0;
            plotter1.YRangeEnd   = 1;
            plotter1.YGrid       = 0.2;
            plotter1.Series.Clear();

            plotter2.ColorGrid   = Color.LightGray;
            plotter2.XRangeStart = 0;
            plotter2.XRangeEnd   = 6400;
            plotter2.XGrid       = 1000;
            plotter2.YRangeStart = 0;
            plotter2.YRangeEnd   = 1;
            plotter2.YGrid       = 0.2;
            plotter2.Series.Clear();

            plotter3.ColorGrid   = Color.LightGray;
            plotter3.XRangeStart = 0;
            plotter3.XRangeEnd   = 6400;
            plotter3.XGrid       = 1000;
            plotter3.YRangeStart = 0;
            plotter3.YRangeEnd   = 60;
            plotter3.YGrid       = 10;
            plotter3.Series.Clear();

            bool DataExist = false;

            MPEData MPEData1;
            MD_DB   MD_DB1 = new MD_DB();

            int dGraph_ID = 0;

            for (int i = 0; i < strID.Length; i++)
            {
                dGraph_ID = MD_DB1.IsGraphExist(bIsSingle, Measured, Incidence, FreqBand, 1, int.Parse(strID[i]));
                if (dGraph_ID != -1)
                {
                    MPEData1 = new MPEData();

                    if (MPEData1.DBLoad(bIsSingle, dGraph_ID) == true)
                    {
                        DataExist = true;

                        pSeries1      = new DataPlotter.DataSeries();
                        pSeries1.Name = "Data " + i.ToString();

                        int dR = (30 * i * 1000) % 256;
                        int dG = (20 * i * 200) % 256;
                        int dB = (10 * i * 10) % 256;

                        pSeries1.Color = Color.FromArgb(dR, dG, dB);

//						switch(i)
//						{
//							case 0 :
//								pSeries1.Color = Color.Blue ;
//								break;
//							case 1 :
//								pSeries1.Color = Color.Red ;
//								break;
//							case 2 :
//								pSeries1.Color = Color.Yellow ;
//								break;
//							case 3 :
//								pSeries1.Color = Color.Green ;
//								break;
//						}

                        pSeries1.XData = MPEData1.Frequency.GetData();
                        pSeries1.YData = MPEData1.MAbsorption.GetData();


                        plotter1.YLabel = "Absorption Coefficient for Rigid Backing";
                        plotter1.XLabel = "Frequency [Hz]";



                        if (DataExist == true)
                        {
                            plotter1.Series.Add(pSeries1);
                        }
                    }
                }
            }

            //plotter1.AutoRange();
            plotter1.Refresh();

            for (int i = 0; i < strID.Length; i++)
            {
                dGraph_ID = MD_DB1.IsGraphExist(bIsSingle, Measured, Incidence, FreqBand, 2, int.Parse(strID[i]));
                if (dGraph_ID != -1)
                {
                    MPEData1 = new MPEData();

                    if (MPEData1.DBLoad(bIsSingle, dGraph_ID) == true)
                    {
                        DataExist = true;

                        pSeries2      = new DataPlotter.DataSeries();
                        pSeries2.Name = "Data " + i.ToString();

                        pSeries2.XData = MPEData1.Frequency.GetData();
                        pSeries2.YData = MPEData1.MAbsorption.GetData();

                        int dR = (30 * i * 1000) % 256;
                        int dG = (20 * i * 200) % 256;
                        int dB = (10 * i * 10) % 256;

                        pSeries2.Color = Color.FromArgb(dR, dG, dB);

//						switch(i)
//						{
//							case 0 :
//								pSeries2.Color = Color.Blue ;
//								break;
//							case 1 :
//								pSeries2.Color = Color.Red ;
//								break;
//							case 2 :
//								pSeries2.Color = Color.Yellow ;
//								break;
//							case 3 :
//								pSeries2.Color = Color.Green ;
//								break;
//						}

                        if (DataExist == true)
                        {
                            plotter2.Series.Add(pSeries2);
                        }

                        plotter2.YLabel = "Absotpyion Coefficient for Anechoic termiation";
                        plotter2.XLabel = "Frequency [Hz]";
                    }
                }

                //plotter2.AutoRange();
                plotter2.Refresh();
            }

            for (int i = 0; i < strID.Length; i++)
            {
                dGraph_ID = MD_DB1.IsGraphExist(bIsSingle, Measured, Incidence, FreqBand, 3, int.Parse(strID[i]));
                if (dGraph_ID != -1)
                {
                    MPEData1 = new MPEData();

                    if (MPEData1.DBLoad(bIsSingle, dGraph_ID) == true)
                    {
                        DataExist = true;

                        pSeries3      = new DataPlotter.DataSeries();
                        pSeries3.Name = "Data " + i.ToString();

                        int dR = (30 * i * 1000) % 256;
                        int dG = (20 * i * 200) % 256;
                        int dB = (10 * i * 10) % 256;

                        pSeries3.Color = Color.FromArgb(dR, dG, dB);

//						switch(i)
//						{
//							case 0 :
//								pSeries3.Color = Color.Blue ;
//								break;
//							case 1 :
//								pSeries3.Color = Color.Red ;
//								break;
//							case 2 :
//								pSeries3.Color = Color.Yellow ;
//								break;
//							case 3 :
//								pSeries3.Color = Color.Green ;
//								break;
//						}

                        pSeries3.XData = MPEData1.Frequency.GetData();
                        pSeries3.YData = MPEData1.MAbsorption.GetData();

                        plotter3.YLabel = "Transmission Loss [dB]";
                        plotter3.XLabel = "Frequency [Hz]";

                        if (DataExist == true)
                        {
                            plotter3.Series.Add(pSeries3);
                        }
                    }
                }
            }

            //plotter3.AutoRange();
            plotter3.Refresh();
        }