public void Load_Settings() { try { XmlSerializer serializer = new XmlSerializer(typeof(Settings)); if (System.IO.File.Exists(SettingsPath)) { System.IO.FileStream fs = new System.IO.FileStream(SettingsPath, System.IO.FileMode.Open); this.settings = (Settings)serializer.Deserialize(fs); fs.Close(); Report.PrintDateBar(this); Report.Print("Setting Loaded.", this); Report.Print("SettingFilePath : " + this.SettingsPath, this); Report.Print("PortNum : " + this.settings.PortNum, this); Report.Print("StartPort : " + this.settings.StartPort, this); } else { this.settings.Initialize(); this.WriteSettings(); } } catch (Exception ex) { Errorlog.Print(ex, this); } }
private void Init_Classes() { this.settings = new Settings(); this.List_ClientHosts = new List <ClientHost>(); this.List_Port = new List <int>(); this.List_DataConnection = new List <DataConnection>(); }
private void Init_Classes() { this.settings = new Settings(); this.List_ClientHosts = new List<ClientHost>(); this.List_Port = new List<int>(); this.List_DataConnection = new List<DataConnection>(); }