Welcome to the MP3Car.com forums.
You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. Registering will also remove advertisements. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!
If you have any problems with the registration process or your account login, please contact contact us.
|
02-01-2006, 04:23 PM
|
#1
|
|
Variable Bitrate
Join Date: Apr 2004
Location: The land of polar bears and nekkid blonds
Posts: 446
|
Standby/Hibernate/Resume events
Any chance of having them fired by CF rather than using the servicebase class ?
/M
|
|
|
02-08-2006, 01:24 PM
|
#2
|
|
Variable Bitrate
Join Date: Apr 2004
Location: The land of polar bears and nekkid blonds
Posts: 446
|
Maybe I was a bit unclear ?
As far as I know there isn't any way to tell when CF is shuting down and when CF have resumed (fully) from a suspend/hibernate state.
Yes, you could use the servicebase class to monitor Windows, but since CF allready handles suspend/resume it would be nice to have an CF event like "CF_Suspend" and "CF_Resumed".
Could you add this to the SDK, David, please ?
/M
|
|
|
02-08-2006, 03:17 PM
|
#3
|
|
MySQL Error
Join Date: Apr 2004
Posts: 4,955
|
Quote: Originally Posted by Maximus
Maybe I was a bit unclear ?
As far as I know there isn't any way to tell when CF is shuting down and when CF have resumed (fully) from a suspend/hibernate state.
Yes, you could use the servicebase class to monitor Windows, but since CF allready handles suspend/resume it would be nice to have an CF event like "CF_Suspend" and "CF_Resumed".
Could you add this to the SDK, David, please ?
/M
It's already there... Check out CF_Event_powerModeChanged event....
david
__________________
__________________
CENTRAFUSE http://www.centrafuse.com
01 Jeep Cherokee Sport 4x4 Installed
M10000/512Mb/20GB, Lilliput 7", Holux GM-210
|
|
|
02-09-2006, 09:24 AM
|
#4
|
|
Variable Bitrate
Join Date: Apr 2004
Location: The land of polar bears and nekkid blonds
Posts: 446
|
Quote: Originally Posted by veetid
It's already there... Check out CF_Event_powerModeChanged event....
Look at that !
And yet I searched... so how do I tell if it's suspending or resuming ?
/Magnus
|
|
|
02-09-2006, 09:29 AM
|
#5
|
|
MySQL Error
Join Date: Apr 2004
Posts: 4,955
|
Quote: Originally Posted by Maximus
Look at that !
And yet I searched... so how do I tell if it's suspending or resuming ?
/Magnus
A parameter is passed into the function... It will let you know if the machine is suspended or resuming...
david
__________________
__________________
CENTRAFUSE http://www.centrafuse.com
01 Jeep Cherokee Sport 4x4 Installed
M10000/512Mb/20GB, Lilliput 7", Holux GM-210
|
|
|
02-09-2006, 12:03 PM
|
#6
|
|
Variable Bitrate
Join Date: Apr 2004
Location: The land of polar bears and nekkid blonds
Posts: 446
|
You make me feel really stupid
And those parameters are ?
I downloaded the lastes SDK-help file a couple of days ago, and in that file I can't find those parameters.
Clicking on "PowerModeChangedEventArgs" just ends up in a 404.
"The page you are looking for is currently unavailable. The Web site might be experiencing technical difficulties, or you may need to adjust your browser settings."
Many thanks,
/M
|
|
|
02-09-2006, 01:31 PM
|
#7
|
|
MySQL Error
Join Date: Apr 2004
Posts: 4,955
|
Quote: Originally Posted by Maximus
You make me feel really stupid
And those parameters are ?
I downloaded the lastes SDK-help file a couple of days ago, and in that file I can't find those parameters.
Clicking on "PowerModeChangedEventArgs" just ends up in a 404.
"The page you are looking for is currently unavailable. The Web site might be experiencing technical difficulties, or you may need to adjust your browser settings."
Many thanks,
/M
That Args class is a Microsoft one that I pass...
http://msdn2.microsoft.com/en-us/lib...eventargs.aspx
That link was suppose to link to the online msdn... There is a mode property on the class that has what you need...
http://msdn2.microsoft.com/en-us/lib...owermodes.aspx
Resume
StatusChange
Suspend
david
__________________
__________________
CENTRAFUSE http://www.centrafuse.com
01 Jeep Cherokee Sport 4x4 Installed
M10000/512Mb/20GB, Lilliput 7", Holux GM-210
|
|
|
02-09-2006, 03:20 PM
|
#8
|
|
Variable Bitrate
Join Date: Apr 2004
Location: The land of polar bears and nekkid blonds
Posts: 446
|
Thanks a million, if you'd be here I'd give you a kiss
/M
|
|
|
04-01-2006, 01:55 PM
|
#9
|
|
Variable Bitrate
Join Date: Apr 2004
Location: The land of polar bears and nekkid blonds
Posts: 446
|
Sorry to bother you again, but since I'm quite new to C# I don't know if there's a problem with CF or it's just the simple fact that I'm a bit thick
When I try to assign the "powermode changed" event to a new event handler I get an error:
this.CF_Event_powerModeChanged += new EventHandler(iBUS_CF_Event_powerModeChanged);
"Cannot implicitly convert type 'System.EventHandler' to 'Microsoft.Win32.PowerModeChangedEventHandler'"
Many thanks,
/M
|
|
|
04-01-2006, 02:36 PM
|
#10
|
|
MySQL Error
Join Date: Apr 2004
Posts: 4,955
|
Quote: Originally Posted by Maximus
Sorry to bother you again, but since I'm quite new to C# I don't know if there's a problem with CF or it's just the simple fact that I'm a bit thick
When I try to assign the "powermode changed" event to a new event handler I get an error:
this.CF_Event_powerModeChanged += new EventHandler(iBUS_CF_Event_powerModeChanged);
"Cannot implicitly convert type 'System.EventHandler' to 'Microsoft.Win32.PowerModeChangedEventHandler'"
Many thanks,
/M
Check out http://www.centrafuse.com/api for details on all the types... Power event mode should be declared as:
this.CF_Event_powerModeChanged += new Microsoft.Win32.PowerModeChangedEventHandler(power ModeChanged);
And the method would be like following:
private void powerModeChanged(object sender, Microsoft.Win32.PowerModeChangedEventArgs e){
}
Then you will want to check parameters on the Args e to determine whether it is a Suspend or Resume event...
david
__________________
__________________
CENTRAFUSE http://www.centrafuse.com
01 Jeep Cherokee Sport 4x4 Installed
M10000/512Mb/20GB, Lilliput 7", Holux GM-210
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 06:45 PM.
|
|