/// <summary>
 /// Create a new ViewModel with speaker data retrieved from server.
 /// </summary>
 /// <param name="data">Retrieved data.</param>
 public SpeakerViewModel(Speaker data)
 {
     Data            = data;
     EnrollmentAudio = new AudioViewModel();
     EditMode        = false;
     IsSaving        = false;
 }
 /// <summary>
 /// Create a new ViewModel without speaker data.
 /// </summary>
 public SpeakerViewModel()
 {
     Error           = "";
     Data            = new Speaker();
     EnrollmentAudio = new AudioViewModel();
     EditMode        = false;
     NewlyAdded      = "New";
 }
 /// <summary>
 /// Create a ViewModel without data.
 /// </summary>
 public ProtocolViewModel()
 {
     Error         = "";
     Data          = new Protocol();
     CreatedTime   = LastEditedTime = DateTime.Now;
     Speakers      = new List <SpeakerViewModel>();
     Audio         = new AudioViewModel();
     InProcess     = true;
     SearchEnabled = false;
 }
 /// <summary>
 /// Create a ViewModel using the data retrieved from server.
 /// </summary>
 /// <param name="data">Retrieved data.</param>
 public ProtocolViewModel(Protocol data)
 {
     Error    = "";
     Data     = data;
     Speakers = new List <SpeakerViewModel>();
     foreach (Speaker speaker in data.Speakers)
     {
         Speakers.Add(new SpeakerViewModel(speaker));
     }
     Audio         = new AudioViewModel();
     SearchEnabled = false;
 }
 /// <summary>
 /// Create a new ViewModel using data object retrieved from server.
 /// </summary>
 /// <param name="data">Retrieved data.</param>
 public SectionViewModel(ProtocolSection data)
 {
     Error = "";
     Data  = data;
     Audio = new AudioViewModel();
 }