FileSystemWatcher in a process plugin? (1 Viewer)

MoPhat

Retired Team Member
  • Premium Supporter
  • June 17, 2007
    816
    226
    Berg
    Home Country
    Switzerland Switzerland
    Hi i need a filesystem watcher in a process plugin... and its start with

    public class StandbyWatcher : IPlugin, ISetupForm
    {

    uses a

    Code:
    private System.IO.FileSystemWatcher fileSystemWatcher1;

    but his is not possible

    Code:
     this.fileSystemWatcher1.SynchronizingObject = this;

    it means at compiling:

    Error 1 Cannot implicitly convert type 'ProcessPlugins.StandbyWatcher.StandbyWatcher' to 'System.ComponentModel.ISynchronizeInvoke'. An explicit conversion exists (are you missing a cast?) C:\...\StandbyWatcher.cs 105 60 StandbyWatcher

    how can i get the filesystem watcher in a plugin?

    thank you for any help
    MoPhat
     

    jburnette

    Portal Pro
    August 24, 2006
    758
    116
    Kentucky
    Home Country
    United States of America United States of America
    I use one of these in a window plugin (not that the type should matter in this case) and don't set the synchronizing object at all. Out of curiosity, why do you need to set it?
     

    MoPhat

    Retired Team Member
  • Premium Supporter
  • June 17, 2007
    816
    226
    Berg
    Home Country
    Switzerland Switzerland
    I need this for my new plugin Standby.Watcher (check link on footer), i have not found any way that the plugin is notified if a recording has started...

    so , im using (trying) for the moment a filesystemwatcher in the recording folder, and if a recording starts i take the filename, with this i can check the tvs db for the schedule, get all infos... but i need just only the info when the recording is done (time). so i can adjust the system to go in to standby at this time if previously the powerbutton is pressed.

    thats the reason why i need a filesystemwatcher.


    or have you a hint how to get a notification if a recording starts (wihout using a timer)?

    thx
    MoPhat
     

    Users who are viewing this thread

    Top Bottom