Пример #1
0
        public static void Start(OptionsGui data)
        {
            var projects = SolutionFileParser.GetSolutionProjects(data.SolutionPath);

            if (!projects.Any())
            {
                return;
            }

            if (!Directory.Exists(data.OutputFolder))
            {
                Directory.CreateDirectory(data.OutputFolder);
            }

            new ZipSolution
            {
                Comment           = "Created by SolutionTemplateGenerator",
                IncludeSubfolders = true,
                OptionsGuiData    = data,
                OutPathname       = Path.Combine(data.OutputFolder, data.ProductName + ".zip"),
                NumberOfProjects  = projects.Count,
                ProjectFiles      = projects.Select(x => x.FullPath).ToList()
            }.ZipFolder();

            Process.Start(data.OutputFolder);
        }
        private void solutionPathPropertyChanged()
        {
            var projects = SolutionFileParser.GetSolutionProjects(OptionsGuiData.SolutionPath);

            if (!projects.Any())
            {
                return;
            }

            var firstProject = projects.First();

            OptionsGuiData.ProductName      = firstProject.ProjectName;
            OptionsGuiData.DefaultNamespace = firstProject.ProjectName;
            OptionsGuiData.ProjectType      = firstProject.ProjectTypeName;
            OptionsGuiData.Version          = firstProject.Version;
        }