/// <summary>
 /// Adds a new stream to the file.
 /// </summary>
 /// <param name="state">StreamState passed by the UI</param>
 public override void AddNewStream(StreamState state)
 {
   var index = DocumentStreams.FindIndex(b => b.Stream.id == state.Stream.id);
   if (index == -1)
   {
     DocumentStreams.Add(state);
     WriteStateToFile();
   }
 }
        public override void WriteStreamsToFile(List <StreamState> streams)
        {
            StreamStateManager.ClearStreamStateList(Model);

            foreach (var s in streams)
            {
                DocumentStreams.Add(s);
                WriteStateToFile();
            }
            //throw new NotImplementedException();
        }