示例#1
0
        private void frmMain_Load(object sender, EventArgs e)
        {
            Assembly     SysAssembly     = Assembly.GetEntryAssembly();
            AssemblyName SysAssemblyName = SysAssembly.GetName();

            this.toolStripStatusLabel1.Text = string.Format("版本号:{0}", SysAssemblyName.Version.ToString());
            ServerCommon.Init(this as IServerApplication, false);

            //启动所有的WCF服务
            serverPluginService.LoadAllPlugin();
            serverPluginService.LoadAllWCFService(this.WcfHostLib);
        }
示例#2
0
        public void Start()
        {
            WriteMessage("缉私系统运行监控维护服务开始启动(服务方式)!", EventLogEntryType.Information);
            serverPluginService = new ServerPluginService(this);
            serviceContainer.AddService(typeof(IServerPluginService), serverPluginService);

            //启动所有的WCF服务
            serverPluginService.LoadAllPlugin();
            serverPluginService.LoadPluginDescript();
            ServerCommon _sc = new ServerCommon();

            _sc.Init(this as IServerApplication, false);
        }
示例#3
0
        protected override void OnStart(string[] args)
        {
            // TODO: Add code here to start your service.
            bool _oracleReady = SqlHelper.IsReady();
            int  _count       = 0;

            while (!_oracleReady && (_count < 15))
            {
                Thread.Sleep(new System.TimeSpan(0, 1, 0));
                _oracleReady = SqlHelper.IsReady();
                if (!_oracleReady)
                {
                    WriteMessage(string.Format("第{0}次测试ORACLE连接失败!", _count));
                }
                _count++;
            }
            ServerCommon.Init(this as IServerApplication, false);
            serverPluginService.LoadAllPlugin();
            serverPluginService.LoadAllWCFService(this.WcfHostLib);
            WriteMessage(string.Format("{0}启动成功!", ConfigFile.SystemDisplayName));
        }
示例#4
0
        private void frmServiceMain_Load(object sender, EventArgs e)
        {
            EventLogSystemLog _log = new EventLogSystemLog("SinoSysWatchServiceLog");

            _log.WriteLog("缉私系统运行监控维护服务开始启动(程序方式)!", EventLogEntryType.Information);

            serverPluginService = new ServerPluginService(this);
            serviceContainer.AddService(typeof(IServerPluginService), serverPluginService);

            Assembly     SysAssembly     = Assembly.GetEntryAssembly();
            AssemblyName SysAssemblyName = SysAssembly.GetName();

            this.label1.Text = string.Format("版本号:{0}", SysAssemblyName.Version.ToString());

            //启动所有的WCF服务
            serverPluginService.LoadAllPlugin();
            serverPluginService.LoadPluginDescript();
            ServerCommon _sc = new ServerCommon();

            _sc.Init(this as IServerApplication, false);
        }