예제 #1
0
 internal void RaiseOnScreensaverDeactivated(string sender = null, object data = null)
 {
     if (OnScreensaverDeactivated != null)
     {
         OnScreensaverDeactivated.BeginInvoke(sender, data, null, null);
     }
 }
예제 #2
0
파일: GUI.cs 프로젝트: Willovent/Germaine
 internal void RaiseOnScreensaverDeactivated(string sender = null, KodiRpc.GUI.OnScreensaverDeactivated_data data = null)
 {
     if (OnScreensaverDeactivated != null)
     {
         OnScreensaverDeactivated.BeginInvoke(sender, data, null, null);
     }
 }
예제 #3
0
파일: Monitor.cs 프로젝트: CRialDev/KSHarp
 internal void _OnScreensaverDeactivated()
 {
     OnScreensaverDeactivated?.Invoke(this);
     Utils.Call("self.EventStarted = False");
 }
예제 #4
0
        public bool TriggerEvent(KodiEventMessage e)
        {
            switch (e.Source)
            {
            case "onAbortRequested":
                OnAbortRequested?.Invoke(null, new EventArgs());
                break;

            case "onCleanStarted":
                OnCleanStarted?.Invoke(null, new LibraryEventArgs(e.EventArgs[0]));
                break;

            case "onCleanFinished":
                OnCleanFinished?.Invoke(null, new LibraryEventArgs(e.EventArgs[0]));
                break;

            case "onDPMSActivated":
                OnDPMSActivated?.Invoke(null, new EventArgs());
                break;

            case "onDPMSDeactivated":
                OnDPMSDeactivated?.Invoke(null, new EventArgs());
                break;

            case "onDatabaseScanStarted":
                OnDatabaseScanStarted?.Invoke(null, new DatabaseEventArgs(e.EventArgs[0]));
                break;

            case "onDatabaseUpdated":
                OnDatabaseUpdated?.Invoke(null, new DatabaseEventArgs(e.EventArgs[0]));
                break;

            case "onNotification":
                OnNotification?.Invoke(null, new NotificationEventArgs(
                                           e.EventArgs[0], e.EventArgs[1], e.EventArgs[2]
                                           ));
                break;

            case "onScanStarted":
                OnScanStarted?.Invoke(null, new LibraryEventArgs(e.EventArgs[0]));
                break;

            case "onScanFinished":
                OnScanFinished?.Invoke(null, new LibraryEventArgs(e.EventArgs[0]));
                break;

            case "onScreensaverActivated":
                OnScreensaverActivated?.Invoke(null, new EventArgs());
                break;

            case "onScreensaverDeactivated":
                OnScreensaverDeactivated?.Invoke(null, new EventArgs());
                break;

            case "onSettingsChanged":
                OnSettingsChanged?.Invoke(null, new EventArgs());
                break;

            default:
                PyConsole.WriteLine(string.Format("Unknown event '{0}' not handled", e.Source));
                return(false);
            }
            return(true);
        }