Exemplo n.º 1
0
        internal protected virtual void Initialize(Project project)
        {
            // There may be run configuration properties defined in the
            // main property group in the project. Those values have to
            // be initially loaded in new run configurations.

            using (var pi = project.MSBuildProject.CreateInstance()) {
                pi.SetGlobalProperty("BuildingInsideVisualStudio", "true");
                pi.SetGlobalProperty("RunConfiguration", "");
                pi.OnlyEvaluateProperties = true;
                pi.Evaluate();
                var lg = pi.GetPropertiesLinkedToGroup(MainPropertyGroup);
                Read(lg);
                properties = MainPropertyGroup;
                MainPropertyGroup.UnlinkFromProjectInstance();
            }
        }
Exemplo n.º 2
0
        protected override void OnCopyFrom(ItemConfiguration configuration, bool isRename)
        {
            base.OnCopyFrom(configuration, isRename);

            ProjectConfiguration projectConf = configuration as ProjectConfiguration;

            if (isRename && projectConf.IntermediateOutputDirectory == projectConf.DefaultIntermediateOutputDirectory)
            {
                intermediateOutputDirectory = null;
            }
            else
            {
                intermediateOutputDirectory = projectConf.intermediateOutputDirectory;
            }

            outputDirectory = projectConf.outputDirectory;

            if (isRename && outputDirectory != null)
            {
                var ps = outputDirectory.ToString().Split(Path.DirectorySeparatorChar);
                int i  = Array.IndexOf(ps, configuration.Name);
                if (i != -1)
                {
                    ps [i]          = Name;
                    outputDirectory = string.Join(Path.DirectorySeparatorChar.ToString(), ps);
                }
            }

            debugMode             = projectConf.debugMode;
            pauseConsoleOutput    = projectConf.pauseConsoleOutput;
            externalConsole       = projectConf.externalConsole;
            commandLineParameters = projectConf.commandLineParameters;
            debugType             = projectConf.debugType;
            debugTypeWasNone      = projectConf.debugTypeWasNone;
            debugTypeReadAsEmpty  = projectConf.debugTypeReadAsEmpty;

            environmentVariables.Clear();
            foreach (KeyValuePair <string, string> el in projectConf.environmentVariables)
            {
                environmentVariables.Add(el.Key, el.Value);
            }

            runWithWarnings = projectConf.runWithWarnings;

            MainPropertyGroup.CopyFrom(projectConf.MainPropertyGroup);
        }
Exemplo n.º 3
0
 public StarsPreset(ParticleLayerBrush brush)
 {
     _properties = brush.Properties;
 }
Exemplo n.º 4
0
 public FireplacePreset(ParticleLayerBrush brush)
 {
     _properties = brush.Properties;
 }