예제 #1
0
        protected override void OnExecuteComplete(ref WFSRESULT result)
        {
            switch (result.dwCommandCodeOrEventID)
            {
            case CDMDefinition.WFS_CMD_CDM_DISPENSE:
                if (result.hResult == XFSDefinition.WFS_SUCCESS)
                {
                    OnDispenComplete();
                }
                else
                {
                    OnDispenseError(result.hResult);
                }
                break;

            case CDMDefinition.WFS_CMD_CDM_PRESENT:
                if (result.hResult == XFSDefinition.WFS_SUCCESS)
                {
                    OnPresentComplete();
                }
                else
                {
                    OnPresetError(result.hResult);
                }
                break;
            }
        }
예제 #2
0
 protected override void OnServiceEvent(ref WFSRESULT result)
 {
     switch (result.dwCommandCodeOrEventID)
     {
     case CDMDefinition.WFS_SRVE_CDM_ITEMSTAKEN:
         OnItemsTaken();
         break;
     }
 }
예제 #3
0
파일: IDC.cs 프로젝트: xxmedxx/XFS.Net
 protected override void OnServiceEvent(ref WFSRESULT result)
 {
     switch (result.dwCommandCodeOrEventID)
     {
     case IDCDefinition.WFS_SRVE_IDC_MEDIAREMOVED:
         OnMediareMoved();
         break;
     }
 }
예제 #4
0
파일: IDC.cs 프로젝트: xxmedxx/XFS.Net
 protected override void OnExecuteEvent(ref WFSRESULT result)
 {
     switch (result.dwCommandCodeOrEventID)
     {
     case IDCDefinition.WFS_EXEE_IDC_MEDIAINSERTED:
         OnMediaInserted();
         break;
     }
 }
예제 #5
0
파일: PTR.cs 프로젝트: tsengee/XFS4NET
 protected override void OnExecuteEvent(ref WFSRESULT result)
 {
     switch (result.dwCommandCodeOrEventID)
     {
     case PTRDefinition.WFS_SRVE_PTR_MEDIATAKEN:
     {
         break;
     }
     }
 }
예제 #6
0
 protected override void OnExecuteEvent(ref WFSRESULT result)
 {
     switch (result.dwCommandCodeOrEventID)
     {
     case PINDefinition.WFS_EXEE_PIN_KEY:
         WFSPINKEY key = new XFSNet.PIN.WFSPINKEY();
         XFSUtil.PtrToStructure(result.lpBuffer, ref key);
         OnPINKey(ref key);
         break;
     }
 }
예제 #7
0
 protected override void OnExecuteComplete(ref WFSRESULT result)
 {
     switch (result.dwCommandCodeOrEventID)
     {
     case PINDefinition.WFS_CMD_PIN_GET_DATA:
         if (result.hResult != XFSDefinition.WFS_SUCCESS)
         {
             OnGetDataError(result.hResult);
         }
         break;
     }
 }
예제 #8
0
파일: IDC.cs 프로젝트: xxmedxx/XFS.Net
        protected override void OnExecuteComplete(ref WFSRESULT result)
        {
            switch (result.dwCommandCodeOrEventID)
            {
            case IDCDefinition.WFS_CMD_IDC_READ_RAW_DATA:
                if (result.hResult == XFSDefinition.WFS_SUCCESS)
                {
                    WFSIDCCardData[] data      = XFSUtil.XFSPtrToArray <WFSIDCCardData>(result.lpBuffer);
                    IDCCardData[]    outerData = new IDCCardData[data.Length];
                    for (int i = 0; i < data.Length; ++i)
                    {
                        outerData[i]             = new IDCCardData();
                        outerData[i].DataSource  = data[i].wDataSource;
                        outerData[i].WriteMethod = data[i].fwWriteMethod;
                        outerData[i].Status      = data[i].wStatus;
                        if (data[i].ulDataLength > 0)
                        {
                            outerData[i].Data = new byte[data[i].ulDataLength];
                            for (int j = 0; j < data[i].ulDataLength; ++j)
                            {
                                outerData[i].Data[j] = Marshal.ReadByte(data[i].lpbData, j);
                            }
                        }
                    }
                    OnReadRawDataComplete(outerData);
                }
                else
                {
                    OnReadRawDataError(result.hResult);
                }
                break;

            case IDCDefinition.WFS_CMD_IDC_EJECT_CARD:
                if (result.hResult == XFSDefinition.WFS_SUCCESS)
                {
                    OnEjectComplete();
                }
                else
                {
                    OnEjectError(result.hResult);
                }
                break;
            }
        }
예제 #9
0
파일: PTR.cs 프로젝트: tsengee/XFS4NET
 protected override void OnExecuteComplete(ref WFSRESULT result)
 {
     switch (result.dwCommandCodeOrEventID)
     {
     }
 }