Пример #1
0
        private void ConvertProject()
        {
            UpdatePageFilenames();

            foreach (var page in Pages.Where(p => p.NeedToConvert))
            {
                var ammyFilePath = Path.ChangeExtension(page.FilePath, ".ammy");

                if (CopyToBak)
                {
                    File.Move(page.FilePath, page.FilePath + ".bak");
                }

                File.WriteAllText(ammyFilePath, page.Ammy);
            }

            _projectConverter.SaveProject(CopyToBak);

            MessageBox.Show("Conversion finished!" +
                            Environment.NewLine +
                            Environment.NewLine +
                            "Execute `install-package Ammy.<WPF/XamarinForms/...>` after opening converted project.", "Success");

            Process.Start(_projectConverter.ProjectDir);
        }