Example #1
0
 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;
 }
Example #2
0
        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);
        }
Example #3
0
        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);
        }