public ucSubModelNotFound(LinkSubTree subTree) { InitializeComponent(); this.subTree = subTree; missingFileToolTip = new ToolTip(); missingDirectoryToolTip = new ToolTip(); openFileDialog = new OpenFileDialog(); missingFileNameLabel.Text = Path.GetFileName(this.subTree.Link); missingDirectoryLabel.Text = string.Concat((Path.GetDirectoryName(this.subTree.Link).Take(this.Size.Width - missingDirectoryLabel.Left - 10))); missingFileToolTip.SetToolTip(missingFileNameLabel, this.subTree.Link); missingDirectoryToolTip.SetToolTip(missingDirectoryLabel, this.subTree.Link); }
protected IPersistence getSubModel(int index) { IDomainObjectImpl domainObject = SubModels.Keys.ElementAt(index) as IDomainObjectImpl; IPersistence persistence = Persistence.Clone(SubModels[domainObject]); if (persistence == null && LinkSubtreeError != null) { LinkSubTree subTree = new LinkSubTree(SubModels[domainObject]); LinkSubtreeError.Invoke(subTree); if (subTree.Action == LinkSubTree.eLinkAction.Update) { domainObject.FullModelName = subTree.Link; SubModels[domainObject] = subTree.Link; return(getSubModel(index)); } } return(persistence); }
private void LinkSubtreeError(LinkSubTree subTree) { // Open SubModel error IApplicationInterface.GetFloatingForm(eFloatReason.NotSet, new ucSubModelNotFound(subTree)) .ShowDialog(); }