示例#1
0
//		public MPALayer GetMPALayer()
//		{
//			return this;
//		}

        public void Copy(MPALayer MPALayer1)
        {
            if (MPALayer1 != null)
            {
                this.Name = MPALayer1.Name;
                for (int i = 0; i < MPALayer1.GetCount(); i++)
                {
                    MPAMaterial MPAMaterial1 = new MPAMaterial();
                    MatCollection.Add(MPAMaterial1);
                    this.GetMPAMaterial(i).Copy(MPALayer1.GetMPAMaterial(i));
                }
            }
        }
示例#2
0
        private void lnkLayerInformation_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
        {
            if(rdoSingle.Checked)
            {
                dgSingleLayer dgSingleLayerDialog = new dgSingleLayer();

                if(MPALayer1_Single != null)
                {
                    dgSingleLayerDialog.MPALayer1 = MPALayer1_Single;
                }

                if(DialogResult.OK == dgSingleLayerDialog.ShowDialog())
                {
                    MPALayer1_Single = new MPALayer();
                    MPALayer1_Single.Copy(dgSingleLayerDialog.MPALayer1);
                }
            }
            else
            {
                dgMultiLayer dgMultiLayerDialog = new dgMultiLayer();

                if(MPALayer1_Multi != null)
                {
                    dgMultiLayerDialog.MPALayer1 = MPALayer1_Multi;
                }

                if(DialogResult.OK == dgMultiLayerDialog.ShowDialog())
                {
                    MPALayer1_Multi = new MPALayer();
                    MPALayer1_Multi.Copy(dgMultiLayerDialog.MPALayer1);
                }
            }
        }
示例#3
0
        private void dgMultiLayer_Load(object sender, System.EventArgs e)
        {
            cboType_Bind();
            LayerList_Init();

            if(MPALayer1 != null)
            {
                MPALayer MPALayer_Temp = new MPALayer();
                MPALayer_Temp.Copy(MPALayer1);
                MPALayer1.LayerDeleteAll();

                int dCount = MPALayer_Temp.GetCount();
                for(int i = 0 ; i < dCount ; i++)
                {
                    MPAMaterial MPAMaterial1 = MPALayer_Temp.GetMPAMaterial(i);

                    cboType_Select(MPAMaterial1.MaterTypeName);
                    edtName.Text = MPAMaterial1.Name;
                    lblMID.Text = MPAMaterial1.MID.ToString();
                    edtFlowResistivity.Text = MPAMaterial1.FlowRes.ToString();
                    edtThickness.Text = MPAMaterial1.Thick.ToString();
                    edtLossFactor.Text = MPAMaterial1.LossFactor.ToString();
                    edtBulkDensity.Text = MPAMaterial1.BulkDens.ToString();
                    edtYoungsModulus.Text = MPAMaterial1.Ymodulus.ToString();
                    edtPoissionsRatio.Text = MPAMaterial1.PoissionR.ToString();
                    edtThermalCharLength.Text = MPAMaterial1.ThermalCL.ToString();
                    edtViscousCharLength.Text = MPAMaterial1.ViscousCL.ToString();
                    edtProsity.Text = MPAMaterial1.Porosity.ToString();
                    edtStructureFactor.Text = MPAMaterial1.SFactor.ToString();
                    edtEmp1.Text = MPAMaterial1.EmP1.ToString();
                    edtPratiop1.Text = MPAMaterial1.PRatioP1.ToString();
                    edthp2.Text = MPAMaterial1.HP2.ToString();
                    edtdensityp2.Text = MPAMaterial1.DensityP2.ToString();
                    edthp1.Text = MPAMaterial1.HP1.ToString();
                    edtdensityp1.Text = MPAMaterial1.DensityP1.ToString();
                    edtEmp2.Text = MPAMaterial1.EmP2.ToString();
                    edtPratiop2.Text = MPAMaterial1.PRatioP2.ToString();

                    btnAdd_Click(null,null);
                }

                edtName_Multi.Text = MPALayer_Temp.Name;
            }
        }
示例#4
0
        public dgMultiLayer()
        {
            //
            // Windows Form �����̳� ������ �ʿ��մϴ�.
            //
            InitializeComponent();

            //
            // TODO: InitializeComponent�� ȣ���� ���� ������ �ڵ带 �߰��մϴ�.
            //
            MPALayer1 = new MPALayer();
        }
示例#5
0
 //        public MPALayer GetMPALayer()
 //        {
 //            return this;
 //        }
 public void Copy(MPALayer MPALayer1)
 {
     if(MPALayer1 != null)
     {
         this.Name = MPALayer1.Name;
         for(int i = 0 ; i < MPALayer1.GetCount() ; i++)
         {
             MPAMaterial MPAMaterial1 = new MPAMaterial();
             MatCollection.Add(MPAMaterial1);
             this.GetMPAMaterial(i).Copy(MPALayer1.GetMPAMaterial(i));
         }
     }
 }
        public void GraphDraw_Multi(string strType)
        {
            DataPlotter.DataSeries pSeries1 = new DataPlotter.DataSeries();

            //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 ;

            bool DataExist = false;

            MPALayer1 = new MPALayer();
            MPALayer1.LID = int.Parse(strSearchResult_Selected_ID);
            MPALayer1.DBLoad();

            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);
            //
            //						DataExist = true;
            //					}
                    #endregion

                    DataExist = true;

                    pSeries1.XData = MPALayer1.Frequency.GetData();
                    pSeries1.YData = MPALayer1.RigidBacking.GetData();
                }
                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);
            //
            //						DataExist = true;
            //					}
                    #endregion

                    DataExist = true;

                    pSeries1.XData = MPALayer1.Frequency.GetData();
                    pSeries1.YData = MPALayer1.AnechoicTermination.GetData();
                }
                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);
            //
            //						DataExist = true;
            //					}
                    #endregion

                    DataExist = true;

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

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

                    plotter1.Series.Add(pSeries1);
                    //plotter1.IsOctave_ = true;
                    plotter1.Refresh();
                }
            //				else
            //				{
            //					NullGraph();
            //				}
            }
            //			else
            //			{
            //				NullGraph();
            //			}
        }