Exemple #1
0
        private void EditByModelName(string strModelName)
        {
            for (int i = 0; i < lvModelList.Items.Count; i++)
            {
                if (lvModelList.Items[i].Text == strModelName)
                {
                    SelectModelIndex = i;

                    DataManager.ModelChangeSelect(SelectModelIndex);
                    DataManager.SelectedModelName = DataManager.SelectedModel.ModelName; // 20160830 => 추가
                    DataManager.SelectedModel     = DataManager.ModelDatList[SelectModelIndex];

                    frmModelSetting frmDlg = new frmModelSetting();
                    if (frmDlg.ShowDialog() == DialogResult.OK)
                    {
                        if (frmDlg.bModelNameChange == true)
                        {
                            RefreshModelList();
                        }
                        else
                        {
                            ModelReDrawList();
                        }
                    }


                    break;
                }
            }
        }
Exemple #2
0
        private void btnEditModel_Click(object sender, EventArgs e)
        {
            if (lvModelList.SelectedItems.Count > 0)
            {
                if (MessageBox.Show("선택한 모델을 편집 하시겠습니까?", "모델 편집",
                                    MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    SelectModelIndex = lvModelList.SelectedIndices[0];


                    DataManager.ModelChangeSelect(SelectModelIndex);


                    DataManager.SelectedModelName = DataManager.SelectedModel.ModelName; // 20160830 => 추가
                    DataManager.SelectedModel     = DataManager.ModelDatList[SelectModelIndex];

                    //DataManager.SaveModelListFiles(ConfigManager.GetModelListPath);// 20160830 => 주석


                    // ---------------------------------------------
                    frmModelSetting frmDlg = new frmModelSetting();
                    if (frmDlg.ShowDialog() == DialogResult.OK)
                    {
                        //DataManager.SaveCurrentModel();// 20160830 => 주석

                        if (frmDlg.bModelNameChange == true)
                        {
                            RefreshModelList();
                        }
                        else
                        {
                            ModelReDrawList();
                        }
                    }
                    // ---------------------------------------------

                    //this.DialogResult = DialogResult.OK;
                    //this.Dispose();
                }
            }


            return;


            //if (lvModelList.SelectedItems.Count > 0)
            {
                //int SelTestNumIndex = lvModelList.SelectedIndices[0];

                frmModelSetting frmDlg = new frmModelSetting();

                /*
                 * frmDlg.ModelNameStr = DataManager.ModelDatList[SelTestNumIndex].ModelName;
                 * frmDlg.ModelImageFileName = DataManager.ModelDatList[SelTestNumIndex].ImageFileName;
                 */

                if (frmDlg.ShowDialog() == DialogResult.OK)
                {
                    /*
                     * // --------------------------------------------------
                     * DataManager.ModelDatList[SelTestNumIndex].ModelName = frmDlg.ModelNameStr;
                     * DataManager.ModelDatList[SelTestNumIndex].ImageFileName = frmDlg.ModelImageFileName;
                     * // --------------------------------------------------
                     */

                    DataManager.SaveCurrentModel();

                    ModelReDrawList();
                }
            }

            /*
             * else
             * {
             *  MessageBox.Show("선택한 모델이 없습니다.");
             * }
             */
        }