Esempio n. 1
0
        private string GetRomFileStatus(ProgramSupportFileState state)
        {
            string stateString = null;

            switch (state)
            {
            case ProgramSupportFileState.RequiredPeripheralIncompatible:
            case ProgramSupportFileState.RequiredPeripheralUnknown:
                stateString = string.Format(StatusMessages[state], Rom.GetTargetDeviceUniqueId());
                break;

            default:
                stateString = StatusMessages[state];
                break;
            }
            return(stateString);
        }
Esempio n. 2
0
 private void RefreshProgramAvailabilityState(IProgramDescription description, IEnumerable <IPeripheral> peripherals, ProgramSupportFileState newState)
 {
     using (var comparer = RomComparer.GetComparer(RomComparer.DefaultCompareMode))
     {
         // Should we be using the comparer here?
         foreach (var program in Items.OfType <ProgramViewModel>().Where(p => (p.ProgramDescription.Crc == description.Crc) && (p.ProgramDescription.Rom.RomPath == description.Rom.RomPath)))
         {
             program.RefreshValidationState(peripherals);
         }
     }
     foreach (var directory in Items.OfType <FolderViewModel>())
     {
         directory.RefreshProgramAvailabilityState(description, peripherals, newState);
     }
 }