public SelectFieldStrategy(TypeViewModel document, string typeName, string columnName, int row) { this.document = document; this.columnName = columnName; this.row = row; this.document.SelectedColumn = this.columnName; this.document.SelectedItemIndex = this.row; this.document.PropertyChanged += Document_PropertyChanged; }
public void OpenType(Authentication authentication, IType type) { var document = this.Items.OfType <TypeViewModel>().FirstOrDefault(item => item.Target == type); if (document == null) { document = new TypeViewModel(authentication, type); this.compositionService?.SatisfyImportsOnce(document); this.Items.Add(document); } this.ActivateItem(document); }
public void MoveToType(Authentication authentication, IType type, string columnName, int row) { var document = this.Items.OfType <TypeViewModel>().FirstOrDefault(item => item.Target == type); if (document == null) { document = new TypeViewModel(authentication, type); this.compositionService?.SatisfyImportsOnce(document); this.Items.Add(document); } this.ActivateItem(document); new SelectFieldStrategy(document, document.Source.TypeName, columnName, row); }