Beispiel #1
0
        private async Task PerformConversion()
        {
            string arkDirName = Path.GetFileNameWithoutExtension(Properties.Settings.Default.SaveFile);

            IsLoading = true;
            try
            {
                StatusDetailText = "...converting";
                StatusText       = "Processing saved ARK";
                await arkReader.PerformConversion(Properties.Settings.Default.SaveFile);

                StatusText       = "ARK processing completed";
                StatusDetailText = $"{arkReader.NumberOfWildSpecies} wild and {arkReader.NumberOfTamedSpecies} tame species located";
            }
            catch (Exception ex)
            {
                StatusText       = "ARK processing failed";
                StatusDetailText = "";
                MessageBox.Show(ex.Message, "ARK Tools Error", MessageBoxButton.OK, MessageBoxImage.Exclamation);
            }
            finally
            {
                IsLoading = false;
            }
        }
Beispiel #2
0
        private async Task PerformConversion(bool force)
        {
            string arkDirName = Path.GetFileNameWithoutExtension(Properties.Settings.Default.SaveFile);

            IsLoading = true;
            try
            {
                StatusDetailText = "...converting";
                StatusText       = "Processing saved ARK : Wild";
                await arkReaderWild.PerformConversion(force, arkDirName);

                StatusText = "Processing saved ARK : Tamed";
                await arkReaderTamed.PerformConversion(force, arkDirName);

                StatusText       = "ARK processing completed";
                StatusDetailText = $"{arkReaderWild.NumberOfSpecies} wild and {arkReaderTamed.NumberOfSpecies} tame species located";

                // Write path to last ark into the output folder so we can check when we change ARKs
                File.WriteAllText(Path.Combine(Properties.Settings.Default.OutputDir, Properties.Resources.LastArkFile), Properties.Settings.Default.SaveFile);
            }
            catch (Exception ex)
            {
                StatusText       = "ARK processing failed";
                StatusDetailText = "";
                MessageBox.Show(ex.Message, "ARK Tools Error", MessageBoxButton.OK, MessageBoxImage.Exclamation);
            }
            finally
            {
                IsLoading = false;
            }
        }