/// <summary>
        /// ������ ������ ������ MPEData ������Ʈ�� ����
        /// </summary>
        /// <returns></returns>
        public MPEData Copy()
        {
            // ������ �ʱⰪ�� ����
            MPEData NewData = new MPEData();
            NewData.Thickness = Thickness;
            NewData.BulkDensity = BulkDensity;
            NewData.FResist = FResist;
            NewData.SFactor = SFactor;
            NewData.Porosity = Porosity;
            NewData.ViscousCL = ViscousCL;
            NewData.ThermalCL = ThermalCL;
            NewData.Ymodulus = Ymodulus;
            NewData.PoissonR = PoissonR;
            NewData.LossFactor = LossFactor;

            NewData.EstOption = EstOption;

            NewData.FResistEst = FResistEst;
            NewData.SFactorEst = SFactorEst;
            NewData.ViscousCLEst = ViscousCLEst;
            NewData.ThermalCLEst = ThermalCLEst;
            NewData.PorosityEst = PorosityEst;
            NewData.YmodulusEst = YmodulusEst;
            NewData.PoissonREst = PoissonREst;
            NewData.LossFactorEst = LossFactorEst;

            // ���� ���� ��ƾ�� �����ؾ��ϴ��� �׽�Ʈ�� ��.
            //NewData.Frequency = Frequency;
            //NewData.MAbsorption = MAbsorption;
            //NewData.MSurfaceImpedance = MSurfaceImpedance;
            //NewData.CAbsorption = CAbsorption;
            //NewData.CSurfaceImpedance = CSurfaceImpedance;

            NewData.MID = MID;
            NewData.SID = SID;
            NewData.Name = Name;
            NewData.Temperature = Temperature;

            return NewData;
        }
示例#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();
        }
示例#3
0
 public void DeleteMPEData(MPEData obj)
 {
     EstData.Remove(obj);
 }
示例#4
0
        public MPEData NewMPEData()
        {
            MPEData MPEData_Entity = new MPEData();
            EstData.Add(MPEData_Entity);

            return MPEData_Entity;
        }
        public void Save(MPEData MPEData1)
        {
            int dID = int.Parse(strSearchResult_Selected_ID);

            HONUS.MaterialPerformanceAnalysis.Component.MPA_DB MPA_DB1 = new HONUS.MaterialPerformanceAnalysis.Component.MPA_DB();

            if(bIsSingle == true)
            {
                int dMax_ID_SingleMeterialGraph = MPA_DB1.GetMax_ID_SingleMeterialGraph();

                if(GetGraphType().ToString() == "1")
                {
                    MPA_DB1.CreateSingleMaterialGraph(dMax_ID_SingleMeterialGraph,dID,strSelectedName,GetMeasured().ToString(),edtTemperature.Text,GetIncidence().ToString()
                        ,edtAngle.Text,GetFreqBand().ToString(),GetGraphType().ToString(),MPEData1.Frequency.GetString(),MPEData1.MAbsorption.GetString(),"","");
                }
                else if(GetGraphType().ToString() == "2")
                {
                    MPA_DB1.CreateSingleMaterialGraph(dMax_ID_SingleMeterialGraph,dID,strSelectedName,GetMeasured().ToString(),edtTemperature.Text,GetIncidence().ToString()
                        ,edtAngle.Text,GetFreqBand().ToString(),GetGraphType().ToString(),MPEData1.Frequency.GetString(),"",MPEData1.MAbsorption.GetString(),"");
                }
                else if(GetGraphType().ToString() == "3")
                {
                    MPA_DB1.CreateSingleMaterialGraph(dMax_ID_SingleMeterialGraph,dID,strSelectedName,GetMeasured().ToString(),edtTemperature.Text,GetIncidence().ToString()
                        ,edtAngle.Text,GetFreqBand().ToString(),GetGraphType().ToString(),MPEData1.Frequency.GetString(),"","",MPEData1.MAbsorption.GetString());
                }
            }
            else
            {
                int dMax_ID_MultiMeterialGraph = MPA_DB1.GetMax_ID_MultiLayerMaterialGraph();

                if(GetGraphType().ToString() == "1")
                {
                    MPA_DB1.CreateMultiMaterialGraph(dMax_ID_MultiMeterialGraph,dID,strSelectedName,GetMeasured().ToString(),edtTemperature.Text,GetIncidence().ToString()
                        ,edtAngle.Text,GetFreqBand().ToString(),GetGraphType().ToString(),MPEData1.Frequency.GetString(),MPEData1.MAbsorption.GetString(),"","");
                }
                else if(GetGraphType().ToString() == "2")
                {
                    MPA_DB1.CreateSingleMaterialGraph(dMax_ID_MultiMeterialGraph,dID,strSelectedName,GetMeasured().ToString(),edtTemperature.Text,GetIncidence().ToString()
                        ,edtAngle.Text,GetFreqBand().ToString(),GetGraphType().ToString(),MPEData1.Frequency.GetString(),"",MPEData1.MAbsorption.GetString(),"");
                }
                else if(GetGraphType().ToString() == "3")
                {
                    MPA_DB1.CreateSingleMaterialGraph(dMax_ID_MultiMeterialGraph,dID,strSelectedName,GetMeasured().ToString(),edtTemperature.Text,GetIncidence().ToString()
                        ,edtAngle.Text,GetFreqBand().ToString(),GetGraphType().ToString(),MPEData1.Frequency.GetString(),"","",MPEData1.MAbsorption.GetString());
                }
            }
        }
        //        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();
        }
示例#7
0
 private void MaterialTypeInput(MPEData MPEData1)
 {
     MPEData1.MID = int.Parse(MaterialTypeds.Tables[0].Rows[cboMeterialType.SelectedIndex]["MID"].ToString());
 }
示例#8
0
        private void DB_Load(MPEData MPEData1)
        {
            MPE_DB MPE_DB1 = new MPE_DB();
            DataSet ds = MPE_DB1.GetSingleMaterialGraph(lblDataBaseLoad_ID.Text);
            string strGraphType = ds.Tables[0].Rows[0]["GraphType"].ToString();
            string strX_Axis = ds.Tables[0].Rows[0]["X_Axis"].ToString();
            string strY_RigidBacking = ds.Tables[0].Rows[0]["Y_RigidBacking"].ToString();
            string strY_AnechoicTermination = ds.Tables[0].Rows[0]["Y_AnechoicTermination"].ToString();

            if(strX_Axis != "")
            {
                string [] dstrX_Axis = strX_Axis.Split(",".ToCharArray());
                string [] dstrY_RigidBacking = strY_RigidBacking.Split(",".ToCharArray());
                string [] dstrY_AnechoicTermination = strY_AnechoicTermination.Split(",".ToCharArray());

                if(strGraphType == "1")
                {
                    for(int i = 0 ; i < dstrX_Axis.Length ; i++)
                    {
                        MPEData1.Frequency.AddData(double.Parse(dstrX_Axis[i].ToString()));
                        MPEData1.MAbsorption.AddData(double.Parse(dstrY_RigidBacking[i].ToString()));
                    }

                }
            //				else if(strGraphType == "2")
            //				{
            //					for(int i = 0 ; i < dstrX_Axis.Length ; i++)
            //					{
            //						MPEData1.Frequency.AddData(double.Parse(dstrX_Axis[i].ToString()));
            //						MPEData1.MSurfaceImpedance.AddData(double.Parse(dstrY_AnechoicTermination[i].ToString()));
            //					}
            //				}
            }
        }
示例#9
0
        public void ParameterInput(MPEData MPEData1,ucMaterialPropertiesEstimation ucMaterialPropertiesEstimation1)
        {
            MPEData1.Thickness = double.Parse(ucMaterialPropertiesEstimation1.strThickness);
            MPEData1.BulkDensity = double.Parse(ucMaterialPropertiesEstimation1.strBulkDensity);
            MPEData1.FResist = double.Parse(ucMaterialPropertiesEstimation1.strFlowResistivity);
            MPEData1.SFactor = double.Parse(ucMaterialPropertiesEstimation1.strStructureFactor);
            MPEData1.Porosity = double.Parse(ucMaterialPropertiesEstimation1.strProsity);
            MPEData1.ViscousCL = double.Parse(ucMaterialPropertiesEstimation1.strViscousCharLength)/1000000;
            MPEData1.ThermalCL = double.Parse(ucMaterialPropertiesEstimation1.strThermalCharLength)/1000000;
            MPEData1.Ymodulus = double.Parse(ucMaterialPropertiesEstimation1.strYoungsModulus);
            MPEData1.PoissonR = double.Parse(ucMaterialPropertiesEstimation1.strPoissionsRatio);
            MPEData1.LossFactor = double.Parse(ucMaterialPropertiesEstimation1.strLossFactor);

            //MPEData1.Name = ucMaterialPropertiesEstimation1.e;
            MPEData1.Temperature = double.Parse(this.edtTemperature.Text);
            MPEData1.SID = MPEClass1.SID;

            MPEData1.FResistEst = ! ucMaterialPropertiesEstimation1.IsEnableFlowResistivity;
            MPEData1.SFactorEst = ! ucMaterialPropertiesEstimation1.IsEnableStructureFactor;
            MPEData1.ViscousCLEst = ! ucMaterialPropertiesEstimation1.IsEnableViscousCharLength;
            MPEData1.ThermalCLEst = ! ucMaterialPropertiesEstimation1.IsEnableThermalCharLength;
            MPEData1.PorosityEst = ! ucMaterialPropertiesEstimation1.IsEnableProsity;
            MPEData1.YmodulusEst = ! ucMaterialPropertiesEstimation1.IsEnableYoungsModulus;
            MPEData1.PoissonREst = ! ucMaterialPropertiesEstimation1.IsEnablePoissionsRatio;
            MPEData1.LossFactorEst = ! ucMaterialPropertiesEstimation1.IsEnableLossFactor;
        }