public void Dispose() { _deviceService.ExternalDeviceAdded -= DeviceAdded; _deviceService.ExternalDeviceRemoved -= DeviceRemoved; _deviceService = null; }
public void Dispose() { #if WINDOWS_APP _deviceService.ExternalDeviceAdded -= DeviceAdded; _deviceService.ExternalDeviceRemoved -= DeviceRemoved; _deviceService = null; #endif }
public VLCExplorerViewModel() { var musicLibrary = new FileExplorerViewModel(KnownFolders.MusicLibrary); StorageVMs.Add(musicLibrary); var videoLibrary = new FileExplorerViewModel(KnownFolders.VideosLibrary); StorageVMs.Add(videoLibrary); CurrentStorageVM = StorageVMs[0]; Task.Run(() => CurrentStorageVM?.GetFiles()); #if WINDOWS_APP Task.Run(() => InitializeDLNA()); _deviceService = App.Container.Resolve <ExternalDeviceService>(); _deviceService.ExternalDeviceAdded += DeviceAdded; _deviceService.ExternalDeviceRemoved += DeviceRemoved; #else Task.Run(() => InitializeSDCard()); #endif }
public ExternalStorageViewModel() { _deviceService = App.Container.Resolve <ExternalDeviceService>(); _deviceService.ExternalDeviceAdded += DeviceAdded; _deviceService.ExternalDeviceRemoved += DeviceRemoved; }