private void btnERMS_Click(object sender, EventArgs e) { var model = JsonFileList.FirstOrDefault(x => x.IsMode); var selected = JsonFileList.Where(x => x.IsSeleted && x.IsMode == false).ToList(); if (selected.Count == 0) { MessageBox.Show("No Model or No Selected"); return; } //this.SavedFolder = this.txtNewJsonFolder.Text; //if (!FileHelper.ExistFolder(this.SavedFolder)) //{ // MessageBox.Show("Saved Folder not existed"); // return; //} var frm = new frmManageERMS(); frm.ParameterList = ParameterList; frm.ValueList = ValueList; frm.NeedUpdateJsons = selected; frm.BindNodes(""); frm.ShowDialog(); BindJsonFileItemAction(); }
public void BindMode(string id) { foreach (var item in this.JsonControlList) { var ji = JsonFileList.FirstOrDefault(x => x.Id == item.GUID); if (item.GUID != id) { item.IsModel = false; ji.IsMode = false; } else { item.IsModel = true; ji.IsMode = true; } } }
private void btnCopyFromModel_Click(object sender, EventArgs e) { var model = JsonFileList.FirstOrDefault(x => x.IsMode); var selected = JsonFileList.Where(x => x.IsSeleted && x.IsMode == false).ToList(); if (model == null || selected.Count == 0) { MessageBox.Show("No Model or No Selected"); return; } this.SavedFolder = this.txtNewJsonFolder.Text; if (!FileHelper.ExistFolder(this.SavedFolder)) { MessageBox.Show("Saved Folder not existed"); return; } var list = new List<object>(); list.Add(model); list.Add(selected); base.PrepareExecute(); base.StartExecute(CopyFromModelDele, list); }