/// <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); LogInfo("Connection has changed to: {0}", detail.WebApplicationUrl); // ENTITIES LIST - update the connection EntitiesListControl.UpdateConnection(newService); entitiesDropdownControl1.UpdateConnection(newService); }
/// <summary> /// On Load of the plugin control, perform some initialization of the Controls /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void MyPluginControl_Load(object sender, EventArgs e) { //ShowInfoNotification("This is a notification that can lead to XrmToolBox repository", new Uri("https://github.com/MscrmTools/XrmToolBox")); // initialize the user control with the connection and parent reference // EntitiesListControl.Initialize(this, Service); EntitiesListControl.ParentBaseControl = this; EntitiesListControl.Service = Service; EntitiesListControl.ErrorOccurred += EntitiesListControl_ErrorOccurred; // apply some Entity Filters. Do not load entities from the futz_ publisher. EntitiesListControl.EntityFilters.Add(new FilterInfo() { FilterMatchType = EnumFilterMatchType.StartsWith, FilterString = "futz_" }); EntitiesListControl.DisplayToolbar = true; // add the entity filter that will return Attribute metadata // EntitiesListControl.EntityRequestFilters.Add(EntityFilters.Attributes); // set up the properties detail SetPropertySelectedObject(); entitiesDropdownControl1.ParentBaseControl = this; entitiesDropdownControl1.Service = Service; if (Service == null) { return; } // automatically load the data? if (MessageBox.Show("Would you like to automatically load the Entities?", "Load Entities", MessageBoxButton.YesNo) == MessageBoxResult.Yes) { EntitiesListControl.LoadData(); } }
private void toolStripButton1_Click(object sender, EventArgs e) { EntitiesListControl.LoadData(); }