/// <summary> /// Reconfigures this UI (can be called multiple times throughout controls lifetime) to facilitate the population of DemandsInitialization /// properties on an underlying type (e.g. if your collection is ProcessTask and your argument type is ProcessTaskArgument then your underlying type could /// be AnySeparatorFileAttacher or MDFAttacher). Note that while T is IArgumentHost, it also should be tied to one or more interfaces (e.g. IAttacher) and able to host /// any child of that interface of which argumentsAreForUnderlyingType is the currently configured concrete class (e.g. AnySeparatorFileAttacher). /// </summary> /// <param name="parent"></param> /// <param name="argumentsAreForUnderlyingType"></param> /// <param name="catalogueRepository"></param> public void Setup(IArgumentHost parent, Type argumentsAreForUnderlyingType, ICatalogueRepository catalogueRepository) { _parent = parent; _argumentsAreFor = argumentsAreForUnderlyingType; lblTypeUnloadable.Visible = _argumentsAreFor == null; _valueUisFactory = new ArgumentValueUIFactory(); if (_argumentsAreFor != null) { lblClassName.Text = _argumentsAreFor.FullName; } helpIcon1.Left = lblClassName.Right; if (_argumentsAreFor != null) { btnViewSourceCode.Enabled = ViewSourceCodeDialog.GetSourceForFile(_argumentsAreFor.Name + ".cs") != null; btnViewSourceCode.Left = helpIcon1.Right; var summary = catalogueRepository.CommentStore.GetTypeDocumentationIfExists(argumentsAreForUnderlyingType); if (summary != null) { helpIcon1.SetHelpText(_argumentsAreFor.Name, summary); } RefreshArgumentList(); } }
private void tlvLocations_ItemActivate(object sender, EventArgs e) { var model = tlvLocations.SelectedObject as StackFramesTree; if (model != null) { if (model.HasSourceCode) { var dialog = new Rdmp.UI.SimpleDialogs.ViewSourceCodeDialog(model.Filename, model.LineNumber, Color.GreenYellow); dialog.Show(); } } }