OLD | NEW |
| (Empty) |
1 /// Copyright (c) Microsoft Corporation. All rights reserved. | |
2 | |
3 using System; | |
4 using System.Diagnostics; | |
5 using System.Globalization; | |
6 using System.Runtime.InteropServices; | |
7 using Microsoft.VisualStudio; | |
8 | |
9 namespace Microsoft.VisualStudio.Project | |
10 { | |
11 /// <summary> | |
12 /// Enumerated list of the properties shown on the build property page | |
13 /// </summary> | |
14 internal enum BuildPropertyPageTag | |
15 { | |
16 OutputPath | |
17 } | |
18 | |
19 /// <summary> | |
20 /// Defines the properties on the build property page and the logic the
binds the properties to project data (load and save) | |
21 /// </summary> | |
22 [CLSCompliant(false), ComVisible(true), Guid("9B3DEA40-7F29-4a17-87A4-00
EE08E8241E")] | |
23 public class BuildPropertyPage : SettingsPage | |
24 { | |
25 #region fields | |
26 private string outputPath; | |
27 | |
28 public BuildPropertyPage() | |
29 { | |
30 this.Name = SR.GetString(SR.BuildCaption, CultureInfo.Cu
rrentUICulture); | |
31 } | |
32 #endregion | |
33 | |
34 #region properties | |
35 [SRCategoryAttribute(SR.BuildCaption)] | |
36 [LocDisplayName(SR.OutputPath)] | |
37 [SRDescriptionAttribute(SR.OutputPathDescription)] | |
38 public string OutputPath | |
39 { | |
40 get { return this.outputPath; } | |
41 set { this.outputPath = value; this.IsDirty = true; } | |
42 } | |
43 #endregion | |
44 | |
45 #region overridden methods | |
46 public override string GetClassName() | |
47 { | |
48 return this.GetType().FullName; | |
49 } | |
50 | |
51 protected override void BindProperties() | |
52 { | |
53 if(this.ProjectMgr == null) | |
54 { | |
55 Debug.Assert(false); | |
56 return; | |
57 } | |
58 | |
59 this.outputPath = this.GetConfigProperty(BuildPropertyPa
geTag.OutputPath.ToString()); | |
60 } | |
61 | |
62 protected override int ApplyChanges() | |
63 { | |
64 if(this.ProjectMgr == null) | |
65 { | |
66 Debug.Assert(false); | |
67 return VSConstants.E_INVALIDARG; | |
68 } | |
69 | |
70 this.SetConfigProperty(BuildPropertyPageTag.OutputPath.T
oString(), this.outputPath); | |
71 this.IsDirty = false; | |
72 return VSConstants.S_OK; | |
73 } | |
74 #endregion | |
75 } | |
76 } | |
OLD | NEW |