示例#1
0
 /// <summary>
 /// Инициализировать объекты для обновления настроек
 /// </summary>
 private void InitSettingsUpdaters()
 {
     webSettingsUpdater = new SettingsUpdater(WebSettings,
                                              AppDirs.ConfigDir + WebSettings.DefFileName, true, Log);
     viewSettingsUpdater = new SettingsUpdater(ViewSettings,
                                               AppDirs.ConfigDir + ViewSettings.DefFileName, true, Log);
 }
示例#2
0
        /// <summary>
        /// Конструктор, ограничивающий создание объекта из других классов
        /// </summary>
        private AppData()
        {
            appDataLock = new object();

            inited        = false;
            cultureName   = Localization.Culture.Name;
            viewStampCntr = 0;

            scadaDataDictUpdater = null;
            scadaWebDictUpdater  = null;
            webSettingsUpdater   = null;
            viewSettingsUpdater  = null;
            viewSettingsBaseAge  = DateTime.MinValue;

            WebSettings  = new WebSettings();
            ViewSettings = new ViewSettings();
            PluginSpecs  = new List <PluginSpec>();
            UiObjSpecs   = new Dictionary <string, UiObjSpec>();
            AppDirs      = new AppDirs();
            Log          = new Log(Log.Formats.Full);
            Storage      = new Storage(AppDirs.StorageDir);
            RememberMe   = new RememberMe(Storage, Log);
            Stats        = new Stats(Storage, Log);
            UserMonitor  = new UserMonitor(Log);

            CreateDataObjects();
        }
示例#3
0
        /// <summary>
        /// Инициализировать объекты для обновления словарей и настроек
        /// </summary>
        private void InitUpdaters()
        {
            scadaDataDictUpdater = new DictUpdater(AppDirs.LangDir, "ScadaData", CommonPhrases.Init, Log);
            scadaWebDictUpdater  = new DictUpdater(AppDirs.LangDir, "ScadaWeb", WebPhrases.Init, Log);

            commSettingsUpdater = new SettingsUpdater(commSettings,
                                                      AppDirs.ConfigDir + CommSettings.DefFileName, true, Log);
            webSettingsUpdater = new SettingsUpdater(WebSettings,
                                                     AppDirs.ConfigDir + WebSettings.DefFileName, true, Log);
            viewSettingsUpdater = new SettingsUpdater(ViewSettings,
                                                      AppDirs.ConfigDir + ViewSettings.DefFileName, true, Log);
        }