Пример #1
0
        public AdminManager()
        {
            InitializeComponent();

            //禁用取钱功能
            button2.IsEnabled = false;

            string SmartPayoutCom = ConfigurationManager.AppSettings["SmartPayoutCom"];

            Payout           = new CPayout();
            dTimer.Tick     += new EventHandler(dTimer_Tick);
            dTimer.Interval  = new TimeSpan(200);
            dTimer.IsEnabled = false;


            //init
            int reconnectionAttempts = 5;

            Payout.CommandStructure.ComPort    = SmartPayoutCom;
            Payout.CommandStructure.SSPAddress = 0;
            Payout.CommandStructure.Timeout    = 3000;


            // connect to validator
            if (ConnectToValidator(reconnectionAttempts))
            {
                dTimer.IsEnabled = true;
            }

            Payout.AdminSetChannelToPayout(LOGS);
            CheckPayoutCash();
            ShowCashBoxCount();
        }
Пример #2
0
        private bool CashPayInit() //初始化设备
        {
            string SmartPayoutCom = ConfigurationManager.AppSettings["SmartPayoutCom"];
            string HopperCom      = ConfigurationManager.AppSettings["HopperCom"];

            Payout           = new CPayout();
            Cm               = new CoinManager(HopperCom);
            dTimer.Tick     += new EventHandler(dTimer_Tick);
            dTimer.Interval  = new TimeSpan(200);
            dTimer.IsEnabled = false;



            if (GetInitData(SmartPayoutCom, HopperCom))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }