public CppProjectSettingsViewModel()
 {
     ListOutputs    = Enum.GetValues(typeof(CppProjectOutputType)).Cast <CppProjectOutputType>();
     LibraryFiles   = string.Empty;
     FoldersInclude = string.Empty;
     OutputType     = CppProjectOutputType.Dll;
 }
        protected override Task DoLoad()
        {
            var provider    = IoC.Get <CppProjectProvider>();
            var projectInfo = (CppProjectInfo)provider.Load(FilePath);

            if (string.IsNullOrWhiteSpace(projectInfo?.Path))
            {
                return(Task.FromResult(false));
            }

            foreach (var folder in projectInfo.IncludeDirectories)
            {
                FoldersInclude += folder + Environment.NewLine;
            }
            FoldersInclude = FoldersInclude.Trim();

            foreach (var libraryFile in projectInfo.PrebuiltLibraries)
            {
                LibraryFiles += libraryFile + Environment.NewLine;
            }
            LibraryFiles = LibraryFiles.Trim();

            OutputType = projectInfo.OutputType;

            return(Task.FromResult(true));
        }
Exemplo n.º 3
0
 public CppProjectInfo(IProjectProvider provider = null)
     : base(provider)
 {
     Files = new List <FileInfo>();
     IncludeDirectories = new List <string>();
     PrebuiltLibraries  = new List <string>();
     OutputType         = CppProjectOutputType.Exe;
 }