예제 #1
0
        public Player()
        {
            PyEventClassBuilder cb = new PyEventClassBuilder("xbmc.Player", typeof(Player));

            cb.Methods.AddRange(this.eventNames);
            cb.Install();
            this.Instance = cb.NewInstance(flags: PyVariableFlags.Player);
            Console.WriteLine("=> Registering EventClass " + typeof(Player).FullName);
            KodiBridge.RegisterEventClass(typeof(Player), this);
        }
예제 #2
0
        public Monitor()
        {
            PyEventClassBuilder cb = new PyEventClassBuilder("xbmc.Monitor", typeof(Monitor));

            cb.Methods.AddRange(this.eventNames);
            cb.Install();
            this.Instance = cb.NewInstance(flags: PyVariableFlags.Monitor);

            // We now register this type so that PostEvent will be able to invoke onMessage in this class
            Console.WriteLine("=> Registering EventClass " + typeof(Monitor).FullName);
            KodiBridge.RegisterEventClass(typeof(Monitor), this);
        }