diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-06-04 19:46:22 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-06-04 19:46:22 +0300 |
| commit | 77b37339decd9c023d4ced37e677797f5b72c3ae (patch) | |
| tree | 8a536eda6721abfb310b07cd4b645d1273ef5160 /Software/Visual_Studio/VSIX/Tango.BuildExtensions/VSIXBase.cs | |
| parent | 24e5224eb41da3a736c46235567c8ba5484414e3 (diff) | |
| download | Tango-77b37339decd9c023d4ced37e677797f5b72c3ae.tar.gz Tango-77b37339decd9c023d4ced37e677797f5b72c3ae.zip | |
Implemented VSIX remote debugger!!!!
Diffstat (limited to 'Software/Visual_Studio/VSIX/Tango.BuildExtensions/VSIXBase.cs')
| -rw-r--r-- | Software/Visual_Studio/VSIX/Tango.BuildExtensions/VSIXBase.cs | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/Software/Visual_Studio/VSIX/Tango.BuildExtensions/VSIXBase.cs b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/VSIXBase.cs index 068268298..b5e5dd0a0 100644 --- a/Software/Visual_Studio/VSIX/Tango.BuildExtensions/VSIXBase.cs +++ b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/VSIXBase.cs @@ -15,12 +15,14 @@ using VSLangProj; using System.Runtime.InteropServices; using TestStack.White.WindowsAPI; using System.IO; +using Microsoft.VisualStudio.Threading; namespace Tango.BuildExtensions { public class VSIXBase { private SelectForm _form; + private IVsThreadedWaitDialog2 _vsProgress = null; public IServiceProvider BaseServiceProvider { get; private set; } @@ -195,6 +197,45 @@ namespace Tango.BuildExtensions #region Status Form + protected void OpenVSProgress(String title, String message, bool intermediate) + { + Microsoft.VisualStudio.Shell.ThreadHelper.Generic.Invoke(() => + { + _vsProgress = null; + IVsThreadedWaitDialogFactory dialogFactory = BaseServiceProvider.GetService(typeof(SVsThreadedWaitDialogFactory)) as IVsThreadedWaitDialogFactory; + dialogFactory.CreateInstance(out _vsProgress); + + + if (intermediate) + { + _vsProgress.StartWaitDialog(title, message, "", null, null, 0, false, true); + } + else + { + _vsProgress.StartWaitDialogWithPercentageProgress(title, message, "", null, null, false, 0, 0, 100); + } + }); + } + + + + protected void SetVSProgress(String message, String progressText = null, int current = 0, int total = 0) + { + Microsoft.VisualStudio.Shell.ThreadHelper.Generic.Invoke(() => + { + bool c; + _vsProgress.UpdateProgress(message, progressText, null, current, total, true, out c); + }); + } + + protected void CloseVSProgress() + { + Microsoft.VisualStudio.Shell.ThreadHelper.Generic.Invoke(() => + { + _vsProgress.EndWaitDialog(); + }); + } + protected void OpenProgressForm() { System.Threading.Thread thread = new System.Threading.Thread(() => |
