private void updatemodel_bttn_Click(object sender, EventArgs e) { if (status_rtb.Text.Contains("Feature tree imported") && status_rtb.Text.Contains("Model imported")) { if (flag = true) { if (File.Exists("txtfolder\\model_subtree_guncel.txt")) { File.Delete("txtfolder\\model_subtree_guncel.txt"); } flag = FeatureProcess.updatetreeviaFeture(openfeaturemodel_tb.Text); //ModelUpdate.updateModel(); ModelUpdate.updateModel_new(); //bu kısım mcm den parse edilerek oluşturlan txt lerde value değerlerini güncelleyerek mcm'e tekrar yazdıracak. foreach (ModelTree item in ModelUpdate.CreateModelTree()) { McmParser Xmlpars = new McmParser(openmodelpath_tb.Text, FileProcess.RemoveSpecialCharacters(item.parent) + ".mcm"); Xmlpars.WriteXmlNewValues(); } //status_rtb.Clear(); status_rtb.AppendText("*** Model updated ***\n"); button1.Enabled = true; openmatelo_btn.Visible = true; } } else { MessageBox.Show("Please Import Feature Model and MAtelo Model!"); } }
private void exportmodel_btn_Click(object sender, EventArgs e) { if (openmodelpath_tb.Text == "") { MessageBox.Show("Please Select Matelo Project!"); } else { foreach (ModelTree item in ModelUpdate.CreateModelTree()) { McmParser Xmlpars = new McmParser(openmodelpath_tb.Text, FileProcess.RemoveSpecialCharacters(item.parent) + ".mcm"); Xmlpars.XmlParsing(); } //status_rtb.Clear(); status_rtb.AppendText("*** Model imported ***\n"); } }