home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Plugins
External Control Plugin Version II - ideas please!
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="STSC" data-source="post: 11230" data-attributes="member: 10535"><p>Hi Sam,</p><p></p><p>I'm almost done with my changes, but I'm still having a small issue.</p><p>I tried to create a WindowsProgressDialog that runs up to 100% and returns a true value. When you cancel it with "ESC" then it returns false.</p><p></p><p>[code] Public Function WindowsProgressDialog(ByVal DialogHeading As String, ByVal DialogLine1 As String, ByVal DialogLine2 As String, ByVal DialogLine3 As String) As Boolean</p><p></p><p> 'Create dialog to show progress</p><p> Dim dlgProgress As MediaPortal.Dialogs.GUIDialogProgress = CType(MediaPortal.GUI.Library.GUIWindowManager.GetWindow(CType(MediaPortal.GUI.Library.GUIWindow.Window.WINDOW_DIALOG_PROGRESS, Integer)), MediaPortal.Dialogs.GUIDialogProgress)</p><p> If (Not dlgProgress Is Nothing) Then</p><p> dlgProgress.SetHeading(DialogHeading)</p><p> dlgProgress.SetLine(1, DialogLine1)</p><p> dlgProgress.SetLine(2, DialogLine2)</p><p> dlgProgress.SetLine(3, DialogLine3)</p><p> dlgProgress.StartModal(MediaPortal.GUI.Library.GUIWindowManager.ActiveWindow)</p><p> dlgProgress.SetPercentage(0)</p><p> dlgProgress.Progress()</p><p> dlgProgress.ShowProgressBar(True)</p><p> End If</p><p></p><p> Dim iCounter As Integer = 0</p><p> Try</p><p> While iCounter <= 100</p><p> dlgProgress.SetPercentage(iCounter)</p><p> Threading.Thread.Sleep(100)</p><p> iCounter += 1</p><p> End While</p><p></p><p> Catch ex As IndexOutOfRangeException</p><p> dlgProgress.Close()</p><p> Return False</p><p> Catch ex As WebException</p><p> dlgProgress.Close()</p><p> Return False</p><p> Catch ex As Exception</p><p> dlgProgress.Close()</p><p> Return False</p><p> End Try</p><p> dlgProgress.Close()</p><p> Return True</p><p> End Function[/code]</p><p></p><p>When you get a chance you could test my code and maybe you know why it doesn't work like this. Don't forget to add a reference to WindowPlugins.dll.</p><p>I will send you everything back after this works and you can put everything together. Thanks!!</p></blockquote><p></p>
[QUOTE="STSC, post: 11230, member: 10535"] Hi Sam, I'm almost done with my changes, but I'm still having a small issue. I tried to create a WindowsProgressDialog that runs up to 100% and returns a true value. When you cancel it with "ESC" then it returns false. [code] Public Function WindowsProgressDialog(ByVal DialogHeading As String, ByVal DialogLine1 As String, ByVal DialogLine2 As String, ByVal DialogLine3 As String) As Boolean 'Create dialog to show progress Dim dlgProgress As MediaPortal.Dialogs.GUIDialogProgress = CType(MediaPortal.GUI.Library.GUIWindowManager.GetWindow(CType(MediaPortal.GUI.Library.GUIWindow.Window.WINDOW_DIALOG_PROGRESS, Integer)), MediaPortal.Dialogs.GUIDialogProgress) If (Not dlgProgress Is Nothing) Then dlgProgress.SetHeading(DialogHeading) dlgProgress.SetLine(1, DialogLine1) dlgProgress.SetLine(2, DialogLine2) dlgProgress.SetLine(3, DialogLine3) dlgProgress.StartModal(MediaPortal.GUI.Library.GUIWindowManager.ActiveWindow) dlgProgress.SetPercentage(0) dlgProgress.Progress() dlgProgress.ShowProgressBar(True) End If Dim iCounter As Integer = 0 Try While iCounter <= 100 dlgProgress.SetPercentage(iCounter) Threading.Thread.Sleep(100) iCounter += 1 End While Catch ex As IndexOutOfRangeException dlgProgress.Close() Return False Catch ex As WebException dlgProgress.Close() Return False Catch ex As Exception dlgProgress.Close() Return False End Try dlgProgress.Close() Return True End Function[/code] When you get a chance you could test my code and maybe you know why it doesn't work like this. Don't forget to add a reference to WindowPlugins.dll. I will send you everything back after this works and you can put everything together. Thanks!! [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
External Control Plugin Version II - ideas please!
Contact us
RSS
Top
Bottom