private CardItemViewModel CreateCardItem(CardInfo card) { try { if (card.Capacity == null) { var volume = VolumeContainer.GetVolume(card.DriveLetter); card.Capacity = volume.Disk.DiskSize; } } catch (FileNotFoundException) { return(null); } var partTypes = PartitionService.GetPartitionTypes(card.DriveLetter); return(new CardItemViewModel { Info = card, DisplayName = GetDisplayName(card), PartitionTypes = partTypes, Switched = PartitionService.TestSwitchedPartitions(partTypes), Bootable = BootService.TestBootable(card, card.FileSystem), Scriptable = ScriptService.TestScriptable(card, card.FileSystem), }); }
protected override SoftwareData Perform() { if (BootService.SetBootable(Card, Card.FileSystem, CategoryName, Value)) { CardViewModel.SelectedItem.Bootable = BootService.TestBootable(Card, Card.FileSystem); //MainViewModel.Set<ActionViewModel>("Action", null); //MainViewModel.Step.CanGoBack = true; DownloadViewModel.Title = CompletedTitle; } return(null); }
static void Main(string[] args) { BootService.Initialize(); }