public void Copy(MPAMaterial MPAMaterial1) { MID = MPAMaterial1.MID; HP1 = MPAMaterial1.HP1; DensityP1 = MPAMaterial1.DensityP1; EmP1 = MPAMaterial1.EmP1; PRatioP1 = MPAMaterial1.PRatioP1; Thick = MPAMaterial1.Thick; BulkDens = MPAMaterial1.BulkDens; FlowRes = MPAMaterial1.FlowRes; SFactor = MPAMaterial1.SFactor; Porosity = MPAMaterial1.Porosity; ViscousCL = MPAMaterial1.ViscousCL; ThermalCL = MPAMaterial1.ThermalCL; Ymodulus = MPAMaterial1.Ymodulus; PoissionR = MPAMaterial1.PoissionR; LossFactor = MPAMaterial1.LossFactor; HP2 = MPAMaterial1.HP2; DensityP2 = MPAMaterial1.DensityP2; EmP2 = MPAMaterial1.EmP2; PRatioP2 = MPAMaterial1.PRatioP2; MaterTypeName = MPAMaterial1.MaterTypeName; Name = MPAMaterial1.Name; IsMaterialCreate = MPAMaterial1.IsMaterialCreate; }
public void LayerAdd() { MPAMaterial Layer; Layer = new MPAMaterial(); Layer.Copy(GetMPAMaterial(GetCount() - 1)); MatCollection.Add(Layer); }
public void LayerDelete(string strName) { for (int i = 0; i < MatCollection.Count; i++) { MPAMaterial MPAMaterial1 = GetMPAMaterial(i); if (MPAMaterial1.Name == strName) { MatCollection.RemoveAt(i); } } }
// 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)); } } }
private void btnModify_Click(object sender, System.EventArgs e) { if(edtName.Text != "") { MPAMaterial MPAMaterial1 = new MPAMaterial(); MPAMaterial1.Name = edtName.Text; switch (cboType.SelectedItem.ToString()) { case "Air": MPAMaterial1.MID = 1; break; case "Panel": MPAMaterial1.MID = 2; break; case "Impermeable membrane": MPAMaterial1.MID = 3; break; case "Permeable membrane": MPAMaterial1.MID = 4; break; case "Limp porous material": MPAMaterial1.MID = 5; break; case "Rigid porous material": MPAMaterial1.MID = 6; break; case "Elastic porous material": MPAMaterial1.MID = 7; break; case "Panel-elastic (BU)": MPAMaterial1.MID = 8; break; case "Elastic-panel (UB)": MPAMaterial1.MID = 9; break; case "Panel-elastic-panel (BB)": MPAMaterial1.MID = 10; break; } MPAMaterial1.FlowRes = long.Parse(edtFlowResistivity.Text); MPAMaterial1.Thick = double.Parse(edtThickness.Text); MPAMaterial1.LossFactor = double.Parse(edtLossFactor.Text); MPAMaterial1.BulkDens = double.Parse(edtBulkDensity.Text); MPAMaterial1.Ymodulus = long.Parse(edtYoungsModulus.Text); MPAMaterial1.PoissionR = double.Parse(edtPoissionsRatio.Text); MPAMaterial1.ThermalCL = double.Parse(edtThermalCharLength.Text); MPAMaterial1.ViscousCL = double.Parse(edtViscousCharLength.Text); MPAMaterial1.Porosity = double.Parse(edtProsity.Text); MPAMaterial1.SFactor = double.Parse(edtStructureFactor.Text); MPAMaterial1.EmP1 = double.Parse(edtEmp1.Text); MPAMaterial1.PRatioP1 = double.Parse(edtPratiop1.Text); MPAMaterial1.HP2 = double.Parse(edthp2.Text); MPAMaterial1.DensityP2 = double.Parse(edtdensityp2.Text); MPAMaterial1.HP1 = double.Parse(edthp1.Text); MPAMaterial1.DensityP1 = double.Parse(edtdensityp1.Text); MPAMaterial1.EmP2 = double.Parse(edtEmp2.Text); MPAMaterial1.PRatioP2 = double.Parse(edtPratiop2.Text); MPAMaterial1.strDate = dtDate.Value.ToString("yyyy-MM-dd"); MPAMaterial1.strVender = edtVendor.Text; MPAMaterial1.strProducing = edtProducing.Text; MPALayer1.LayerDelete(edtName.Text); MPALayer1.LayerAdd(MPAMaterial1); //MessageBox.Show(lstLayerList.SelectedIndices[0].ToString()); LayerListModify(lstLayerList.SelectedIndices[0],MPAMaterial1); } else { MessageBox.Show("Name �� �Է��Ͽ� �ֽʽÿ�."); } }
private void LayerListModify(int Index,MPAMaterial MPAMaterial1) { //ListViewItem item = lstLayerList.Items[Index]; lstLayerList.Items[Index].Text = "aa"; lstLayerList.Items[Index].SubItems[0].Text = MPAMaterial1.MaterTypeName; lstLayerList.Items[Index].SubItems[1].Text = MPAMaterial1.Thick.ToString(); lstLayerList.Items[Index].SubItems[2].Text = MPAMaterial1.BulkDens.ToString(); lstLayerList.Items[Index].SubItems[3].Text = MPAMaterial1.FlowRes.ToString(); lstLayerList.Items[Index].SubItems[4].Text = MPAMaterial1.LossFactor.ToString(); lstLayerList.Items[Index].SubItems[5].Text = MPAMaterial1.Ymodulus.ToString(); lstLayerList.Items[Index].SubItems[6].Text = MPAMaterial1.PoissionR.ToString(); lstLayerList.Items[Index].SubItems[7].Text = MPAMaterial1.ThermalCL.ToString(); lstLayerList.Items[Index].SubItems[8].Text = MPAMaterial1.ViscousCL.ToString(); lstLayerList.Items[Index].SubItems[9].Text = MPAMaterial1.Porosity.ToString(); lstLayerList.Items[Index].SubItems[10].Text = MPAMaterial1.SFactor.ToString(); lstLayerList.Items[Index].SubItems[11].Text = MPAMaterial1.EmP1.ToString(); lstLayerList.Items[Index].SubItems[12].Text = MPAMaterial1.PRatioP1.ToString(); lstLayerList.Items[Index].SubItems[13].Text = MPAMaterial1.HP2.ToString(); lstLayerList.Items[Index].SubItems[14].Text = MPAMaterial1.DensityP2.ToString(); lstLayerList.Items[Index].SubItems[15].Text = MPAMaterial1.HP1.ToString(); lstLayerList.Items[Index].SubItems[16].Text = MPAMaterial1.DensityP1.ToString(); lstLayerList.Items[Index].SubItems[17].Text = MPAMaterial1.EmP2.ToString(); lstLayerList.Items[Index].SubItems[18].Text = MPAMaterial1.PRatioP2.ToString(); lstLayerList.Items[Index].SubItems[19].Text = MPAMaterial1.strDate; lstLayerList.Items[Index].SubItems[20].Text = MPAMaterial1.strVender; lstLayerList.Items[Index].SubItems[21].Text = MPAMaterial1.strProducing; }
private void LayerListAdd(MPAMaterial MPAMaterial1) { ListViewItem item = new ListViewItem(); item.Text = "aa"; item.SubItems[0].Text = MPAMaterial1.MaterTypeName; item.SubItems.Add(MPAMaterial1.Thick.ToString()); item.SubItems.Add(MPAMaterial1.BulkDens.ToString()); item.SubItems.Add(MPAMaterial1.FlowRes.ToString()); item.SubItems.Add(MPAMaterial1.LossFactor.ToString()); item.SubItems.Add(MPAMaterial1.Ymodulus.ToString()); item.SubItems.Add(MPAMaterial1.PoissionR.ToString()); item.SubItems.Add(MPAMaterial1.ThermalCL.ToString()); item.SubItems.Add(MPAMaterial1.ViscousCL.ToString()); item.SubItems.Add(MPAMaterial1.Porosity.ToString()); item.SubItems.Add(MPAMaterial1.SFactor.ToString()); item.SubItems.Add(MPAMaterial1.EmP1.ToString()); item.SubItems.Add(MPAMaterial1.PRatioP1.ToString()); item.SubItems.Add(MPAMaterial1.HP2.ToString()); item.SubItems.Add(MPAMaterial1.DensityP2.ToString()); item.SubItems.Add(MPAMaterial1.HP1.ToString()); item.SubItems.Add(MPAMaterial1.DensityP1.ToString()); item.SubItems.Add(MPAMaterial1.EmP2.ToString()); item.SubItems.Add(MPAMaterial1.PRatioP2.ToString()); item.SubItems.Add(MPAMaterial1.strDate); item.SubItems.Add(MPAMaterial1.strVender); item.SubItems.Add(MPAMaterial1.strProducing); lstLayerList.Items.Add(item); }
public void LayerAdd(MPAMaterial Layer) { MatCollection.Add(Layer); }
public void LayerAdd() { MPAMaterial Layer; Layer = new MPAMaterial(); Layer.Copy(GetMPAMaterial(GetCount()-1)); MatCollection.Add(Layer); }
// 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)); } } }
private void btnOK_Click(object sender, System.EventArgs e) { if(edtName.Text != "") { if(DataBaseLoadCheck() == true) { this.DialogResult = DialogResult.OK; MPAMaterial MPAMaterial1 = new MPAMaterial(); MPAMaterial1.IsMaterialCreate = !this.IsDataBaseLoad; switch (cboType.SelectedItem.ToString()) { case "Air": MPAMaterial1.MID = 1; break; case "Panel": MPAMaterial1.MID = 2; break; case "Impermeable membrane": MPAMaterial1.MID = 3; break; case "Permeable membrane": MPAMaterial1.MID = 4; break; case "Limp porous material": MPAMaterial1.MID = 5; break; case "Rigid porous material": MPAMaterial1.MID = 6; break; case "Elastic porous material": MPAMaterial1.MID = 7; break; case "Panel-elastic (BU)": MPAMaterial1.MID = 8; break; case "Elastic-panel (UB)": MPAMaterial1.MID = 9; break; case "Panel-elastic-panel (BB)": MPAMaterial1.MID = 10; break; } MPAMaterial1.MaterTypeName = cboType.SelectedItem.ToString(); MPAMaterial1.FlowRes = long.Parse(edtFlowResistivity.Text); MPAMaterial1.Thick = double.Parse(edtThickness.Text); MPAMaterial1.LossFactor = double.Parse(edtLossFactor.Text); MPAMaterial1.BulkDens = double.Parse(edtBulkDensity.Text); MPAMaterial1.Ymodulus = long.Parse(edtYoungsModulus.Text); MPAMaterial1.PoissionR = double.Parse(edtPoissionsRatio.Text); MPAMaterial1.ThermalCL = double.Parse(edtThermalCharLength.Text); MPAMaterial1.ViscousCL = double.Parse(edtViscousCharLength.Text); MPAMaterial1.Porosity = double.Parse(edtProsity.Text); MPAMaterial1.SFactor = double.Parse(edtStructureFactor.Text); MPAMaterial1.EmP1 = double.Parse(edtEmp1.Text); MPAMaterial1.PRatioP1 = double.Parse(edtPratiop1.Text); MPAMaterial1.HP2 = double.Parse(edthp2.Text); MPAMaterial1.DensityP2 = double.Parse(edtdensityp2.Text); MPAMaterial1.HP1 = double.Parse(edthp1.Text); MPAMaterial1.DensityP1 = double.Parse(edtdensityp1.Text); MPAMaterial1.EmP2 = double.Parse(edtEmp2.Text); MPAMaterial1.PRatioP2 = double.Parse(edtPratiop2.Text); MPAMaterial1.Name = edtName.Text; MPAMaterial1.strDate = dtDate.Value.ToString("yyyy-MM-dd"); MPAMaterial1.strVender = edtVendor.Text; MPAMaterial1.strProducing = edtProducing.Text; MPALayer1.LayerDeleteAll(); // Single �̱� ������ �ϳ��� �����ϱ� ���ؼ� ��� ����� MPALayer1.LayerAdd(MPAMaterial1); //MPALayer1.Calc(); this.Close(); } } else { MessageBox.Show("Name �� �Է��Ͽ� �ֽʽÿ�."); } }