public void Assign(IRPlotDevice device) { _mainThread.Assert(); _device = device; _device.PlotAddedOrUpdated += PlotAddedOrUpdated; _device.Cleared += Cleared; _device.DeviceNumChanged += DeviceNumChanged; _device.LocatorModeChanged += DeviceLocatorModeChanged; Refresh(_device.ActivePlot); }
private void AssertIsOnMainThread() { if (!_testEnvironment) { _mainThread.Assert(); } }
public static void ShowToolWindow(ToolWindowPane toolWindow, IMainThread mainThread, bool focus, bool immediate) { if (immediate) { mainThread.Assert(); TryShowToolWindow(toolWindow, focus); } else { mainThread.Post(() => TryShowToolWindow(toolWindow, focus)); } }
public VsStatusBarProgress(IVsStatusbar vsStatusbar, IMainThread mainThread, int totalSteps) { mainThread.Assert(); _vsStatusbar = vsStatusbar; _mainThread = mainThread; _totalSteps = (uint)totalSteps; _vsStatusbar.GetText(out string text); _vsStatusbar.Progress(ref _progressCookie, 1, string.Empty, 0, _totalSteps); _originalText = text; }
public void DecreaseThumbnailSize() { _mainThread.Assert(); if (ThumbnailSize > MinThumbnailSize) { ThumbnailSize -= ThumbnailSizeIncrement; } }
public void RefreshDeviceName() { _mainThread.Assert(); DeviceName = string.Format(CultureInfo.CurrentCulture, Resources.Plots_DeviceName, _plot.ParentDevice.DeviceNum); }