ISDBDevice::GetSyncProgress: Difference between revisions

From MediaMonkey Wiki
Jump to navigation Jump to search
(Created page with "{{MethodDeclaration|SDBDevice|ISDBDevice|Property Get GetSyncProgress(DeviceHandle As Long)}} ===Parameters=== {{MethodParameters |DeviceHandle |Long |Handle of the device}} ...")
 
No edit summary
Line 9: Line 9:


Gets progress percentage of sync/copy task.
Gets progress percentage of sync/copy task.
{{Introduced|4.1.1}}


===Example===
===Example===

Revision as of 12:55, 31 March 2014

CoClass SDBDevice, Interface ISDBDevice

Property Get GetSyncProgress(DeviceHandle As Long)


Parameters

Name Type Description
DeviceHandle Long Handle of the device


Method description

Gets progress percentage of sync/copy task.

Introduced in MediaMonkey version 4.1.1.


Example

       
Option Explicit
 
Dim UI  : Set UI = SDB.UI
 
Sub OnStartUp()
    Dim mnuTest
    Set mnuTest = SDB.UI.AddMenuItem(SDB.UI.Menu_Edit, 0, 0)
    mnuTest.Caption = SDB.Localize("Get sync progress")
    mnuTest.OnClickFunc = "SDBOnClick"
    mnuTest.UseScript = Script.ScriptPath    
End Sub
   
Sub SDBOnClick(Item)   
  Dim DeviceHandle : DeviceHandle = -1
  Dim Devices : Set Devices = SDB.Device.ActiveDeviceList("VID_05AC&PID_129E")
  Dim i : i = 0 
  For i = 0 To Devices.Count-1
	   If Devices.DeviceHandle(i) <> -1 Then
		   DeviceHandle = Devices.DeviceHandle(i)
	   End If
  Next
    
  MsgBox( SDB.Device.GetSyncProgress( DeviceHandle))
End Sub

To see how to handle copy result see example in CopyFile() method