Exemplo n.º 1
0
        //        private int GetMeasured()
        //        {
        //            if(chMeasured.Checked == true)
        //            {
        //                return 1;
        //            }
        //            else
        //            {
        //                return 2;
        //            }
        //        }
        //
        //        private int GetIncidence()
        //        {
        //            if(rdoNormal.Checked == true)
        //            {
        //                return 1;
        //            }
        //            else
        //            {
        //                return 2;
        //            }
        //        }
        //
        //        private int GetFreqBand()
        //        {
        //            if(rdoOctave.Checked == true)
        //            {
        //                return 1;
        //            }
        //            else
        //            {
        //                return 2;
        //            }
        //        }
        //
        //        private int GetGraphType()
        //        {
        //            if(rdoAbsorptionCoefficient_RB.Checked == true)
        //            {
        //                return 1;
        //            }
        //            else if(rdoAbsorptionCoefficient_AT.Checked == true)
        //            {
        //                return 2;
        //            }
        //            else
        //            {
        //                return 3;
        //            }
        //        }
        //        private void rdoNormal_CheckedChanged(object sender, System.EventArgs e)
        //        {
        //            IsGraphExist();
        //        }
        //
        //        private void rdoOctave_CheckedChanged(object sender, System.EventArgs e)
        //        {
        //            IsGraphExist();
        //        }
        //
        //        private void rdoAbsorptionCoefficient_RB_CheckedChanged(object sender, System.EventArgs e)
        //        {
        //            IsGraphExist();
        //        }
        //
        //        private void rdoAbsorptionCoefficient_AT_CheckedChanged(object sender, System.EventArgs e)
        //        {
        //            IsGraphExist();
        //        }
        //
        //        private void rdoTransmissionLoss_CheckedChanged(object sender, System.EventArgs e)
        //        {
        //            IsGraphExist();
        //        }
        //
        //        private void btnView_Click(object sender, System.EventArgs e)
        //        {
        //            int dGraphType = GetGraphType();
        //
        //            if(dGraphType == 1)
        //            {
        //                GraphDraw();
        //            }
        //            else if(dGraphType == 2)
        //            {
        //                GraphDraw();
        //            }
        //            else if(dGraphType == 3)
        //            {
        //                GraphDraw();
        //            }
        //        }
        //        private void btnAdd_Click(object sender, System.EventArgs e)
        //        {
        //            if(DialogResult.OK == openFileDialog1.ShowDialog())
        //            {
        //                string strFileName = openFileDialog1.FileName;
        //
        //                FileParsing(strFileName);
        //
        //                IsGraphExist();
        //            }
        //        }
        //        public void FileParsing(string strFileName)
        //        {
        //                MPEClass MPEClass1 = new MPEClass();
        //                MPEData MPEData1 = MPEClass1.NewMPEData();
        //
        //                bool result = MPEData1.FileLoad_2(strFileName);
        //                if(result == false) // ��ȿ�� ȭ���� �ƴϸ� �����Ѵ�
        //                {
        //                    MPEClass1.DeleteMPEData(MPEData1);
        //                }
        //                else
        //                {
        //                    Save(MPEData1);
        //                }
        //        }
        //        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 btnCreate_Click(object sender, System.EventArgs e)
        {
            clsParameter clsParameter1 = new clsParameter();

            dgSingleMaterial_View dgSingleMaterial_View1 = new dgSingleMaterial_View();

            dgSingleMaterial_View1.clsParameter1 = clsParameter1;
            dgSingleMaterial_View1.IsCreate(true);
            dgSingleMaterial_View1.ShowDialog();

            ListViewItem item = new ListViewItem();
            item.SubItems[0].Text = clsParameter1.str_ID;

            item.SubItems.Add(clsParameter1.strName);
            item.SubItems.Add(clsParameter1.strThickness);
            item.SubItems.Add(clsParameter1.strFlowResistivity);
            item.SubItems.Add(clsParameter1.strLossFactor);
            item.SubItems.Add(clsParameter1.strBulkDensity);
            item.SubItems.Add(clsParameter1.strYoungsModulus);
            item.SubItems.Add(clsParameter1.strPoissionsRatio);
            item.SubItems.Add(clsParameter1.strThermalCharLength);
            item.SubItems.Add(clsParameter1.strViscousCharLength);
            item.SubItems.Add(clsParameter1.strProsity);
            item.SubItems.Add(clsParameter1.strStructureFactor);
            item.SubItems.Add("0");
            item.SubItems.Add("0");
            item.SubItems.Add("0");
            item.SubItems.Add("0");
            item.SubItems.Add("0");
            item.SubItems.Add("0");
            item.SubItems.Add("0");
            item.SubItems.Add("0");
            item.SubItems.Add(clsParameter1.strM_ID);

            lstSearchResultList.Items.Add(item);
        }
Exemplo n.º 2
0
        private void lstSearchResultList_DoubleClick(object sender, System.EventArgs e)
        {
            //pnlGraphOption.Enabled = true;

            // Ŭ���� �ο��� �����͸� MPALayer1 Ŭ������ �����ϴ� ��ƾ �߰�

            //

            //			if(bIsSingle == true)
            //			{
            strSearchResult_Selected_ID = lstSearchResultList.SelectedItems[0].Text;
            strSelectedName = lstSearchResultList.SelectedItems[0].SubItems[1].Text;
            //			}
            //			else
            //			{
            //				//strID = lstSearchResultList.SelectedItems[20].Text;
            //			}

            if(((frmMD_Main2)this.ParentForm).bIsSearchPopup == false)
            {
                //IsGraphExist();
                if(bIsSingle == true)
                {
                    clsParameter clsParameter1 = new clsParameter();

                    clsParameter1.str_ID = lstSearchResultList.SelectedItems[0].Text;
                    clsParameter1.strName = lstSearchResultList.SelectedItems[0].SubItems[1].Text;
                    clsParameter1.strThickness = lstSearchResultList.SelectedItems[0].SubItems[2].Text;
                    clsParameter1.strFlowResistivity = lstSearchResultList.SelectedItems[0].SubItems[3].Text;
                    clsParameter1.strLossFactor = lstSearchResultList.SelectedItems[0].SubItems[4].Text;
                    clsParameter1.strBulkDensity= lstSearchResultList.SelectedItems[0].SubItems[5].Text;
                    clsParameter1.strYoungsModulus = lstSearchResultList.SelectedItems[0].SubItems[6].Text;
                    clsParameter1.strPoissionsRatio = lstSearchResultList.SelectedItems[0].SubItems[7].Text;
                    clsParameter1.strThermalCharLength = lstSearchResultList.SelectedItems[0].SubItems[8].Text;
                    clsParameter1.strViscousCharLength = lstSearchResultList.SelectedItems[0].SubItems[9].Text;
                    clsParameter1.strProsity = lstSearchResultList.SelectedItems[0].SubItems[10].Text;
                    clsParameter1.strStructureFactor = lstSearchResultList.SelectedItems[0].SubItems[11].Text;
                    clsParameter1.strM_ID = lstSearchResultList.SelectedItems[0].SubItems[20].Text;

                    dgSingleMaterial_View dgSingleMaterial_View1 = new dgSingleMaterial_View();

                    dgSingleMaterial_View1.clsParameter1 = clsParameter1;
                    dgSingleMaterial_View1.IsCreate(false);
                    dgSingleMaterial_View1.ShowDialog();

                    lstSearchResultList.SelectedItems[0].SubItems[2].Text = clsParameter1.strThickness;
                    lstSearchResultList.SelectedItems[0].SubItems[3].Text = clsParameter1.strFlowResistivity;
                    lstSearchResultList.SelectedItems[0].SubItems[4].Text = clsParameter1.strLossFactor;
                    lstSearchResultList.SelectedItems[0].SubItems[5].Text = clsParameter1.strBulkDensity;
                    lstSearchResultList.SelectedItems[0].SubItems[6].Text = clsParameter1.strYoungsModulus;
                    lstSearchResultList.SelectedItems[0].SubItems[7].Text = clsParameter1.strPoissionsRatio;
                    lstSearchResultList.SelectedItems[0].SubItems[8].Text = clsParameter1.strThermalCharLength;
                    lstSearchResultList.SelectedItems[0].SubItems[9].Text = clsParameter1.strViscousCharLength;
                    lstSearchResultList.SelectedItems[0].SubItems[10].Text = clsParameter1.strProsity;
                    lstSearchResultList.SelectedItems[0].SubItems[11].Text = clsParameter1.strStructureFactor;
                    lstSearchResultList.SelectedItems[0].SubItems[20].Text = clsParameter1.strM_ID;
                }
                else
                {
                    MultiMaterial_View MultiMaterial_View1 = new MultiMaterial_View();
                    MultiMaterial_View1.strMID = strSearchResult_Selected_ID;
                    MultiMaterial_View1.strName = lstSearchResultList.SelectedItems[0].SubItems[1].Text;
                    MultiMaterial_View1.strTotalThick = lstSearchResultList.SelectedItems[0].SubItems[2].Text;
                    MultiMaterial_View1.ShowDialog();
                }
            }

            MyListClickedEvent("ListClicked",strSearchResult_Selected_ID,bIsSingle);
        }