예제 #1
0
 protected ProfileManager(CoreDispatcher dispatcher)
 {
     this.dispatcher = dispatcher;
     connected       = new ProfileFolder("Connected");
     saved           = new List <IProfile>();
     folders         = new ObservableCollection <ProfileFolder>();
     folders.Add(connected);
 }
        public TClientProfileManager(TClient client, CoreDispatcher dispatcher) : base(dispatcher)
        {
            available = new ProfileFolder("Available");
            folders.Insert(0, available);

            client.NewProfile          += client_NewProfile;
            client.DeleteProfile       += client_DeleteProfile;
            client.NewAvailableProfile += client_NewAvailableProfile;
            client.ScanningStarted     += async(o, e) =>
            {
                await dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
                {
                    available.Clear();
                });
            };
        }