Ejemplo n.º 1
0
 public void SaveSettings(string folder)
 {
     using (System.IO.Stream stream =
                System.IO.File.Create(System.IO.Path.Combine(folder, "LeftPort.xml")))
         LeftSettings.Save(stream);
     using (System.IO.Stream stream =
                System.IO.File.Create(System.IO.Path.Combine(folder, "RightPort.xml")))
         RightSettings.Save(stream);
 }
Ejemplo n.º 2
0
 public void LoadSettings(string folder)
 {
     using (System.IO.Stream stream =
                System.IO.File.OpenRead(System.IO.Path.Combine(folder, "LeftPort.xml")))
         LeftSettings.Load(stream);
     using (System.IO.Stream stream =
                System.IO.File.OpenRead(System.IO.Path.Combine(folder, "RightPort.xml")))
         RightSettings.Load(stream);
 }
Ejemplo n.º 3
0
 public void Open()
 {
     if (IsDisposed)
     {
         throw new ObjectDisposedException("PortSniffer");
     }
     LeftSettings.ToPort(leftPort);
     leftPort.Open();
     RightSettings.ToPort(rightPort);
     rightPort.Open();
 }