Exemplo n.º 1
0
        /// <summary>
        /// Load
        /// </summary>
        /// <param name="theResult"></param>
        /// <param name="sc"></param>
        public void Load(ref SocketConfiguration sc)
        {
            try
            {
                XmlSerializer serializer = new XmlSerializer(typeof(XMLSerialize));

                using (StreamReader rd = new StreamReader(FileName))
                {
                    var XmlImport = serializer.Deserialize(rd) as XMLSerialize;
                    sc = XmlImport.SocketConfiguration;
                }
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex);
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Constructor
 /// <param name="theResult"></param>
 /// <param name="sc"></param>
 /// <param name="fileName"></param>
 public XMLSerialize(SocketConfiguration sc, string fileName)
 {
     SocketConfiguration = sc;
     FileName = fileName;
 }
Exemplo n.º 3
0
        /// <summary>
        /// DefaultSettings
        /// </summary>
        void DefaultSettings()
        {
            SelectedSocketConfiguration = new SocketConfiguration();

            SelectedSocketConfiguration.IPAdress = "127.0.0.1";
            SelectedSocketConfiguration.Port = 4712;
            SelectedSocketConfiguration.ServerClient = 2;
            SelectedSocketConfiguration.SendDelay = 1000;
            SelectedSocketConfiguration.MaxInfoTextLen = 1024;
            SelectedSocketConfiguration.PacketSize = 128;
        }