public static void Init() { try { Logger.Log.Info("RestoreTabs Init"); UserSettingsService.RegPlugin(PluginName, CreateUserSettings, CheckUserSettings); UserSettingsService.ChangeSettings += UserSettingsService_ChangeSettings; // Добавление кнопки в статус бар StatusBarEx.AddPane(string.Empty, "Откытие чертежей", (p, e) => Restore(), icon: Resources.restoreFiles16); var isOn = UserSettingsService.GetPluginValue <bool>(PluginName, ParamRestoreIsOn); if (isOn) { Logger.Log.Info("RestoreTabs включен."); Subscribe(); var tabsData = LoadData(); if (tabsData.Data?.Sessions?.Any(s => s?.Drawings?.Count > 0) == true) { Restore(); } } else { Logger.Log.Info("RestoreTabs отключен."); } } catch (Exception ex) { Logger.Log.Error(ex, "RestoreTabs.Init"); } }