예제 #1
0
        static void InitSystem()
        {
            AllServiceConfig = new ServiceSetting <TimeSerialData>();
            AllServiceConfig.Init(null);
            AllServiceConfig.GrpThePlan(false);
            AllServiceConfig.CreateChannel(GlobalClass.TypeDataPoints.First().Key, true);          //根据不同的数据建立不同的端口 必须使用独占模式

            AllServiceConfig.AllAssetUnits.Values.ToList <AssetUnitClass>().ForEach(p => p.Run()); //打开各开关
            //RemoteCommClass<ServiceSetting>.SetRemoteInst(AllServiceConfig);
            //AllServiceConfig.AllLogs = new LogInfo().GetLogAfterDate(DateTime.Today.AddHours(-1));
        }
예제 #2
0
        static void InitSystem()
        {
            AllServiceConfig = new ServiceSetting();
            AllServiceConfig.Init(null);
            AllServiceConfig.GrpThePlan(false);
            AllServiceConfig.CreateChannel(null);

            AllServiceConfig.AllAssetUnits.Values.ToList <AssetUnitClass>().ForEach(p => p.Run());//打开各开关
            //RemoteCommClass<ServiceSetting>.SetRemoteInst(AllServiceConfig);
            //AllServiceConfig.AllLogs = new LogInfo().GetLogAfterDate(DateTime.Today.AddHours(-1));
        }
예제 #3
0
 static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     //////if (!CommitClass.LoadHtml())
     //////{
     //////    MessageBox.Show("无法加载控件!");
     //////    return;
     //////}
     AllSettings = new ServiceSetting <TimeSerialData>();
     AllSettings.Init(null);
     Application.Run(new BackTestFrm <TimeSerialData>());
 }
예제 #4
0
        static void InitSystem <T>() where T : TimeSerialData
        {
            LogableClass.ToLog("构建计算服务", "开始");
            //CalcService<T> cs = new CalcService<T>();
            LogableClass.ToLog("构建接收服务", "开始");
            //ReceiveService<T> rs = new ReceiveService<T>();
            //SubscriptData sd = new SubscriptData();
            //rs.CalcProcess = cs;
            AllServiceConfig = new ServiceSetting <TimeSerialData>();
            AllServiceConfig.Init(null);
            AllServiceConfig.GrpThePlan(false);
            AllServiceConfig.CreateChannel(GlobalClass.TypeDataPoints.First().Key);

            AllServiceConfig.AllAssetUnits.Values.ToList <AssetUnitClass>().ForEach(p => p.Run());//打开各开关
            //RemoteCommClass<ServiceSetting>.SetRemoteInst(AllServiceConfig);
            //AllServiceConfig.AllLogs = new LogInfo().GetLogAfterDate(DateTime.Today.AddHours(-1));
            DataRecSvr.Program.AllServiceConfig = AllServiceConfig;
            //rs.Start();
        }
예제 #5
0
 static void InitSystem()
 {
     AllGlobalSetting = new ServiceSetting <TimeSerialData>();
     AllGlobalSetting.Init(null);
     AllGlobalSetting.GrpThePlan(false);
 }