Datei: NDOPackage/Commands/AddPersistentClass.cs

Last Commit (4a7e8ab)
1 -- File didn't exist --
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
New Commit (3030986)
1 using Microsoft.VisualStudio;
2 using Microsoft.VisualStudio.Shell.Interop;
3
4 namespace NDOVsPackage.Commands
5 {
6 ····[Command(PackageGuids.guidNDOPackageCmdSetString, PackageIds.cmdidAddClass)]
7 ····internal sealed class AddPersistentClass : BaseCommand<AddPersistentClass>
8 ····{
9 ········protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
10 ········{
11 ············await VS.MessageBox.ShowWarningAsync("AddPersistentClass", "Button clicked");
12 ········}
13
14 ········protected override void BeforeQueryStatus(EventArgs e)
15 ········{
16 ············ThreadHelper.JoinableTaskFactory.Run(async () =>
17 ············{
18 ················var project = await VS.Solutions.GetActiveProjectAsync();
19 ················await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();
20 ················var enabled = CodeGenHelper.IsCsOrVbProject(project);
21 ················Command.Enabled = enabled;
22 ············});
23 ········}
24 ····}
25 }
26