Ejemplo n.º 1
0
 public void Initialize(CommunicationsModel communicationsModel)
 {
     StreamingPublisherCommunicationsModel = communicationsModel.StreamingPublisherCommunicationsModel;
     StreamingPublisherTopic = communicationsModel.StreamingPublisherTopic;
     SSHConnectionModel      = communicationsModel.SSHConnectionModel;
     SSHStartRecordCommand   = communicationsModel.SSHStartRecordCommand;
     SSHStopRecordCommand    = communicationsModel.SSHStopRecordCommand;
     SSHStartPlaybackCommand = communicationsModel.SSHStartPlaybackCommand;
     SSHStopPlaybackCommand  = communicationsModel.SSHStopPlaybackCommand;
 }
Ejemplo n.º 2
0
 public bool LoadFromXml(string filename)
 {
     if (filename.Length > 0 && System.IO.File.Exists(filename))
     {
         try
         {
             XmlSerializer       serializer          = new XmlSerializer(typeof(CommunicationsModel));
             FileStream          fs                  = new FileStream(filename, FileMode.Open);
             CommunicationsModel communicationsModel = (CommunicationsModel)serializer.Deserialize(fs);
             fs.Close();
             Initialize(communicationsModel);
             return(true);
         }
         catch (Exception)
         {
             return(false);
         }
     }
     return(false);
 }