예제 #1
0
            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);
            }
예제 #2
0
            /// <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);
            }
예제 #3
0
 public UserFileLeafNode(string text, Altaxo.Main.Services.FileBasedFitFunctionInformation func)
   : base(text)
 {
   FunctionInfo = func;
   this.Tag = func;
 }
예제 #4
0
 public UserFileLeafNode(string text, Altaxo.Main.Services.FileBasedFitFunctionInformation func)
     : base(text)
 {
     FunctionInfo = func;
     this.Tag     = func;
 }
예제 #5
0
      /// <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;
      }
예제 #6
0
      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);
      }