Ejemplo n.º 1
0
        static LastOpenFiles()
        {
            s_lastOpenFiles = Config.Instance.GetSection(SECTION_NAME) as LastOpenFiles;

            if (s_lastOpenFiles == null)
            {
                s_lastOpenFiles = new LastOpenFiles();
                s_lastOpenFiles.SectionInformation.AllowExeDefinition = ConfigurationAllowExeDefinition.MachineToLocalUser;
                Config.Instance.Sections.Add(SECTION_NAME, s_lastOpenFiles);
            }

            s_lastOpenFiles.Check();
        }
Ejemplo n.º 2
0
        static LastOpenFiles()
        {
            try
            {
                s_lastOpenFiles = Config.Instance.GetSection(SECTION_NAME) as LastOpenFiles;
            }
            catch
            {
                s_lastOpenFiles = null;
            }

            if (s_lastOpenFiles == null)
            {
                s_lastOpenFiles = new LastOpenFiles();
                s_lastOpenFiles.SectionInformation.AllowExeDefinition = ConfigurationAllowExeDefinition.MachineToLocalUser;
                Config.Instance.Sections.Remove(SECTION_NAME);
                Config.Instance.Sections.Add(SECTION_NAME, s_lastOpenFiles);
            }

            s_lastOpenFiles.Check();
        }