Returns the index of the first occurrence of a Processor object whose name matches the given string.
public int IndexOf(string name)
Public Overloads Function IndexOf( _ByVal name As String _) As Integer
public:int IndexOf(String^ name)
name
A string value representing the name of the Processor to find.
The zero-based index position of the Processor item found, or -1 if not found.
Returns the index of the first occurrence of a Processor object whose name matches the given string.
using Leadtools;using Leadtools.MediaFoundation;using LeadtoolsMediaFoundationExamples.Fixtures;public bool _result = false;public PlayCtrlForm _form = new PlayCtrlForm();public void IndexOfExample(){// reference the play controlPlayCtrl playctrl = _form.PlayCtrl;try{// get the play controls available audio processorsAudioProcessors allProcs = playctrl.AudioProcessors;// get the play controls selected audio processorsAudioProcessors selProcs = playctrl.SelectedAudioProcessors;// get index of LEAD MF Volume Transformint nIndex = allProcs.IndexOf("{E2B7DC41-38C5-11D5-91F6-00104BDB8FF9}");// get LEAD MF Volume TransformProcessor AudProc = allProcs[nIndex];// add the LEAD MF Volume Transform to the selected audio processorsselProcs.Add(AudProc);// get the index of added audio processorint i = selProcs.IndexOf(AudProc);// set the result to what we expect_result = (selProcs[i] == AudProc);}catch (Exception){_result = false;}}
Imports LeadtoolsImports Leadtools.MediaFoundationImports LeadtoolsMediaFoundationExamples.FixturesPublic _result As Boolean = FalsePublic _form As PlayCtrlForm = New PlayCtrlForm()Public Sub IndexOfExample()' reference the play controlDim playctrl As PlayCtrl = _form.PlayCtrlTry' get the play controls available audio processorsDim allProcs As AudioProcessors = playctrl.AudioProcessors' get the play controls selected audio processorsDim selProcs As AudioProcessors = playctrl.SelectedAudioProcessors' get index of LEAD MF Volume TransformDim nIndex As Integer = allProcs.IndexOf("{E2B7DC41-38C5-11D5-91F6-00104BDB8FF9}")' get LEAD MF Volume TransformDim AudProc As Processor = allProcs(nIndex)' add the LEAD MF Volume Transform to the selected audio processorsselProcs.Add(allProcs(nIndex))' get the index of added audio processorDim i As Integer = selProcs.IndexOf(allProcs(nIndex))' set the result to what we expect_result = (selProcs(i) Is AudProc)Catch e1 As Exception_result = FalseEnd TryEnd Sub
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
