Ejemplo n.º 1
0
 public GeneralOptions()
 {
     foreach (var colorKey in s_colorKeyList)
     {
         colorMap[colorKey] = new ColorInfo(colorKey, System.Drawing.Color.Black);
     }
 }
Ejemplo n.º 2
0
        private void LoadColorsCore(IServiceProvider Site, IVsFontAndColorStorage vsStorage)
        {
            ThreadHelper.ThrowIfNotOnUIThread();
            foreach (var colorKey in s_colorKeyList)
            {
                ColorInfo colorInfo;
                try
                {
                    var color = LoadColor(Site, vsStorage, colorKey);
                    colorInfo = new ColorInfo(colorKey, color);
                }
                catch (Exception ex)
                {
                    Debug.WriteLine($"PeasyMotion exception in Options.LoadColorsCore: {ex.ToString()}");
                    colorInfo = new ColorInfo(colorKey, System.Drawing.Color.Black, isValid: false);
                }

                colorMap[colorKey] = colorInfo;
            }
        }