private async void Shade_Added(ShadesWatcher sender, AllJoynServiceInfo args)
        {
            ShadesJoinSessionResult joinSessionResult = await ShadesConsumer.JoinSessionAsync(args, sender);

            if (joinSessionResult.Status == AllJoynStatus.Ok)
            {
                m_Shades.Add(joinSessionResult.Consumer);
                joinSessionResult.Consumer.SessionLost += Consumer_SessionLost;
            }
        }
예제 #2
0
        private async void Watcher_Added(ShadesWatcher sender, AllJoynServiceInfo args)
        {
            ShadesJoinSessionResult joinSessionResult = await ShadesConsumer.JoinSessionAsync(args, sender);

            if (joinSessionResult.Status == AllJoynStatus.Ok)
            {
                var shade = new Shade(System.IO.Path.GetDirectoryName(args.ObjectPath), joinSessionResult.Consumer);
                Shades.Add(shade);
                shade.SessionLost += Shade_SessionLost;
            }
        }