private void InvalidateCache()
        {
            Console.WriteLine("invalidated");
            gm.Ld = ld;
            mm.InvalidateCache();
            gm.InvalidateCache();

            if (sm.GetConfig(BackgroundSettingsAction.configureName, false))
            {
                string backgroundPath = sm.GetConfig(BackgroundSettingsAction.pathConfigureName, "");
                if (prevBackgroundPath != backgroundPath)
                {
                    prevBackgroundPath = backgroundPath;
                    try
                    {
                        Image img = Image.FromFile(sm.GetConfig(BackgroundSettingsAction.pathConfigureName, ""));
                        if (img == null)
                        {
                            throw new Exception();
                        }

                        gm.SetBackground(img, 0.5f);
                    }
                    catch (Exception)
                    {
                        sm.SetConfig(BackgroundSettingsAction.configureName, false);
                        prevBackgroundPath = "";
                    }
                }
            }
        }
Exemplo n.º 2
0
 private void InvalidateCache()
 {
     gm.Ld = ld;
     mm.InvalidateCache();
     gm.InvalidateCache();
 }