예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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"));
        }