コード例 #1
0
ファイル: App.xaml.cs プロジェクト: luzhengning/wtPay
 public static FormLoad frmload = null;//启动初始化页面
 /// <summary>
 /// 程序入口
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Application_Startup(object sender, StartupEventArgs e)
 {
     logger("------------------------------------------------AppStart!!!");
     //启动初始化页面
     ComputerBLL.StartApp(System.AppDomain.CurrentDomain.BaseDirectory + "FormPage.exe");
     //正式OR测试
     SysBLL.IsTest = SqlLiteHelper.SqlLiteHelper.query("isTest")[0].FormalValue;
     //显示任务栏
     SysBLL.ShowWindow(SysBLL.FindWindow("Shell_TrayWnd", null), SysBLL.SW_RESTORE);
     try
     {
         //设置全局异常
         exception();
         //外部配置文件,广告文件处理
         ExternalHandle();
         //驱动管理
         DriveHandle();
         //初始化缴费按钮
         InitialiseButton();
         //程序初始化
         Initialize();
         //输出程序日志
         PrintLog();
         //打开主页面
         MainWindow mainWindow = new MainWindow();
         mainWindow.Show();
     }
     catch (Exception ex)
     {
         logger("error:程序入口函数异常:" + ex.Message + " " + ex.InnerException + ",请重启程序。");
     }
 }
コード例 #2
0
 private void 退出_Click(object sender, RoutedEventArgs e)
 {
     SysBLL.ShowWindow(SysBLL.FindWindow("Shell_TrayWnd", null), SysBLL.SW_HIDE);
     //父页面监听此变量
     SysBLL.portNum = 11;
     Util.JumpUtil.jumpCommonPage("FormMechineState");
 }
コード例 #3
0
 private void FormLoad_Load(object sender, EventArgs e)
 {
     //隐藏Windows任务栏
     SysBLL.ShowWindow(SysBLL.FindWindow("Shell_TrayWnd", null), SysBLL.SW_HIDE);
     //设置鼠标是否可见
     SysBLL.ShowCursor(SysBLL.IsShowCursor);
 }
コード例 #4
0
 /// <summary>
 /// 退出缴费程序按钮
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Button_Click_6(object sender, RoutedEventArgs e)
 {
     Write(@"D:\appliaction\IsRestart.txt", "1");
     Application.Current.MainWindow.Topmost = false;
     //显示Windows任务栏
     SysBLL.ShowWindow(SysBLL.FindWindow("Shell_TrayWnd", null), SysBLL.SW_RESTORE);
     SysBLL.portNum = 99;
     Environment.Exit(0);
 }
コード例 #5
0
 private void Button_Click_3(object sender, RoutedEventArgs e)
 {
     try
     {
         //父页面监听此变量
         SysBLL.portNum = 10;
         ComputerBLL.KillApplication("SndVol");
         ComputerBLL.PopupController();
         SysBLL.ShowWindow(SysBLL.FindWindow("Shell_TrayWnd", null), SysBLL.SW_RESTORE);
     }
     catch (Exception ex)
     {
         log.Write("error:系统音量:" + ex.Message);
     }
 }
コード例 #6
0
ファイル: MainWindow.xaml.cs プロジェクト: luzhengning/wtPay
        /// <summary>
        /// 设置页面位置
        /// </summary>
        private void fullScreen()
        {
            //隐藏Windows任务栏
            SysBLL.ShowWindow(SysBLL.FindWindow("Shell_TrayWnd", null), SysBLL.SW_HIDE);
            //显示Windows任务栏
            //SysBLL.ShowWindow(SysBLL.FindWindow("Shell_TrayWnd", null), SysBLL.SW_RESTORE);
            this.WindowState = System.Windows.WindowState.Normal;
            this.WindowStyle = System.Windows.WindowStyle.None;
            this.ResizeMode  = System.Windows.ResizeMode.NoResize;

            this.Topmost = true;

            this.Left   = 0.0;
            this.Top    = 0.0;
            this.Width  = System.Windows.SystemParameters.PrimaryScreenWidth;
            this.Height = System.Windows.SystemParameters.PrimaryScreenHeight;
            ClsWin32.HideTask(true);
        }
コード例 #7
0
ファイル: MainPage.xaml.cs プロジェクト: luzhengning/wtPay
        private void load()
        {
            try {
                ConfigSysParam.gifBusiness = GifBusiness.no;
                ComputerBLL.KillApplication("TabTip");
                //支付方式默认为电子现金
                PayStaticParam.payType = -1;
                //设置页面终端号
                this.lblMechineNo.Text   = "NO:" + ConfigurationManager.AppSettings["MechineNo"];
                SysBLL.PasswordErrorInfo = "重要提示";
                //软件版本号
                this.lblVersion.Text = SysConfigHelper.readerNode("currentVersion");
                loadThread           = new Thread(delegate()
                {
                    //如果有卡则退卡
                    MachCardBLL.backCard();
                    //禁止用户插卡
                    MachCardBLL.CancelWaitCard();
                });
                loadThread.Start();
                SysBLL.IsOpenIndexForm = true;
                //初始化公积金查询参数
                SysBLL.customerParam       = null;
                SysBLL.customerParam       = new wtPayModel.PublicFundModel.CustomerParam();
                SysBLL.socialSecurityParam = null;
                SysBLL.socialSecurityParam = new wtPayModel.SocialSecurityModel.SocialSecurityParam();
                BeiAnGGCardBLL.killRd();
                Write(@"D:\appliaction\IsRestart.txt", "1");
                Console.WriteLine(Read(@"D:\appliaction\IsRestart.txt"));

                if (SysBLL.isGcWindow == false)
                {
                    gcWindowThread = new Thread(delegate()
                    {
                        try
                        {
                            while (true)
                            {
                                try
                                {
                                    int sleepNum = Convert.ToInt32(SysConfigHelper.readerNode("Gcmp4PlayIntervalName"));
                                    Thread.Sleep(sleepNum);

                                    if (!System.IO.File.Exists("D:/payMedia/mp4/1.mp4"))
                                    {
                                        ComputerBLL.KillApplication("GCMp4");
                                        continue;
                                    }
                                    System.Diagnostics.Process p = new System.Diagnostics.Process();
                                    if (("0".Equals(SysConfigHelper.readerNode("isStopGCMp4"))) || ("2".Equals(SysConfigHelper.readerNode("isStopGCMp4"))))
                                    {
                                        p.StartInfo.FileName = System.AppDomain.CurrentDomain.BaseDirectory + "GCMp4.exe";
                                        p.Start();
                                        SysConfigHelper.writerNode("isMainClose", "1");
                                    }
                                    while (true)
                                    {
                                        System.Diagnostics.Process[] proList = System.Diagnostics.Process.GetProcesses(".");//获得本机的进程
                                        bool iss = false;

                                        foreach (System.Diagnostics.Process pro in proList)
                                        {
                                            if ("GCMp4".Contains(pro.ProcessName))
                                            {
                                                iss = true;
                                                break;
                                            }
                                        }
                                        if ("1".Equals(SysConfigHelper.readerNode("isStopGCMp4")))
                                        {
                                            ComputerBLL.KillApplication("GCMp4");
                                        }
                                        if (iss == false)
                                        {
                                            break;
                                        }
                                        Thread.Sleep(1000 * 5);
                                    }
                                }
                                catch (ThreadAbortException ae) { log.Write("error:1loadGCMp4:" + ae.Message); return; }
                                catch (Exception ex)
                                {
                                    log.Write("error:视屏循环播放:" + ex.Message + ex.InnerException);
                                    continue;
                                }
                            }
                        }
                        catch (ThreadAbortException ae) { log.Write("error:2loadGCMp4:" + ae.Message); return; }
                        catch (Exception ex) { log.Write("error:2loadGCMp4:" + ex.Message); }
                    });
                    gcWindowThread.Start();
                }
                //隐藏Windows任务栏
                SysBLL.ShowWindow(SysBLL.FindWindow("Shell_TrayWnd", null), SysBLL.SW_HIDE);
            }
            catch (ThreadAbortException ae) { log.Write("error:" + ae.Message); }
            catch (Exception ex) { log.Write("error:首页load事件异常:" + ex.Message); }
        }
コード例 #8
0
ファイル: FormLoad.cs プロジェクト: luzhengning/wtPay
 public FormLoad()
 {
     InitializeComponent();
     //隐藏Windows任务栏
     SysBLL.ShowWindow(SysBLL.FindWindow("Shell_TrayWnd", null), SysBLL.SW_HIDE);
 }