public MppToMspdiConverter()
        {
            AddFiles = new RelayCommand <IEnumerable <string> >(files => {
                foreach (var file in files)
                {
                    ConvertFiles.Add(new MspdiConvertFile(file));
                }
            });

            Convert = new RelayCommand(() => {
                if (ConvertFiles.Count == 0)
                {
                    return;
                }
                foreach (var file in ConvertFiles)
                {
                    file.Convert();
                }
            });
        }
Exemplo n.º 2
0
        public MppToMpxConverter()
        {
            AddFiles = new RelayCommand <IEnumerable <string> >(files => {
                foreach (var file in files)
                {
                    ConvertFiles.Add(new MpxConvertFile(file));
                }
            });

            Convert = new RelayCommand(() => {
                if (ConvertFiles.Count == 0)
                {
                    return;
                }
                //Task.WaitAll(ConvertFiles.Select(_ => _.ConvertTask).ToArray());
                foreach (var file in ConvertFiles)
                {
                    file.Convert();
                }
            });
        }