예제 #1
0
        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),
            });
        }
예제 #2
0
 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);
 }
예제 #3
0
 static void Main(string[] args)
 {
     BootService.Initialize();
 }