Example #1
0
        public void Assign(IRPlotDevice device)
        {
            _mainThread.Assert();

            _device = device;
            _device.PlotAddedOrUpdated += PlotAddedOrUpdated;
            _device.Cleared            += Cleared;
            _device.DeviceNumChanged   += DeviceNumChanged;
            _device.LocatorModeChanged += DeviceLocatorModeChanged;

            Refresh(_device.ActivePlot);
        }
Example #2
0
 private void AssertIsOnMainThread()
 {
     if (!_testEnvironment)
     {
         _mainThread.Assert();
     }
 }
Example #3
0
 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));
     }
 }
Example #4
0
            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;
            }
Example #5
0
        public void DecreaseThumbnailSize()
        {
            _mainThread.Assert();

            if (ThumbnailSize > MinThumbnailSize)
            {
                ThumbnailSize -= ThumbnailSizeIncrement;
            }
        }
Example #6
0
 public void RefreshDeviceName()
 {
     _mainThread.Assert();
     DeviceName = string.Format(CultureInfo.CurrentCulture, Resources.Plots_DeviceName, _plot.ParentDevice.DeviceNum);
 }