コード例 #1
0
 public void GetScreenshot(OnImageDone callback)
 {
     //Screenshots are sent in chunks. The first chunk has a header of 12 bytes.
     SendEndpointMsg(PebbleEndpointType.SCREENSHOT, new byte[] { 0x00 }, (PebbleProtocolMessage msg) =>
     {
         //Use the object instead. Create one if it doesn't exist.
         if (active_receive_img == null)
         {
             active_receive_img = new PebbleChunkedScreenshot((byte[] data) =>
             {
                 //Clear active screenshot and then call callback.
                 active_receive_img = null;
                 callback(data);
             });
         }
         return(active_receive_img.OnGotData(msg));
     });
 }
コード例 #2
0
 public PebbleChunkedScreenshot(OnImageDone _callback)
 {
     callback = _callback;
 }