public bool renameTransientAnalysis(String name, String newname) { if (TransAnalysisGroup.ContainsKey(newname)) { log.Error(newname + " already exists"); return(false); } if (TransAnalysisGroup.ContainsKey(name)) { AbstractTransientAnalyser ta = TransAnalysisGroup[name]; TransAnalysisGroup.Remove(name); ta.renameMe(newname); TransAnalysisGroup.Add(newname, ta); // refresh components RefreshComponents(); ComponentsToNewParams(); refreshAnalysisResults(); OnMotorAnalysisResultsUpdate(this, null);//changed results (transient list) return(true); } return(false); }
//public event EventHandler<TransientResults> OnFinishTransientAnalysis = new EventHandler<TransientResults>(delegate(object sender, TransientResults r) { }); public bool addTransientAnalysis(String name = "Transient\\sample") { //rename until no more collision String origin = name; int k = 1; while (TransAnalysisGroup.ContainsKey(name)) { name = String.Format("{0}({1})", origin, k); k++; } // add new one AbstractTransientAnalyser ta = GetDefaultTransientAnalyser(); ta.Motor = Motor; ta.AnalysisName = name; TransAnalysisGroup.Add(name, ta); // refresh components RefreshComponents(); ComponentsToNewParams(); refreshAnalysisResults(); OnMotorAnalysisResultsUpdate(this, null);//changed results (transient list) return(true); }
public bool removeTransientAnalysis(String name) { if (TransAnalysisGroup.ContainsKey(name)) { AbstractTransientAnalyser ta = TransAnalysisGroup[name]; ta.removeMe(); TransAnalysisGroup.Remove(name); // refresh components RefreshComponents(); ComponentsToNewParams(); refreshAnalysisResults(); OnMotorAnalysisResultsUpdate(this, null);//changed results (transient list) return(true); } return(false); }