public CalorimeterServer(UlIniFile ini) { Ini = ini; Clients = new Dictionary <string, ClientRow>(); ClientList = new List <ClientRow>(); Udp = new UdpClient(Ini.GetInteger("Server", "port")); Devices = new ServerDevice(this); Listener = new ServerListener(this); Sender = new ServerSender(this); }
public CalorimeterClient(UlIniFile ini) { Ini = ini; string ip = Ini.GetString("Server", "ip"); int port = Ini.GetInteger("Server", "port"); IpPoint = new IPEndPoint( IPAddress.Parse(ip), port); Udp = new UdpClient(); Listener = new ClientListener(this); Sender = new ClientSender(this); Devices = new ClientDevice(this); }
static public void Create() { UserNo = 0; Authority = EUserAuthority.Viewer; Ini = new UlIniFile(csConfigIniFName); TLog = new UlLogger(); TLog.Path = Ini.GetString("Log", "TotalPath"); TLog.FName = Ini.GetString("Log", "TotalFileName"); TLog.AddHead("NOTE"); TLog.AddHead("ERROR"); TLog.AddHead("EXCEPTION"); Server = new CalorimeterServer(Ini); Db = new CalorimeterDatabase(); Db.Database = Ini.GetString("Database", "FileName"); Db.Open(); Db.Load(Ini.GetInteger("Calibrator", "CalibrationNo")); }