private void StartWatcher()
        {
            AllJoynBusAttachment toasterBusAttachment = new AllJoynBusAttachment();
            ToasterWatcher toasterWatcher = new ToasterWatcher(toasterBusAttachment);
            toasterWatcher.Added += ToasterWatcher_Added;

            toasterWatcher.Start();
        }
Esempio n. 2
0
        private void StartWatcher()
        {
            AllJoynBusAttachment toasterBusAttachment = new AllJoynBusAttachment();
            ToasterWatcher       toasterWatcher       = new ToasterWatcher(toasterBusAttachment);

            toasterWatcher.Added += ToasterWatcher_Added;

            toasterWatcher.Start();
        }
Esempio n. 3
0
        private async void ToasterWatcher_Added(ToasterWatcher sender, AllJoynServiceInfo args)
        {
            ToasterJoinSessionResult toasterJoinSessionResult = await ToasterConsumer.JoinSessionAsync(args, sender);

            if (toasterJoinSessionResult.Status == AllJoynStatus.Ok)
            {
                ToasterFoundEventArgs toasterFoundArgs = new ToasterFoundEventArgs(toasterJoinSessionResult.Consumer);
                OnToasterFound(toasterFoundArgs);
            }
            else
            {
            }
        }
        private async void ToasterWatcher_Added(ToasterWatcher sender, AllJoynServiceInfo args)
        {
            ToasterJoinSessionResult toasterJoinSessionResult = await ToasterConsumer.JoinSessionAsync(args, sender);

            if (toasterJoinSessionResult.Status == AllJoynStatus.Ok)
            {
                ToasterFoundEventArgs toasterFoundArgs = new ToasterFoundEventArgs(toasterJoinSessionResult.Consumer);
                OnToasterFound(toasterFoundArgs);
            }
            else
            {

            }
        }