Example #1
0
        protected override void BindProperties()
        {
            if (ProjectMgr == null)
            {
                Debug.Assert(false);
                return;
            }

            _assemblyName = GetPropertyValue(Consts.AssemblyName);

            var outputType = GetPropertyValue(Consts.OutputType);

            if (outputType != null && outputType.Length > 0)
            {
                try
                {
                    _outputType = (MSP.OutputType)Enum.Parse(typeof(MSP.OutputType), outputType);
                }
                catch                 //Should only fail if project file is corrupt
                {
                }
            }

            _defaultNamespace = GetPropertyValue(Consts.RootNamespace);
            _startupObject    = GetPropertyValue(Consts.StartupObject);
            _applicationIcon  = GetPropertyValue(Consts.ApplicationIcon);

            string targetPlatform = GetPropertyValue(Consts.TargetPlatform);

            if (targetPlatform != null && targetPlatform.Length > 0)
            {
                try
                {
                    _targetPlatform =
                        (MSP.PlatformType)Enum.Parse(typeof(MSP.PlatformType), targetPlatform);
                }
                catch
                {
                }
            }

            _targetPlatformLocation = GetPropertyValue(Consts.TargetPlatformLocation);
        }
        protected override void BindProperties()
        {
            if (ProjectMgr == null)
            {
                Debug.Assert(false);
                return;
            }

            _assemblyName = GetPropertyValue(Consts.AssemblyName);

            var outputType = GetPropertyValue(Consts.OutputType);

            if (outputType != null && outputType.Length > 0)
            {
                try
                {
                    _outputType = (MSP.OutputType)Enum.Parse(typeof(MSP.OutputType), outputType);
                }
                catch //Should only fail if project file is corrupt
                {
                }
            }

            _defaultNamespace = GetPropertyValue(Consts.RootNamespace);
            _startupObject = GetPropertyValue(Consts.StartupObject);
            _applicationIcon = GetPropertyValue(Consts.ApplicationIcon);

            string targetPlatform = GetPropertyValue(Consts.TargetPlatform);

            if (targetPlatform != null && targetPlatform.Length > 0)
            {
                try
                {
                    _targetPlatform =
                        (MSP.PlatformType)Enum.Parse(typeof(MSP.PlatformType), targetPlatform);
                }
                catch
                {
                }
            }

            _targetPlatformLocation = GetPropertyValue(Consts.TargetPlatformLocation);
        }