Esempio n. 1
0
 /// <summary>
 /// Kijelentkezés a bejelentkezett accountokból
 /// </summary>
 public async void SingOut()
 {
     AuthenticationService.SignOut();
     DriveItems.Clear();
     SelectedItem.Item  = null;
     CurrentFolder.Item = null;
     graphClient        = null;
 }
Esempio n. 2
0
 void GetDrivers()
 {
     foreach (var item in DriveInfo.GetDrives())
     {
         DriveItems.Add(new DriveModel {
             Title = item.Name
         });
     }
 }
 /// <summary>Constructs the <see cref="ScanningService"/>.</summary>
 public ScanningService(SettingsService settings,
                        OSService os,
                        UIService ui)
 {
     this.settings             = settings;
     this.os                   = os;
     this.ui                   = ui;
     settings.PropertyChanged += OnSettingsPropertyChanged;
     Extensions                = new ExtensionItems(this, settings);
     Drives              = new DriveItems(this);
     validateTimer       = new Timer(OnValidateTick, null, Timeout.Infinite, Timeout.Infinite);
     validateWatch       = new Stopwatch();
     scanWatch           = new Stopwatch();
     validationRequested = false;
 }
Esempio n. 4
0
        private async void LoadChildren(IList <DriveItem> items)
        {
            DriveItems.Clear();
            // Load the children
            foreach (var obj in items)
            {
                MyDriveItem myDriveItem = new MyDriveItem
                {
                    DriveItem = obj
                };
                try
                {
                    var thumb = await graphClient.Drive.Items[obj.Id].Thumbnails["0"]["large"].Request().GetAsync();
                    myDriveItem.ThumbnailUrl = thumb.Url;
                }
                catch
                {
                }

                DriveItems.Add(myDriveItem);
            }
        }