/// <summary> /// This event occurs when the connection has been updated in XrmToolBox /// </summary> public override void UpdateConnection(IOrganizationService newService, ConnectionDetail detail, string actionName, object parameter) { base.UpdateConnection(newService, detail, actionName, parameter); _usageManager = new EntityUsageManager(Service); if (mySettings != null && detail != null) { mySettings.LastUsedOrganizationWebappUrl = detail.WebApplicationUrl; LogInfo("Connection has changed to: {0}", detail.WebApplicationUrl); } }
private void MyPluginControl_Load(object sender, EventArgs e) { _usageManager = new EntityUsageManager(Service); ddlEntityTypes.ComboBox.Items.Add(EntityType.All); ddlEntityTypes.ComboBox.Items.Add(EntityType.Custom); ddlEntityTypes.ComboBox.Items.Add(EntityType.Customizable); ddlEntityTypes.ComboBox.Items.Add(EntityType.OutOfTheBox); // Loads or creates the settings for the plugin if (!SettingsManager.Instance.TryLoad(GetType(), out mySettings)) { mySettings = new Settings(); LogWarning("Settings not found => a new settings file has been created!"); } else { LogInfo("Settings found and loaded"); } }