/// <summary>
        /// Loads a new entity from the given filepath. The path has to be valid.
        /// </summary>
        public static SfcEntity LoadFromFile(string filepath)
        {
            SfcEntity entity = new SfcEntity();

            using (FileStream stream = File.Open(filepath, FileMode.OpenOrCreate))
            {
                using (BinaryReader reader = new BinaryReader(stream))
                {
                    entity.ReadFrom(reader);
                }
            }
            return(entity);
        }
        /// <summary>
        /// Loads the sfc file and if successful, replaces the current SfcEntity
        /// returns true if it could be loaded and replaced
        /// </summary>
        public bool TryLoadData(string filepath)
        {
            SfcEntity loaded = SfcEntity.TryLoadFromFile(filepath);

            if (loaded != null)
            {
                SfcEntity = loaded;
                return(true);
            }
            else
            {
                return(false);
            }
        }
 public ProcessingData()
 {
     SfcEntity  = new SfcEntity();
     StepMaster = new StepMaster();
 }
 /// <summary>
 /// Saves the SfcEntity to a file
 /// </summary>
 public Godot.Error TrySaveData(string filepath)
 {
     return(SfcEntity.TryWriteTo(filepath));
 }