Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Side by Side Diff: experimental/visual_studio_plugin/third_party/Microsoft.VisualStudio.Project/PropertiesEditorLauncher.cs

Issue 10928195: First round of dead file removal (Closed) Base URL: https://github.com/samclegg/nativeclient-sdk.git@master
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 /// Copyright (c) Microsoft Corporation. All rights reserved.
2
3 using System;
4 using System.ComponentModel;
5 using Microsoft.VisualStudio.Shell;
6 using Microsoft.VisualStudio.Shell.Interop;
7 using ErrorHandler = Microsoft.VisualStudio.ErrorHandler;
8
9 namespace Microsoft.VisualStudio.Project
10 {
11 /// <summary>
12 /// This class is used to enable launching the project properties
13 /// editor from the Properties Browser.
14 /// </summary>
15 [CLSCompliant(false)]
16 public class PropertiesEditorLauncher : ComponentEditor
17 {
18 private ServiceProvider serviceProvider;
19
20 #region ctor
21 public PropertiesEditorLauncher(ServiceProvider serviceProvider)
22 {
23 if(serviceProvider == null)
24 throw new ArgumentNullException("serviceProvider ");
25
26 this.serviceProvider = serviceProvider;
27 }
28 #endregion
29 #region overridden methods
30 /// <summary>
31 /// Launch the Project Properties Editor (properties pages)
32 /// </summary>
33 /// <returns>If we succeeded or not</returns>
34 public override bool EditComponent(ITypeDescriptorContext contex t, object component)
35 {
36 if(component is ProjectNodeProperties)
37 {
38 IVsPropertyPageFrame propertyPageFrame = (IVsPro pertyPageFrame)serviceProvider.GetService((typeof(SVsPropertyPageFrame)));
39
40 int hr = propertyPageFrame.ShowFrame(Guid.Empty) ;
41 if(ErrorHandler.Succeeded(hr))
42 return true;
43 else
44 ErrorHandler.ThrowOnFailure(propertyPage Frame.ReportError(hr));
45 }
46
47 return false;
48 }
49 #endregion
50
51 }
52 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698