コード例 #1
0
        ///  Reset
        ///  clear the current cached information about the measurement dc.
        internal static void Reset()
        {
            CachedInfo currentCachedInfo = cachedMeasurementDCInfo;

            if (currentCachedInfo != null)
            {
                currentCachedInfo.UpdateFont(null);
            }
        }
コード例 #2
0
        internal static void ResetIfIsMeasurementDC(IntPtr hdc)
        {
            WindowsGraphics sharedGraphics = WindowsGraphicsCacheManager.GetCurrentMeasurementGraphics();

            if (sharedGraphics != null && sharedGraphics.DeviceContext != null && sharedGraphics.DeviceContext.Hdc == hdc)
            {
                CachedInfo currentCachedInfo = cachedMeasurementDCInfo;
                if (currentCachedInfo != null)
                {
                    currentCachedInfo.UpdateFont(null);
                }
            }
        }