private void OnKeyInputEnd(object sender, KeyInputEventArgs args) { System.Console.WriteLine("cyc add listener---"); return; IVimBuffer vb = (IVimBuffer)sender; if (vb == null) { return; } var status = CommandMarginUtil.GetStatus(vb, vb.Mode, forModeSwitch: false); int frozen; if (_vsStatusbar != null) { _vsStatusbar.IsFrozen(out frozen); if (frozen != 0) { _vsStatusbar.FreezeOutput(0); } _vsStatusbar.SetText(status); } }
public override void StartProgressMessage(string message) { // stock general animation icon object icon = (short)Microsoft.VisualStudio.Shell.Interop.Constants.SBAI_General; try { // Make sure the status bar is not frozen int frozen; _statusBar.IsFrozen(out frozen); if (frozen != 0) { _statusBar.FreezeOutput(0); } _statusBar.SetText(message); // start icon animation _statusBar.Animation(1, ref icon); } catch (InvalidOperationException) { } }
public static void StartProgressMessage(string message) { ThreadHelper.JoinableTaskFactory.RunAsync(async() => { await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); // stock general animation icon object icon = (short)Constants.SBAI_General; // Make sure the status bar is not frozen int frozen; _statusBar.IsFrozen(out frozen); if (frozen != 0) { _statusBar.FreezeOutput(0); } _statusBar.SetText(message); // start icon animation _statusBar.Animation(1, ref icon); }); }
public bool IsFrozen() { int frozen; ErrorHandler.ThrowOnFailure(statusBar.IsFrozen(out frozen)); return(Convert.ToBoolean(frozen)); }
public override void SetText(string text) { Assert.ArgumentNotNull(text, nameof(text)); IVsStatusbar statusBar = null; ThreadHelper.JoinableTaskFactory.Run(async delegate { await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); statusBar = SitecorePackage.Instance.GetService <SVsStatusbar>() as IVsStatusbar; }); if (statusBar == null) { return; } int frozen; statusBar.IsFrozen(out frozen); if (frozen == 0) { statusBar.SetText(text); } }
private static bool IsStatusBarFrozen(IVsStatusbar statusBar) { int frozen; statusBar.IsFrozen(out frozen); return(frozen == 1); }
private void SetStatusBarText(string text) { int frozen; if (statusBar != null && statusBar.IsFrozen(out frozen) == 0) { statusBar.SetText(text); } }
public void SetStatusMessage(String message) { // Make sure the status bar is not frozen int frozen; StatusBar.IsFrozen(out frozen); if (frozen != 0) { StatusBar.FreezeOutput(0); } // Set the status bar text and make its display static. StatusBar.SetText(message); //SetAnimationObject(); //StatusBar.Animation(1, ref _animationObject); }
public override void DeployDot() { try { int fFrozen = 1; string msg; if (m_statusBar != null && m_statusBar.IsFrozen(out fFrozen) == Utility.COM_HResults.S_OK && fFrozen != 1 && m_statusBar.GetText(out msg) == Utility.COM_HResults.S_OK ) { m_statusBar.SetText(msg + "."); } } catch (InvalidOperationException) { } }
public void SetStatus(string format, params object[] args) { int frozen; _statusBar.IsFrozen(out frozen); if (frozen == 0) { _statusBar.SetText(string.Format(format, args)); } }
public void SetStatus(string message) { int frozen; IVsStatusbar statusBar = base.GetService(typeof(SVsStatusbar)) as IVsStatusbar; statusBar.IsFrozen(out frozen); if (!Convert.ToBoolean(frozen)) { statusBar.SetText(message); } OutputStringInGeneralPane(message); }
internal static void ShowStatus(string message) { if (_statusBar == null) { return; } int frozen; _statusBar.IsFrozen(out frozen); if (frozen == 0) { _statusBar.SetText(message); } }
private void UpdateProgress(ExportedMutantInfo info, IVsStatusbar statusBar, int killCount) { // https://msdn.microsoft.com/en-us/library/bb166795.aspx // Make sure the status bar is not frozen int frozen; statusBar.IsFrozen(out frozen); if (frozen != 0) { statusBar.FreezeOutput(0); } statusBar.SetText("Mutating " + Path.GetFileName(info.fileName) + " (" + killCount + " mutants killed) ..."); }
private void Log(string logText) { // Make sure the status bar is not frozen int frozen; _statusBar.IsFrozen(out frozen); if (frozen != 0) { _statusBar.FreezeOutput(0); } // Set the status bar text and make its display static. _statusBar.SetText(logText); // Freeze the status bar. _statusBar.FreezeOutput(1); }
public void setStatusBar(string statusMessage) { IVsStatusbar statusBar = (IVsStatusbar)serviceProvider.GetService(typeof(SVsStatusbar)); // Check if status bar is frozen and unfreeze it if so int frozen; statusBar.IsFrozen(out frozen); if (frozen != 0) { statusBar.FreezeOutput(0); } // Set the status bar text statusBar.SetText(DateTime.Now + " - " + statusMessage); }
/// <summary> /// Display text on the Visual Studio status bar. /// </summary> /// <param name="text"></param> private void DisplayTextOnStatusBar(string text) { if (statusBar != null) { statusBar.IsFrozen(out frozen); if (frozen == 0) { // Set the status bar text and make its display static. statusBar.SetText(text); statusBar.FreezeOutput(1); // Clear the status bar text. statusBar.FreezeOutput(0); statusBar.Clear(); } } }
public void WriteToStatusBar(string s) { if (null == _statusbar) { return; } int frozen; _statusbar.IsFrozen(out frozen); if (0 == frozen) { _statusbar.SetText(s); } }
public void ShowText(string text) { Microsoft.VisualStudio.Shell.ThreadHelper.ThrowIfNotOnUIThread(); if (string.IsNullOrEmpty(text)) { return; } int frozen; _statusBar.IsFrozen(out frozen); if (frozen == 0) { _statusBar.SetText(text); } }
private void SetVsStatusbarText(string text) { ThreadHelper.ThrowIfNotOnUIThread(); IVsStatusbar statusBar = (IVsStatusbar)ServiceProvider.GetService(typeof(SVsStatusbar)); Assumes.Present(statusBar); int frozen; statusBar.IsFrozen(out frozen); if (frozen != 0) { statusBar.FreezeOutput(0); } statusBar.SetText(text); statusBar.FreezeOutput(1); }
private void statusBarRefreshTimer_Tick(object sender, object e) { ThreadHelper.ThrowIfNotOnUIThread(); int frozen; statusBar.IsFrozen(out frozen); if (frozen != 0) { statusBar.FreezeOutput(0); } statusBar.SetText(text); statusBar.FreezeOutput(1); }
private void PrepareStatusbar(out uint cookie, out object icon) { cookie = 0; icon = (short)InteropConstants.SBAI_Save; int frozen; statusBar.IsFrozen(out frozen); if (frozen != 0) { return; } statusBar.Progress(ref cookie, 1, string.Empty, 0, 0); statusBar.SetText("Rendering template..."); statusBar.Animation(1, ref icon); }
private void SetText(Levels level, string text) { if (level != Levels.Info) { text = FormatLevel(level) + text; } int frozen; _statusBar.IsFrozen(out frozen); if (frozen != 0) { return; } _statusBar.SetText(text); }
void WriteStatusBarText(string text) { IVsStatusbar statusBar = (IVsStatusbar)_serviceProvider.GetService(typeof(SVsStatusbar)); if (statusBar == null) { return; } int frozen; statusBar.IsFrozen(out frozen); if (frozen != 0) { statusBar.FreezeOutput(0); } statusBar.SetText(text); statusBar.FreezeOutput(1); }
private void SetStatusBarText(string status) { if (!String.IsNullOrEmpty(status)) { status = String.Format("SSMScripter: {0}", status); } IVsStatusbar statusBar = (IVsStatusbar)ServiceProvider.GetService(typeof(SVsStatusbar)); int frozen; statusBar.IsFrozen(out frozen); if (frozen != 0) { statusBar.FreezeOutput(0); } statusBar.SetText(status); }
public void WriteStatus(string message) { // Make sure the status bar is not frozen int frozen; _statusBar.IsFrozen(out frozen); if (frozen != 0) { _statusBar.FreezeOutput(0); } // Set the status bar text and make its display static. _statusBar.SetText(message); // Freeze the status bar. _statusBar.FreezeOutput(1); // Clear the status bar text. _statusBar.FreezeOutput(0); _statusBar.Clear(); }
private void PrepareStatusbar(out object icon) { icon = (short)InteropConstants.SBAI_Save; try { int frozen; _statusBar.IsFrozen(out frozen); if (frozen != 0) { return; } _statusBar.SetText("Rendering template..."); _statusBar.Animation(1, ref icon); } catch (Exception exception) { Log.Debug("Failed to prepare statusbar: {0}", exception.Message); } }
public override async Task ReportProgressAsync( string progressMessage, uint currentStep, uint totalSteps) { await _taskFactory.SwitchToMainThreadAsync(); // Make sure the status bar is not frozen int frozen; _statusBar.IsFrozen(out frozen); if (frozen != 0) { _statusBar.FreezeOutput(0); } _statusBar.SetText(progressMessage); if (totalSteps != 0) { _statusBar.Progress(ref _cookie, 1, "", currentStep, totalSteps); } }
private void PrepareStatusbar(out uint cookie, out object icon) { cookie = 0; icon = (short)InteropConstants.SBAI_Save; try { int frozen; statusBar.IsFrozen(out frozen); if (frozen != 0) { return; } statusBar.Progress(ref cookie, 1, string.Empty, 0, 0); statusBar.SetText("Rendering template..."); statusBar.Animation(1, ref icon); } catch (Exception exception) { Log.Debug("Failed to prepare statusbar: {0}", exception.Message); } }
/// <summary> /// Get all library archives accessible to the linker of the specified project. /// </summary> /// <param name="project">The project to get the LibArchives for</param> /// <param name="statusBar">the VS status bar</param> /// <returns>Parsed libraries which are accessible by the linker of the given project.</returns> public List<LibArchive> GetLibraryArchives(Project project, IVsStatusbar statusBar) { int frozen; uint cookie = 0; statusBar.IsFrozen(out frozen); if (!_projectArchiveMap.ContainsKey(project)) { var archives = new List<LibArchive>(); var libraries = GetLibraries(project); if (frozen == 0) statusBar.Progress(ref cookie, 1, "", 0, (uint)libraries.Count); int i = 0; foreach(var lib in libraries) { if (frozen == 0) { statusBar.Progress(ref cookie, 1, "", (uint) i++, (uint)libraries.Count); statusBar.SetText("Scanning " + Path.GetFileName(lib)); } archives.Add(GetArchive(lib)); } _projectArchiveMap.Add(project, archives); } if (frozen == 0) { statusBar.Progress(ref cookie, 0, "", 0, 0); statusBar.Clear(); } return _projectArchiveMap[project]; }
public override void ReportProgress( string progressMessage, uint currentStep, uint totalSteps) { ThreadHelper.ThrowIfNotOnUIThread(); // Make sure the status bar is not frozen int frozen; StatusBar.IsFrozen(out frozen); if (frozen != 0) { StatusBar.FreezeOutput(0); } StatusBar.SetText(progressMessage); if (totalSteps != 0) { StatusBar.Progress(ref cookie, 1, "", currentStep, totalSteps); } }
//<Snippet1> void FeedbackRegionExample() { IVsStatusbar statusBar = (IVsStatusbar)GetService(typeof(SVsStatusbar)); int frozen; statusBar.IsFrozen(out frozen); if (frozen == 0) { // Set the status bar text and make its display static. statusBar.SetText("Here's some static text."); statusBar.FreezeOutput(1); // Retrieve the status bar text. string text; statusBar.GetText(out text); System.Windows.Forms.MessageBox.Show(text); // Clear the status bar text. statusBar.FreezeOutput(0); statusBar.Clear(); } }
private static bool IsStatusBarFrozen(IVsStatusbar statusBar) { int frozen; statusBar.IsFrozen(out frozen); return frozen == 1; }