/// <summary> /// Handles the ModelSelected event of the repositoryTreeControl1 control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="DSLFactory.Candle.SystemModel.Repository.Forms.ModelSelectedEventArgs"/> instance containing the event data.</param> private void repositoryTreeControl1_ModelSelected(object sender, ModelSelectedEventArgs e) { if (dgAssemblies.SelectedRows.Count > 0) { ComponentMetadataMap data = (ComponentMetadataMap)dgAssemblies.SelectedRows[0].DataBoundItem; if (data != null && (data.InitialComponentType == null || data.InitialComponentType == e.Item.ComponentType)) { data.Name = e.Item.Name; data.MetaData = e.Item; dgAssemblies.SelectedRows[0].Cells[2].ErrorText = null; dgAssemblies.Refresh(); } } }
/// <summary> /// Handles the ModelSelected event of the repositoryTree control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="DSLFactory.Candle.SystemModel.Repository.Forms.ModelSelectedEventArgs"/> instance containing the event data.</param> private void repositoryTree_ModelSelected(object sender, ModelSelectedEventArgs e) { btnSelect.Enabled = e.Item != null; }