示例#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
        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));
        }