示例#1
0
 public Object DatabaseSync(STATIONNAME StationName, String TableName, DATAACTION Action, List <Object[]> Value)
 {
     if (TableName == "UserTB")
     {
         return(DatabaseSynchronization.SyncUser(Action, Value, StationName));
     }
     else
     {
         return(DatabaseSynchronization.SyncLog(StationName.ToString(), Action, Value));
     }
 }
示例#2
0
        private void InitializeServer()
        {
            AstroData.CreateTTCSData(this);
            TCPService = new ServiceHost(typeof(TTCSConnection.Connection));
            TCPService.Open();

            InitializeStation();

            AstroServerHandler AstroHandler = new AstroServerHandler();

            AstroHandler.StartAstroServer();

            DatabaseSynchronization.SetDBConnection(Properties.Settings.Default.DatabaseName, Properties.Settings.Default.DatabaseUserName, Properties.Settings.Default.DatabasePassword, Properties.Settings.Default.DatabaseServerName);
            FITSHandler.CreateMaximObject();
            ScriptManager.CreateScriptPool();

            ScriptEngine.NewScriptChecker("192.168.2.110", "astronet", "P@ssw0rd");
        }