예제 #1
0
        /// <summary>
        /// 程序初始化
        /// </summary>
        private void Initialize()
        {
            try
            {
                //if (!InspectKit.Inspect(SysConfigHelper.readerNode("Inspect")))//对比失败
                //{
                //    //打开主页面
                //    MainWindow mainWindow = new MainWindow();
                //    mainWindow.Show();
                //    MainWindow.Margin = new Thickness(-10, -8, -12, -10);
                //    FormStop stop = new FormStop();
                //    stop.Margin = new Thickness(0, 0, 0, 0);
                //    MainWindow.Content = stop;
                //    return;
                //}

                //北岸公馆读卡器注册表
                SysBLL.RunBat(System.AppDomain.CurrentDomain.BaseDirectory + "\\BeiAnGGOcx\\00010001\\wyzh.bat");
                SysBLL.RunBat(System.AppDomain.CurrentDomain.BaseDirectory + "\\BeiAnGGOcx\\00010001\\0001.bat");
                //物业2
                SysBLL.RunBat(System.AppDomain.CurrentDomain.BaseDirectory + "\\perp2\\prop2.bat");
                //SysBLL.RunBat(System.AppDomain.CurrentDomain.BaseDirectory + "\\BeiAnGGOcx\\wyzh.bat");
                //是否需要启动其他程序
                bool startUpOtherProject = Convert.ToBoolean(SysConfigHelper.readerNode("startUpOtherApp"));
                if (startUpOtherProject)
                {
                    StartUpApp(SysConfigHelper.readerNode("startUpOtherAppPath"));
                }
                //关闭广告屏
                killGcMp4();
                //获取缴费页面提示
                SysBLL.payPromptInfo = PayPromptAccess.queryPayPrompt(null);
                SysBLL.ShowCursor(SysBLL.IsShowCursor);
                //设置桌面背景
                SysBLL.setImagePage();
                //天气查询状态
                SysBLL.WeatherQuerystate = 1;
                //禁止用户插卡
                MachCardBLL.CancelWaitCard();
                //初始化发送设备状态时间
                SysBLL.SendDeviceStatuTime = DateTime.Now;
                if (SysBLL.IsTest.Equals("正式"))
                {
                    //广告ID
                    GCResourceAccess.adv_id = GcManage.ReadGCID();
                    //指令id
                    SystemOrderAccess.id = ComputerBLL.ReadOrderID();
                }
                else
                {
                    //广告ID
                    GCResourceAccess.adv_id = SysConfigHelper.readerNode("GcAdv_id");
                    //指令id
                    SystemOrderAccess.id = SysConfigHelper.readerNode("sysOrderId");
                }
                //电动读卡器如果有卡则吞卡
                //MachCardBLL.swallowCard();
            }
            catch (Exception ex) { logger("error:程序初始化异常:" + ex.Message); }
        }