Example #1
0
        public RunSheet(ListItems item)
        {
            InitializeComponent();

            runSheetItem = item;

            StackLayout main = new StackLayout();

            Label title1 = new Label
            {
                FontSize  = 15,
                Text      = item.Name,
                TextColor = Color.White
            };

            Label title2 = new Label
            {
                FontSize  = 10,
                Text      = Ultis.Settings.SubTitle,
                TextColor = Color.White
            };

            main.Children.Add(title1);
            main.Children.Add(title2);

            NavigationPage.SetTitleView(this, main);

            PageContent();

            downloadRunSheet(DateTime.Now.ToString("yyyy MM dd"));

            SelectedItem = Children[1];
        }
Example #2
0
        void RefreshList()
        {
            var selectedItems = ListItems.Where(x => x.Selected).Select(x => x.Expression).ToList();

            ListItems.Clear();

            if (Revit.ActiveDBDocument != null)
            {
                foreach (var group in Revit.ActiveDBDocument.Settings.Categories.Cast <Autodesk.Revit.DB.Category>().GroupBy((x) => x.CategoryType).OrderBy((x) => x.Key))
                {
                    foreach (var category in group.OrderBy((x) => x.Name))
                    {
                        var item = new GH_ValueListItem(category.Name, category.Id.IntegerValue.ToString());
                        item.Selected = selectedItems.Contains(item.Expression);
                        ListItems.Add(item);
                    }
                }

                // Preselect OST_GenericModel category by default
                if (selectedItems.Count == 0 && ListMode != GH_ValueListMode.CheckList)
                {
                    foreach (var item in ListItems)
                    {
                        item.Selected = item.Expression == ((int)BuiltInCategory.OST_GenericModel).ToString();
                    }
                }
            }
        }
Example #3
0
 private void GetAgencias()
 {
     try
     {
         //cAgencia agenciasControlador = new cAgencia();
         //ListItems = new ObservableCollection<AGENCIA>(agenciasControlador.ObtenerTodos());
         //if (ListItems.Count > 0)
         //    EmptyVisible = false;
         //else
         //    EmptyVisible = true;
         cAgencia agencias = new cAgencia();
         ListItems.Clear();
         ListItems = agencias.ObtenerTodos().ToList();
         if (ListItems.Count > 0)
         {
             EmptyVisible = false;
         }
         else
         {
             EmptyVisible = true;
         }
     }
     catch (Exception ex)
     {
         StaticSourcesViewModel.ShowMessageError("Algo pasó...", "Ocurrió un error al obtener agencias.", ex);
     }
 }
Example #4
0
        /// <summary>
        ///		Crea un nuevo elemento
        /// </summary>
        protected override bool NewItem()
        {
            FilesModelCollection files = new FilesModelCollection(Project);
            bool isUpdated             = false;

            // Obtiene los archivos de la lista
            foreach (PageListItemViewModel item in ListItems)
            {
                files.Add(item.File);
            }
            // Abre la ventana de selección de documentos
            if (DocWriterViewModel.Instance.ViewsController.SelectFilesProject
                    (Project, FileModel.DocumentType.Document,
                    files, out FilesModelCollection filesSelected) == SystemControllerEnums.ResultType.Yes)
            {
                // Limpia la lista
                ListItems.Clear();
                // Añade los elementos
                foreach (FileModel file in filesSelected)
                {
                    ListItems.Add(new PageListItemViewModel(file));
                }
                // Indica que ha habido modificaciones
                isUpdated = true;
            }
            // Devuelve el valor que indica si se ha dado alguno de alta
            return(isUpdated);
        }
Example #5
0
        public LayerFunction_ValueList()
        {
            Category    = "Revit";
            SubCategory = "Input";
            Name        = "Layer Function";
            NickName    = "LF";
            Description = "Picker for layer function of a wall compound structure layer";

            ListItems.Clear();
            ListItems.Add(
                new GH_ValueListItem("Structure", ((int)DB.MaterialFunctionAssignment.Structure).ToString())
                );
            ListItems.Add(
                new GH_ValueListItem("Substrate", ((int)DB.MaterialFunctionAssignment.Substrate).ToString())
                );
            ListItems.Add(
                new GH_ValueListItem("Insulation", ((int)DB.MaterialFunctionAssignment.Insulation).ToString())
                );
            ListItems.Add(
                new GH_ValueListItem("Finish 1", ((int)DB.MaterialFunctionAssignment.Finish1).ToString())
                );
            ListItems.Add(
                new GH_ValueListItem("Finish 2", ((int)DB.MaterialFunctionAssignment.Finish2).ToString())
                );
            ListItems.Add(
                new GH_ValueListItem("Membrane", ((int)DB.MaterialFunctionAssignment.Membrane).ToString())
                );
            ListItems.Add(
                new GH_ValueListItem("StructuralDeck", ((int)DB.MaterialFunctionAssignment.StructuralDeck).ToString())
                );
        }
Example #6
0
        /// <summary>
        /// Code ajouté lors de la création d'un item
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ListItems_ItemToCreate(object sender, EventArgs e)
        {
            VO_Item vNewItem = _Service.CreateItem();

            ListItems.AddItem(vNewItem.Id, vNewItem.Title);
            LoadItem(vNewItem.Id);
        }
Example #7
0
        private readonly bool _sortBySortOrder; // default by Title, set to true to use SortORder

        public LocalList(string listTitle, Func <ISharePointListItem, bool> predicate, bool sortBySortOrder = false)
        {
            _logger.Log("Initialise local list: " + listTitle, Type.Information);

            _predicate       = predicate;
            _sortBySortOrder = sortBySortOrder;
            Title            = listTitle;

            var listLoader = new ListLoader();
            var listItems  = new ListItems();

            _spListItems = new List <ISharePointListItem>();

            try
            {
                listItems = listLoader.GetItems(listTitle);
                _logger.Log($"Loaded {listItems.Count} list items for list {listTitle}", Type.Information);

                _spListItems = listItems
                               .Select(x => new LocalListItem(x))
                               .Cast <ISharePointListItem>().ToList();
            }
            catch (Exception ex)
            {
                _logger.Log(string.Format("List not loaded {0}, does the list exists and has items? Message: {1}", listTitle, ex.Message), Type.Warning);
            }
        }
Example #8
0
        // Код для выполнения при активации приложения (переводится в основной режим)
        // Этот код не будет выполняться при первом запуске приложения
        private void Application_Activated(object sender, ActivatedEventArgs e)
        {
            ListItems.Load();
            if (e.IsApplicationInstancePreserved)
            {
                return;
            }

            IsolatedStorageSettings iss = IsolatedStorageSettings.ApplicationSettings;

            if (PhoneApplicationService.Current.State.ContainsKey("Settings"))
            {
                Settings = PhoneApplicationService.Current.State["Settings"] as SettingsData;
            }
            else
            {
                if (!iss.TryGetValue("Settings", out settingsData))
                {
                    Settings = new SettingsData();
                }
            }

            Mogade = MogadeHelper.CreateInstance();
#if !DEBUG
            Mogade.LogApplicationStart();
#endif
        }
Example #9
0
        public DirectShapeCategories()
        {
            Category    = "Revit";
            SubCategory = "Build";
            Name        = "DirectShape.Categories";
            NickName    = "Categories";
            Description = "Provides a picker of a valid DirectShape category";

            ListItems.Clear();

            var ActiveDBDocument = Revit.ActiveDBDocument;

            if (ActiveDBDocument == null)
            {
                return;
            }

            var genericModel = Autodesk.Revit.DB.Category.GetCategory(ActiveDBDocument, BuiltInCategory.OST_GenericModel);

            var directShapeCategories = ActiveDBDocument.Settings.Categories.Cast <Autodesk.Revit.DB.Category>().Where((x) => DirectShape.IsValidCategoryId(x.Id, ActiveDBDocument));

            foreach (var group in directShapeCategories.GroupBy((x) => x.CategoryType).OrderBy((x) => x.Key))
            {
                foreach (var category in group.OrderBy(x => x.Name))
                {
                    ListItems.Add(new GH_ValueListItem(category.Name, category.Id.IntegerValue.ToString()));
                    if (category.Id.IntegerValue == (int)BuiltInCategory.OST_GenericModel)
                    {
                        SelectItem(ListItems.Count - 1);
                    }
                }
            }
        }
 private void TodoItem_KeyDown(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
 {
     if (e.Key == Windows.System.VirtualKey.Enter)
     {
         ListItems.Focus(FocusState.Programmatic);
     }
 }
Example #11
0
        public override void PostProcessData()
        {
            base.PostProcessData();

            if (SourceCount == 0)
            {
                RefreshList(NickName);
            }
            else
            {
                RefreshList(VolatileData.AllData(true));
            }

            // Show elements sorted
            ListItems.Sort((x, y) => string.CompareOrdinal(x.Name, y.Name));

            //base.CollectVolatileData_Custom();
            m_data.Clear();

            var path = new GH_Path(0);

            if (SelectedItems.Count == 0)
            {
                m_data.AppendRange(new IGH_Goo[0], path);
            }
            else
            {
                foreach (var item in SelectedItems)
                {
                    m_data.Append(item.Value, path);
                }
            }
        }
Example #12
0
        private async Task CreateListItems()
        {
            try
            {
                var source  = new CancellationTokenSource();
                var results = await UserDialogs.Instance.LoadingDelayedAsync(_userHub.GetResults(_user.Id), source);

                if (results == null)
                {
                    return;
                }

                foreach (var e in Enum.GetValues(typeof(EvaluationItem)))
                {
                    var score = results.SingleOrDefault(x => x.EvaluationItem == (Data.EvaluationItem)e).Score;
                    var item  = new ListItemViewModel
                    {
                        Text       = e.ToString(),
                        DetailText = (score == null) ? "評価結果はありません" : $"{((double)score).ToString("0.0")} 点",
                        Image      = $"evaluation_{e.ToString().ToLower()}",
                        Selectable = false,
                    };
                    ListItems.Add(item);
                }
            }
            catch (AggregateException) { return; }
            catch (TaskCanceledException) { return; }
        }
Example #13
0
 public override void OnOpening()
 {
     content = new ListItems();
     content.Add(new SingleItem
     {
         Label = "First Item"
         ,
         SuperTip = "The First Item"
         ,
         Image = ResizeImage.Resize(Properties.Resources.one, 16, 16)
     });
     content.Add(new SingleItem
     {
         Label = "Second Item"
         ,
         SuperTip = "The Second Item"
         ,
         Image = ResizeImage.Resize(Properties.Resources.two, 16, 16)
     });
     content.Add(new SingleItem
     {
         Label = "Third Item"
         ,
         SuperTip = "The Third Item"
         ,
         Image = ResizeImage.Resize(Properties.Resources.three, 16, 16)
     });
 }
Example #14
0
        public void Test_add_items_in_plopi_game()
        {
            IFormatter formatter = new BinaryFormatter();
            MapWorld   w;

            using (Stream stream = new FileStream("../../../Ressources/NewWorld.bin", FileMode.Open, FileAccess.Read, FileShare.Read))
            {
                w = (MapWorld)formatter.Deserialize(stream);
            }

            for (int i = 0; i < 38; i++)
            {
                Item item = new Item("Plop" + i, 2, 100, "testdefolie", "typetest");
                w.Team.Invent.AddItem(item, 1);
            }

            ListItems l = new ListItems();

            w.Team.Invent.AddItem(l.Items[0], 1);

            Assert.IsNotEmpty(w.Team.Invent.Inventory);

            Character MainC1 = new Character("Plopi", "dwarf", true);

            MainC1.IsMain = true;
            w.Team.AddMembers(MainC1);
            w.Save(1);
        }
        public WallLocationLine_ValueList()
        {
            Category    = "Revit";
            SubCategory = "Input";
            Name        = "Wall Location Line";
            NickName    = "WLL";
            Description = "Picker for builtin Wall location line options";

            ListItems.Clear();
            ListItems.Add(
                new GH_ValueListItem("Wall Centerline", ((int)DB.WallLocationLine.WallCenterline).ToString())
                );
            ListItems.Add(
                new GH_ValueListItem("Core Centerline", ((int)DB.WallLocationLine.CoreCenterline).ToString())
                );
            ListItems.Add(
                new GH_ValueListItem("Finish (Exterior Face)", ((int)DB.WallLocationLine.FinishFaceExterior).ToString())
                );
            ListItems.Add(
                new GH_ValueListItem("Finish (Interior Face)", ((int)DB.WallLocationLine.FinishFaceInterior).ToString())
                );
            ListItems.Add(
                new GH_ValueListItem("Core (Exterior Face)", ((int)DB.WallLocationLine.CoreExterior).ToString())
                );
            ListItems.Add(
                new GH_ValueListItem("Core (Interior Face)", ((int)DB.WallLocationLine.CoreInterior).ToString())
                );
        }
Example #16
0
        void RefreshList()
        {
            var selectedItems = new List <string>();

            {
                foreach (var item in ListItems)
                {
                    if (item.Selected)
                    {
                        selectedItems.Add(item.Expression);
                    }
                }
            }

            ListItems.Clear();

            if (Revit.ActiveDBDocument != null)
            {
                using (var collector = new FilteredElementCollector(Revit.ActiveDBDocument))
                {
                    foreach (var level in collector.OfClass(typeof(Level)).ToElements().Cast <Level>().OrderByDescending((x) => x.Elevation))
                    {
                        var item = new GH_ValueListItem(level.Name, level.Id.IntegerValue.ToString());
                        item.Selected = selectedItems.Contains(item.Expression);
                        ListItems.Add(item);
                    }
                }
            }
        }
        protected override void CollectVolatileData_Custom()
        {
            var selectedItems = ListItems.Where(x => x.Selected).Select(x => x.Expression).ToList();

            ListItems.Clear();

            if (Revit.ActiveDBDocument is object)
            {
                foreach (var group in Revit.ActiveDBDocument.Settings.Categories.Cast <DB.Category>().GroupBy(x => x.CategoryType).OrderBy(x => x.Key))
                {
                    foreach (var category in group.OrderBy(x => x.Name).Where(x => CategoryIsInSet(x)))
                    {
                        if (category.CategoryType == DB.CategoryType.Invalid)
                        {
                            continue;
                        }

                        var item = new GH_ValueListItem(category.Name, category.Id.IntegerValue.ToString());
                        item.Selected = selectedItems.Contains(item.Expression);
                        ListItems.Add(item);
                    }
                }

                if (selectedItems.Count == 0 && ListMode != GH_ValueListMode.CheckList)
                {
                    foreach (var item in ListItems)
                    {
                        item.Selected = item.Expression == ((int)DefaultBuiltInCategory).ToString();
                    }
                }
            }

            base.CollectVolatileData_Custom();
        }
Example #18
0
        public WallFunction_ValueList()
        {
            Category    = "Revit";
            SubCategory = "Input";
            Name        = "Wall Function";
            NickName    = "WF";
            Description = "Picker for builtin predefined Wall functions";

            ListItems.Clear();
            ListItems.Add(
                new GH_ValueListItem("Interior", ((int)DB.WallFunction.Interior).ToString())
                );
            ListItems.Add(
                new GH_ValueListItem("Exterior", ((int)DB.WallFunction.Exterior).ToString())
                );
            ListItems.Add(
                new GH_ValueListItem("Foundation", ((int)DB.WallFunction.Foundation).ToString())
                );
            ListItems.Add(
                new GH_ValueListItem("Retaining", ((int)DB.WallFunction.Retaining).ToString())
                );
            ListItems.Add(
                new GH_ValueListItem("Soffit", ((int)DB.WallFunction.Soffit).ToString())
                );
            ListItems.Add(
                new GH_ValueListItem("Core-Shaft", ((int)DB.WallFunction.Coreshaft).ToString())
                );
        }
Example #19
0
 public void Dispose()
 {
     foreach (var item in ListItems.ToList())
     {
         item.Dispose();
     }
 }
Example #20
0
        public async Task <string> Matchpeople(string accessToken, SharePointSite spSite, SharePointList spList)
        {
            // Get all items
            string    endpoint       = "https://graph.microsoft.com/v1.0/sites/" + spSite.id + "/lists/" + spList.Id + "/items/";
            string    queryParameter = "?expand=fields";
            ListItems ListItems      = null;

            using (var client = new HttpClient())
            {
                using (var request = new HttpRequestMessage(HttpMethod.Get, endpoint + queryParameter))
                {
                    request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
                    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", accessToken);

                    // This header has been added to identify our sample in the Microsoft Graph service. If extracting this code for your project please remove.
                    request.Headers.Add("SampleID", "aspnet-connect-rest-sample");

                    using (var response = await client.SendAsync(request))
                    {
                        if (response.IsSuccessStatusCode)
                        {
                            string stringResult = await response.Content.ReadAsStringAsync();

                            ListItems = JsonConvert.DeserializeObject <ListItems>(stringResult);
                        }
                    }

                    //return await SetupDateWithoutMySkill(accessToken, ListItems.Items);
                    //return await SetupDateWithMySkill(accessToken, ListItems.Items);
                    return(await SetupDateAnyone(accessToken, ListItems.Items));
                }
            }
        }
Example #21
0
 public void AddImages(IEnumerable <string> urls)
 {
     ListItems.AddRange(urls.Select(i => new GalleryImageViewModel(_imageManager)
     {
         ImageUrl = i
     }));
 }
Example #22
0
        public IEnumerable <Item> Send(ListItems request)
        {
            var task = SendAsync(request);

            RaiseExceptionOnFault(task);
            return(task.Result);
        }
Example #23
0
        internal override void Draw(int indexOffset)
        {
            if (ItemsCount < 1)
            {
                // Add a dummy item to prevent the other while loops from freezing the game.
                ListItems.Add("N/A");
            }

            while (ListIndex < 0)
            {
                ListIndex += ItemsCount;
            }

            while (ListIndex >= ItemsCount)
            {
                ListIndex -= ItemsCount;
            }

            if (HideArrowsWhenNotSelected && !Selected)
            {
                Label = GetCurrentSelection() ?? "~r~N/A";
            }
            else
            {
                Label = $"~s~← {GetCurrentSelection() ?? "~r~N/A~s~"} ~s~→";
            }

            base.Draw(indexOffset);
        }
Example #24
0
        public void LogSettingsNames()
        {
            logList = new List <string>();


            Application fi = Application.Attach(Process.GetProcessesByName("WSF").FirstOrDefault());
            //Log($"Program found {fi.Name}");
            List <Window> fiWindows = fi.GetWindows();

            mainWindow = fiWindows.FirstOrDefault(w => w.Title.StartsWith("Foss Integrator"));
            //Log($"Window '{mainWindow.Title}' is found.");

            List <Window> modals = mainWindow.ModalWindows();

            foreach (var window in modals)
            {
                //Log($"Modal window with title: {window.Title} found.");
            }

            Window settingsWindow = modals.Find(w => w.Title.Equals("Settings"));

            ListBox settingsList = settingsWindow.Get <ListBox>(SearchCriteria.ByAutomationId("59649"));
            //Log("Settings view list found, items:");
            ListItems settingsItems = settingsList.Items;

            foreach (var settingsItem in settingsItems)
            {
                // Log(settingsItem.Text);
            }
        }
Example #25
0
 /// <summary>
 /// Initializes a new instance of InputList with a NameValueCollection allowing quick collection initializer.
 /// </summary>
 /// <param name="values">The NameValueCollection containing display texts and valid values.</param>
 /// <param name="required">Whether this field is required.</param>
 public InputList(NameValueCollection values, bool required = true)
 {
     Required = required;
     foreach (var key in values.AllKeys)
     {
         ListItems.Add(new SelectListItem(values[key], key));
     }
 }
Example #26
0
 /// <summary>
 /// Initializes a new instance of InputList with specified list of items that will be used for both the value and text.
 /// </summary>
 /// <param name="values">A list of string values reprenting valid values.</param>
 /// <param name="required">Whether this field is required.</param>
 public InputList(IEnumerable <string> values, bool required = true)
 {
     Required = required;
     foreach (var item in values)
     {
         ListItems.Add(new SelectListItem(item, item));
     }
 }
        /// <summary>
        /// Code ajouté lors de la création d'une action
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ListItems_ItemToCreate(object sender, EventArgs e)
        {
            VO_Item newItem = _Service.CreateItem();

            newItem.Title = GlobalConstants.ITEM_NEW_ITEM;
            ListItems.AddItem(newItem.Id, newItem.Title);
            LoadItem(newItem.Id);
        }
Example #28
0
 private void TextSelection_OnMouseDown(object sender, MouseButtonEventArgs e)
 {
     if (!PopupMenu.IsOpen)
     {
         PopupMenu.IsOpen = true;
         ListItems.Focus();
     }
 }
        public LGCParcelPopUp(ListItems item)
        {
            InitializeComponent();

            parcelSummary.Text = item.Summary;

            orderNo = item.Id;
        }
Example #30
0
 public List <KeyValueItem> Add(params KeyValueItem[] items)
 {
     foreach (var item in items)
     {
         ListItems.Add(item);
     }
     return(ListItems);
 }
Example #31
0
        public object GetInstance(DefContext defContext)
        {
            if (defContext == null) return null;

            var type = defContext.GetTypeOfObj();
            if (type.IsTypeOf<SimpleDefContext>())
                return defContext.CastObj<SimpleDefContext>()
                    .SimpleTypeDef.Value;

            if (type.IsTypeOf<ComplexDefContext>())
            {
                var context = defContext.CastObj<ComplexDefContext>();
                var complexTypeDefs = context.ComplexTypeDefs;
                var typeInfos = context.TypeInfos;

                var typeInfosWithId = new Dictionary<int, TypeInfo>();
                foreach (var typeInfo in typeInfos)
                    typeInfosWithId.Add(typeInfo.Id, typeInfo);

                var instances = new Dictionary<int, object>();
                short indexesAsIds = 0;

                #region Get Instances

                foreach (var complexTypeDef in complexTypeDefs)
                {
                    var typeInfo = typeInfosWithId[complexTypeDef.TypeInfoId];
                    var currentType = Type.GetType(typeInfo.TypeName);
                    if (currentType == null)
                        throw new Exception(string.Format("Unknown type : {0}", typeInfo.TypeName));

                    if (currentType.IsImplOf<Array>())
                    {
                        var arrayDef = complexTypeDef.CastObj<ArrayDef>();
                        instances.Add(indexesAsIds, _complexTypeHelper.CreateInstance(currentType, arrayDef.Indicies));
                    }
                    else
                        instances.Add(indexesAsIds, _complexTypeHelper.CreateInstance(currentType));
                    indexesAsIds++;
                }

                #endregion

                #region Relate Instances

                foreach (var complexTypeDef in complexTypeDefs)
                {
                    var instance = instances[complexTypeDef.Id];
                    var instanceType = instance.GetTypeOfObj();

                    if (instanceType.IsImplOf<Array>())
                    {
                        #region Array

                        var arrayDef = complexTypeDef.CastObj<ArrayDef>();
                        var items = new SimpleList<object>();
                        foreach (var defValue in arrayDef.Items)
                            items.Add(CheckInstance(defValue, instances));
                        var arrayItems = new ArrayItems { Items = items };
                        _complexTypeHelper.SetItems(instance, arrayItems);

                        #endregion
                    }
                    else if (instanceType.IsImplOf<IList>())
                    {
                        #region List

                        var listDef = complexTypeDef.CastObj<ListDef>();
                        var items = new SimpleList<object>();
                        foreach (var defValue in listDef.Items)
                            items.Add(CheckInstance(defValue, instances));
                        var listItems = new ListItems { Items = items };
                        _complexTypeHelper.SetItems(instance, listItems);

                        #endregion
                    }
                    else if (instanceType.IsImplOf<IDictionary>())
                    {
                        #region Dictionary

                        var dictionaryDef = complexTypeDef.CastObj<DictionaryDef>();
                        var keys = new SimpleList<object>();
                        foreach (var defValue in dictionaryDef.Keys)
                            keys.Add(CheckInstance(defValue, instances));

                        var values = new SimpleList<object>();
                        foreach (var defValue in dictionaryDef.Values)
                            values.Add(CheckInstance(defValue, instances));

                        var dictionaryItems = new DictionaryItems { Keys = keys, Values = values };
                        _complexTypeHelper.SetItems(instance, dictionaryItems);

                        #endregion
                    }
                    else // user defined tpye at last
                    {
                        #region UserDefined

                        var userDefinedDef = complexTypeDef.CastObj<UserDefinedDef>();
                        var typeInfo = typeInfosWithId[userDefinedDef.TypeInfoId];
                        var names = new SimpleList<string>();
                        foreach (var index in userDefinedDef.Names)
                            names.Add(typeInfo.PropertyIndexName[index]);

                        var values = new SimpleList<object>();
                        foreach (var defValue in userDefinedDef.Values)
                            values.Add(CheckInstance(defValue, instances));

                        var userDefinedItems = new UserDefinedItems { Names = names, Values = values };
                        _complexTypeHelper.SetItems(instance, userDefinedItems);

                        #endregion
                    }
                }

                #endregion

                return instances[complexTypeDefs.SelectFirst().Id];
            }
            throw new UnknownImplementationException(typeof(DefContext), type);
        }