Beispiel #1
0
        //
        // Data Callback
        //
        eNkMAIDResult DataProc(
            IntPtr refClient,
            IntPtr pDataInfo,
            IntPtr pData)
        {
            NkMAIDDataInfo info = *((NkMAIDDataInfo *)pDataInfo.ToPointer());

            switch (info.ulType)
            {
            case eNkMAIDDataObjType.kNkMAIDDataObjType_File:
            case eNkMAIDDataObjType.kNkMAIDDataObjType_File | eNkMAIDDataObjType.kNkMAIDDataObjType_Image:
            case eNkMAIDDataObjType.kNkMAIDDataObjType_File | eNkMAIDDataObjType.kNkMAIDDataObjType_Sound:
            case eNkMAIDDataObjType.kNkMAIDDataObjType_File | eNkMAIDDataObjType.kNkMAIDDataObjType_Thumbnail:
            case eNkMAIDDataObjType.kNkMAIDDataObjType_File | eNkMAIDDataObjType.kNkMAIDDataObjType_Video:
                if (DataFile != null)
                {
                    NkMAIDFileInfo fileInfo = *((NkMAIDFileInfo *)pDataInfo.ToPointer());
                    DataFile(this, fileInfo, pData);
                }
                break;

            case eNkMAIDDataObjType.kNkMAIDDataObjType_Thumbnail:
                if (DataImage != null)
                {
                    NkMAIDImageInfo imageInfo = *((NkMAIDImageInfo *)pDataInfo.ToPointer());
                    DataImage(this, imageInfo, pData);
                }
                break;

            case eNkMAIDDataObjType.kNkMAIDDataObjType_Sound:
                if (DataSound != null)
                {
                    NkMAIDSoundInfo soundInfo = *((NkMAIDSoundInfo *)pDataInfo.ToPointer());
                    DataSound(this, soundInfo, pData);
                }
                break;

            default:
                Debug.Print("Unexpected data object type: {0}", info.ulType);
                break;
            }

            return(eNkMAIDResult.kNkMAIDResult_NoError);
        }
Beispiel #2
0
 void data_DataSound(NikonObject sender, NkMAIDSoundInfo soundInfo, IntPtr data)
 {
     Debug.Print("DataProcSoundInfo event fired");
 }
Beispiel #3
0
 void data_DataSound(NikonObject sender, NkMAIDSoundInfo soundInfo, IntPtr data)
 {
     Debug.Print("DataProcSoundInfo event fired");
 }