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 Talk
hourglass/circle thingy
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="bigdude" data-source="post: 191645" data-attributes="member: 57287"><p>Silly questions... </p><p></p><p>I would like to use this cursor in a plugin. </p><p>In C# code how do I bring up this cursor (and how do I get rid of it once the action is complete) ?</p><p>Do I need a particular Using statement or reference for it ?</p><p></p><p>EDIT:</p><p>OK. I figured out how to start this thing and stop it, but I now have a new question. I start it and go off to do a time consuming activity, but because a large part of that process is waiting for network responses the UI and wait cursor are starved and the UI appears to freeze. The waiting code looks like this:</p><p></p><p> // Telnet: wait for response</p><p> timeout = 0;</p><p> while (tnResponse == "" && timeout < 90000 && !tnResponse.Contains("Selected chang"))</p><p> {</p><p> System.Threading.Thread.Sleep(300);</p><p> timeout = timeout + 300;</p><p> }</p><p> System.Threading.Thread.Sleep(100);</p><p></p><p>the code works, but is there something I can add to the wait loop to let the UI and wait cursor 'breathe' ?</p><p></p><p>If not, could someone post a simpe example of how to make a function run in a thread of its own and then return to the original execution path... (I assume that would be the only other choice) ?</p></blockquote><p></p>
[QUOTE="bigdude, post: 191645, member: 57287"] Silly questions... I would like to use this cursor in a plugin. In C# code how do I bring up this cursor (and how do I get rid of it once the action is complete) ? Do I need a particular Using statement or reference for it ? EDIT: OK. I figured out how to start this thing and stop it, but I now have a new question. I start it and go off to do a time consuming activity, but because a large part of that process is waiting for network responses the UI and wait cursor are starved and the UI appears to freeze. The waiting code looks like this: // Telnet: wait for response timeout = 0; while (tnResponse == "" && timeout < 90000 && !tnResponse.Contains("Selected chang")) { System.Threading.Thread.Sleep(300); timeout = timeout + 300; } System.Threading.Thread.Sleep(100); the code works, but is there something I can add to the wait loop to let the UI and wait cursor 'breathe' ? If not, could someone post a simpe example of how to make a function run in a thread of its own and then return to the original execution path... (I assume that would be the only other choice) ? [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Talk
hourglass/circle thingy
Contact us
RSS
Top
Bottom