示例#1
0
 /// <summary>
 /// Add BlackBerry configurations to the project.
 /// </summary>
 /// <param name="proj"> Represents a project in the integrated development environment. </param>
 private void AddBlackBerryConfigurations(Project proj)
 {
     try
     {
         ConfigurationManager mgr  = proj.ConfigurationManager;
         Configurations       cfgs = mgr.AddPlatform(BLACKBERRY, "Win32", true);
         mgr.DeletePlatform("Win32");
         mgr.AddConfigurationRow("Device-Debug", "Debug", true);
         mgr.AddConfigurationRow("Simulator", "Debug", true);
         mgr.DeleteConfigurationRow("Debug");
         mgr.AddConfigurationRow("Device-Release", "Release", true);
         mgr.DeleteConfigurationRow("Release");
     }
     catch (Exception e)
     {
         Debug.WriteLine(e.Message);
     }
 }
示例#2
0
        private void CheckAndAddProjConf(EnvDTE.Project proj, string confType)
        {
            bool needAdd = true;
            ConfigurationManager projConfManager = proj.ConfigurationManager;

            if (projConfManager != null)
            {
                foreach (Configuration conf in projConfManager)
                {
                    if (conf.ConfigurationName == confType + " [ChartPoints]")
                    {
                        needAdd = false;
                    }
                }
                if (needAdd)
                {
                    Configurations cpConfs = projConfManager.AddConfigurationRow(confType + " [ChartPoints]", confType, false /*true*/);
                }
            }
        }