コード例 #1
0
        private static void ValidateRoms(AsyncTaskData taskData)
        {
            var data       = (ValidateRomsTaskData)taskData;
            var numUpdated = 0;

            foreach (var rom in RomListViewModel.Programs)
            {
                taskData.UpdateTaskProgress((++numUpdated / RomListViewModel.Programs.Count) * 100, string.Format(Resources.Strings.ValidateRomsCommand_ProgressDetailFormat, rom.Name, rom.Model.Rom.RomPath));
                if (rom.RefreshFileStatus(RomListViewModel.AttachedPeripherals))
                {
                    data.UpdatedRoms.Add(rom.Model);
                }
            }
        }
コード例 #2
0
 private void UpdateProgressText(AsyncTaskData taskData, string format, string content)
 {
     taskData.UpdateTaskProgress(0, string.Format(System.Globalization.CultureInfo.CurrentCulture, format, content));
 }