Beispiel #1
0
 public void Init()
 {
     GhangeConnectionState(ConnectonState_GetStatus);
     int StatusRes = FCCApi.GetStatusAsync(InitDeviceRevisionResponse);
 }
Beispiel #2
0
        void FCCApi_OnSetStatus(object sender, bool StatusChange, int status, int DevId, string EventName)
        {
            this.Dispatcher.Invoke((Action)(() =>
            {
                if (StatusChange)
                {
                    if (status == CFCCApi.STATUS_CODE_DISPENSEREMOVWAIT)
                    {
                        ShowProcessMessage("Заберите деньги из лотка.");
                    }
                    else if (status == CFCCApi.STATUS_CODE_DEPOSITREMOVWAIT)
                    {
                        ShowProcessMessage("Заберите непринятые купюры.");
                    }

                    /*
                     * else if (status == FCCApi.STATUS_CODE_WAITINGINVENTORY)
                     * {
                     * NeedInventoryUpdate = true;
                     *
                     * }
                     * */
                    else if (status == CFCCApi.STATUS_CODE_DEPOSIT_WAIT)
                    {
                        HideProcessMessage();
                    }
                    else if (status == CFCCApi.STATUS_CODE_IDLE)
                    {
                        if (NeedInventoryUpdate)
                        {
                            NeedInventoryUpdate = false;
                            CFCCApi FCCApi = new CFCCApi();
                            FCCApi.UpdateInventoryAsync(UpdateInventory);
                        }
                        if (NeedStatusRequest)
                        {
                            FCCApi = new CFCCApi();
                            int StatusRes = FCCApi.GetStatusAsync(InitDeviceRevisionResponse);
                        }
                        //GhangeSubstate(GlorySubState_Ok, 0);
                    }
                    else if (status == CFCCApi.STATUS_CODE_UNLOCKING)
                    {
                        GhangeSubstate(GlorySubState_Unlocking, 0);
                    }
                }

                else
                {
                    if (EventName == "eventCassetteInventoryOnRemoval")
                    {
                        //FCCApi
                    }


                    else if (EventName == "eventCassetteInserted")
                    //else if (EventName == "eventCassetteInventoryOnInsertion")
                    {
                        //FCCApi
                    }
                }
            }));
        }