Results 1 to 10 of 10

Thread: Standby/Hibernate/Resume events

  1. #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

  2. #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

  3. #3
    VENDOR - Centrafuse veetid's Avatar
    Join Date
    Apr 2004
    Posts
    5,040
    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

  4. #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

  5. #5
    VENDOR - Centrafuse veetid's Avatar
    Join Date
    Apr 2004
    Posts
    5,040
    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

  6. #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

  7. #7
    VENDOR - Centrafuse veetid's Avatar
    Join Date
    Apr 2004
    Posts
    5,040
    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

  8. #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

  9. #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

  10. #10
    VENDOR - Centrafuse veetid's Avatar
    Join Date
    Apr 2004
    Posts
    5,040
    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

Similar Threads

  1. Skin "TIMER" events
    By cherrybomb in forum Road Runner
    Replies: 5
    Last Post: 01-14-2006, 10:50 PM
  2. Conncected/disconnected EVENTS?
    By justintime in forum CF SDK
    Replies: 8
    Last Post: 11-07-2005, 10:10 AM
  3. any carputers competing in sound quality events?
    By emdzey01 in forum Car Audio
    Replies: 8
    Last Post: 02-08-2005, 08:21 AM
  4. Triggering events based on GPS location
    By electron in forum GPS
    Replies: 5
    Last Post: 09-16-2004, 12:57 PM
  5. Win32 Perl & iTunes program events
    By freestyler in forum Off Topic
    Replies: 0
    Last Post: 08-08-2004, 05:13 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •