public static void Text(string aText, int aFreezeStatusBar) { if (!VsServiceProvider.TryGetService(typeof(SVsStatusbar), out object statusBarService) || null == statusBarService as IVsStatusbar) { return; } var statusBar = statusBarService as IVsStatusbar; // Make sure the status bar is not frozen if (VSConstants.S_OK != statusBar.IsFrozen(out int frozen)) { return; } UIUpdater.InvokeAsync(() => { if (0 != frozen) { statusBar.FreezeOutput(0); } // Set the status bar text statusBar.SetText(aText); // Freeze the status bar. statusBar.FreezeOutput(aFreezeStatusBar); // Clear the status bar text. if (0 == aFreezeStatusBar) { statusBar.Clear(); } }).SafeFireAndForget(); }
public void Clear() { UIUpdater.InvokeAsync(() => { Tasks.Clear(); }).SafeFireAndForget(); }
public void Clear() { mOutputContent = new OutputContentModel(); var outputWindow = mOutputWindowBuilder.GetResult(); UIUpdater.InvokeAsync(() => { outputWindow.Pane.Clear(); }).SafeFireAndForget(); }
private void DisplayErrorWindow() { try { UIUpdater.InvokeAsync(new Action(() => { var window = new EncodingErrorView(ItemsCollector.GetDocumentsToEncode()); window.ShowDialog(); })).SafeFireAndForget(); } catch (Exception) { } }
private void UninstallFinished(object sender, EventArgs e) { ResetVersionUsedIfRequired(); ResetButtonsState(); UIUpdater.InvokeAsync(new Action(() => { InstalledLlvms.Remove(llvmController.llvmModel.Version); if (InstalledLlvms.Count > 0 && InstalledLlvms.Contains(VersionUsed) == false) { VersionUsed = InstalledLlvms[0]; } })).SafeFireAndForget(); }
private void DisplayErrorWindow() { try { UIUpdater.InvokeAsync(new Action(() => { var itemsCollector = new ItemsCollector(); var window = new EncodingErrorView(itemsCollector.GetDocumentsToEncode()); window.ShowDialog(); })).SafeFireAndForget(); } catch (Exception e) { MessageBox.Show(e.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public void OnErrorDetected(object sender, ErrorDetectedEventArgs e) { UIUpdater.InvokeAsync(() => { SuspendRefresh(); foreach (TaskErrorModel error in e.ErrorList) { error.Navigate += ErrorTaskNavigate; Tasks.Add(error); } ResumeRefresh(); BringToFront(); }).SafeFireAndForget(); }
public static void Animation(vsStatusAnimation aAnimation, int aEnableAnimation) { if (!VsServiceProvider.TryGetService(typeof(SVsStatusbar), out object statusBarService) || null == statusBarService as IVsStatusbar) { return; } var statusBar = statusBarService as IVsStatusbar; // Use the standard Visual Studio icon for building. object icon = (short)Microsoft.VisualStudio.Shell.Interop.Constants.SBAI_Build; UIUpdater.InvokeAsync(() => { // Display the icon in the Animation region. statusBar.Animation(aEnableAnimation, ref icon); }).SafeFireAndForget(); }
public void OnErrorDetected(object sender, ErrorDetectedEventArgs e) { UIUpdater.InvokeAsync(() => { SuspendRefresh(); foreach (TaskErrorModel error in e.ErrorList) { error.Navigate += ErrorTaskNavigate; Tasks.Add(error); } ResumeRefresh(); if (new SettingsProvider().GetCompilerSettingsModel().ShowErrorList) { BringToFront(); } }).SafeFireAndForget(); }
private void InstallFinished(object sender, EventArgs e) { ResetButtonsState(); VersionUsed = llvmController.llvmModel.Version; UIUpdater.InvokeAsync(InsertVersionToInstalledLlvms).SafeFireAndForget(); }