private void AddFitFunctionEntry(string category, string name, DateTime creationTime, string description, string fullfilename) { var info = new FileBasedFitFunctionInformation(category, name, creationTime, description, fullfilename); string filename = System.IO.Path.GetFileName(fullfilename); if (_userDefinedFunctions.ContainsKey(filename)) { _userDefinedFunctions.Remove(filename); } _userDefinedFunctions.Add(filename, info); }
/// <summary> /// This will get all user defined fit functions. /// </summary> /// <returns></returns> public FileBasedFitFunctionInformation[] GetFitFunctions() { if (null == _userDefinedFunctions) { return new FileBasedFitFunctionInformation[] { } } ; while (_threadIsWorking) { System.Threading.Thread.Sleep(100); } FileBasedFitFunctionInformation[] result = new FileBasedFitFunctionInformation[_userDefinedFunctions.Count]; int i = 0; foreach (FileBasedFitFunctionInformation info in _userDefinedFunctions.Values) { result[i++] = info; } return(result); }
public UserFileLeafNode(string text, Altaxo.Main.Services.FileBasedFitFunctionInformation func) : base(text) { FunctionInfo = func; this.Tag = func; }
/// <summary> /// This will get all user defined fit functions. /// </summary> /// <returns></returns> public FileBasedFitFunctionInformation[] GetFitFunctions() { if (null == _userDefinedFunctions) return new FileBasedFitFunctionInformation[] { }; while (_threadIsWorking) System.Threading.Thread.Sleep(100); FileBasedFitFunctionInformation[] result = new FileBasedFitFunctionInformation[_userDefinedFunctions.Count]; int i = 0; foreach (FileBasedFitFunctionInformation info in _userDefinedFunctions.Values) result[i++] = info; return result; }
void AddFitFunctionEntry(string category, string name, DateTime creationTime, string description, string fullfilename) { FileBasedFitFunctionInformation info = new FileBasedFitFunctionInformation(category, name, creationTime, description, fullfilename); string filename = System.IO.Path.GetFileName(fullfilename); if (_userDefinedFunctions.ContainsKey(filename)) _userDefinedFunctions.Remove(filename); _userDefinedFunctions.Add(filename, info); }