Ejemplo n.º 1
0
 public Form1()
 {
     if (File.Exists("config.bin"))
     {
         FileStream fs = new FileStream("config.bin", FileMode.Open);
         BinaryFormatter formatter = new BinaryFormatter();
         config = (Configuration) formatter.Deserialize(fs);
         fs.Close();
     }
     else
         config = new Configuration();
     listener = new TcpListener(config.get_ip(), config.get_port());
     InitializeComponent();
     bServerStop.Enabled = false;
 }