/// <summary> /// Initialize the Module /// </summary> public void Initialize() { try { var settings = this.PluginSettingsService.Read <RequirementsModuleSettings>(true, ReqIfJsonConverterUtility.BuildConverters()); PluginSettings = settings ?? new RequirementsModuleSettings(); } catch (PluginSettingsException pluginSettingsException) { var moduleSettings = new RequirementsModuleSettings(); this.PluginSettingsService.Write(moduleSettings); logger.Error(pluginSettingsException); } catch (Exception ex) { logger.Fatal(ex); throw ex; } this.RegisterRibbonParts(); }
/// <summary> /// Initialize the Module /// </summary> public void Initialize() { this.RegionManager.RegisterViewWithRegion(RegionNames.RibbonRegion, typeof(RequirementsRibbon)); this.RegisterRibbonParts(); try { var settings = this.PluginSettingsService.Read <RequirementsModuleSettings>(); PluginSettings = settings; } catch (PluginSettingsException pluginSettingsException) { var relationshipMatrixPluginSettings = new RequirementsModuleSettings(); this.PluginSettingsService.Write(relationshipMatrixPluginSettings); logger.Error(pluginSettingsException); } catch (Exception ex) { logger.Fatal(ex); throw ex; } }