Example #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); }
        }
Example #2
0
 private void FormLoad_Load(object sender, EventArgs e)
 {
     //隐藏Windows任务栏
     SysBLL.ShowWindow(SysBLL.FindWindow("Shell_TrayWnd", null), SysBLL.SW_HIDE);
     //设置鼠标是否可见
     SysBLL.ShowCursor(SysBLL.IsShowCursor);
 }
Example #3
0
 /// <summary>
 /// 主程序初始化
 /// </summary>
 private void Initialize()
 {
     //鼠标显示或隐藏
     SysBLL.ShowCursor(SysBLL.IsShowCursor);
     //设置页面滚动信息
     this.GClbl.Dispatcher.Invoke(new setTextBlockTextDelegate(setTextBlockText), this.GClbl, SysConfigHelper.readerNode("mainTopInfo"));
     //绑定天气更新事件
     this.weatherWorker.DoWork += new DoWorkEventHandler(this.weatherWorker_DoWork);
     this.weatherWorker.RunWorkerAsync();
     //绑定发送设备状态事件
     SysBLL.SendDeviceWorker         = new BackgroundWorker();
     SysBLL.SendDeviceWorker.DoWork += new DoWorkEventHandler(this.SendDeviceWorker_DoWork);
     SysBLL.SendDeviceWorker.RunWorkerAsync();
     //获取命令
     systemOrderWorker.DoWork += new DoWorkEventHandler(this.systemOrderWorker_DoWork);
     systemOrderWorker.RunWorkerAsync();
     //如果有卡则退卡
     MachCardBLL.backCard();
     //禁止用户插卡
     MachCardBLL.CancelWaitCard();
 }