void SetOutputTypeCombo() { MSBuildItemDefinitionGroup group = new MSBuildItemDefinitionGroup(base.Project, base.Project.ActiveConfiguration, base.Project.ActivePlatform); string subsystem = group.GetElementMetadata("Link", "SubSystem"); string configurationType = base.Project.GetEvaluatedProperty("ConfigurationType"); OutputType validOutputType = ConfigurationTypeToOutputType(configurationType, subsystem); this.outputTypeComboBox.SelectedIndex = Array.IndexOf((OutputType[])Enum.GetValues(typeof(OutputType)), validOutputType); }
public override void LoadPanelContents() { base.LoadPanelContents(); ComboBox cbOutputType = Get<ComboBox>("outputType"); helper.AddBinding("ConfigurationType", new ObservedBinding<string, ComboBox>(cbOutputType, ConvertOutputType)); MSBuildItemDefinitionGroup group = new MSBuildItemDefinitionGroup(project, helper.Configuration, helper.Platform); string subsystem = group.GetElementMetadata("Link", "SubSystem"); string configurationType = project.GetEvaluatedProperty("ConfigurationType"); OutputType validOutputType = ConfigurationTypeToOutputType(configurationType, subsystem); cbOutputType.SelectedIndex = Array.IndexOf((OutputType[])Enum.GetValues(typeof(OutputType)), validOutputType); TextBox tbApplicationIcon = Get<TextBox>("applicationIcon"); helper.AddBinding(null, new ObservedBinding<object, TextBox>(tbApplicationIcon, SetApplicationIcon)); tbApplicationIcon.Text = GetApplicationIconPathFromResourceScripts(); DisableWin32ResourceOptions(); IsDirty = false; }
private static string GetElementMetaData (MSBuildItemDefinitionGroup group,string name) { return group.GetElementMetadata(metaElement,name); }