public async Task Initialize() { _variable = await Variable.CreateVariable <Variable>("0", string.Empty, "STEP(1,5)"); _variable1 = await Variable.CreateVariable <Variable>("1", string.Empty, "STEP(1,5)"); _model.Variables.Add(_variable); _model1.Variables.Add(_variable1); _models.Add(_model); _models.Add(_model1); }
public void UpdateModel(List <MDLTEXData> meshData, ItemData item) { disposed = false; disposing = false; mData = meshData; if (item.ItemName.Equals(Strings.Body)) { ModelTitle = "Note: This is not the default model when unequipped."; ModelSubTitle = "For the unequipped model, search for SmallClothes under the Gear category."; } else { ModelTitle = ""; ModelSubTitle = ""; } for (int i = 0; i < meshData.Count; i++) { ModelCollection.Add(setModel(i)); } Vector3 center = ((CustomGM3D)ModelCollection[0]).Geometry.BoundingSphere.Center; Camera.Position = new Media3D.Point3D(center.X, center.Y, center.Z + 2); Camera.LookDirection = new Media3D.Vector3D(0, 0, center.Z - 2); }
public void ShouldSyncItsContainerWithModelParents() { var model_a = new Model ("a"); var model_b = new Model ("b"); var model_container = new Model("container"); var models = new ModelCollection(model_container); models.AddRange(new [] {model_a, model_b}); Assert.That(models.Container, Is.EqualTo(model_container)); Assert.That(models.All(m => m.Parent == model_container)); models.Clear(); Assert.That(model_a.Parent, Is.Null); Assert.That(model_b.Parent, Is.Null); models.Add(model_a); Assert.That(model_a.Parent, Is.EqualTo(model_container)); models.Insert(0, model_b); Assert.That(model_b.Parent, Is.EqualTo(model_container)); models.Remove(model_a); Assert.That(model_a.Parent, Is.Null); }
public PublicModelCollectionSelect(T[] models) { foreach (var model in models) { ModelCollection.Add(model); } }
private void OnAddItem() { var model = new TModel(); PrepearNewItem(model); ModelCollection.Add(model); }
private static void LoadDff() { using (new Timing("Loading DFFs into scene")) using (new MemoryCounter()) { var itemDefinitions = new DefinitionCollection(); var modelCollection = new ModelCollection(); var textureCollection = new TextureCollection(true); foreach (var obj in Selection.objects) { var objPath = AssetDatabase.GetAssetPath(obj); if (objPath.EndsWith(".dff", StringComparison.OrdinalIgnoreCase)) { var dff = new DffFile(objPath); modelCollection.Add(dff); itemDefinitions.Add(new ItemDefinition(dff.FileNameWithoutExtension)); } else if (objPath.EndsWith(".txd", StringComparison.OrdinalIgnoreCase)) { textureCollection.Add(new TxdFile(objPath)); } } using (new Loader(itemDefinitions, modelCollection, textureCollection)) foreach (var definition in itemDefinitions) { definition.GetObject(true); } } }
internal void AddAccount(Account account) { Trace($"Add {account}"); account.Changed += OnAccountChanged; account.SetManager(this); accounts.Add(account); FirePropertyChanged(nameof(Accounts)); }
private void UpdateModelCollect(int nCamID) { ModelCollection.Clear(); foreach (var it in Vision.VisionDataHelper.GetTemplateListForSpecCamera(nCamID, ModelFileHelper.GetWorkDictoryProfileList(new string[] { "shm" }))) { ModelCollection.Add(new ModelItem() { StrName = it.Replace(string.Format("Cam{0}_", nCamID), ""), StrFullName = it }); } }
internal void AddEntry(AccountEntry entry) { if (entry != null) { entries.Add(entry); if (EntryAdded != null) { var task = ExecuteSynchronized(() => EntryAdded(entry)); } } FirePropertyChanged(nameof(Entries)); }
internal void AddPending(Change change) { Trace($"Add pending: {change}"); pendingChanges.Add(change); if (pendingChanges.Count == 1) { FirePropertyChanged(nameof(HasPendingChanges)); } FirePropertyChanged(nameof(PendingChanges)); FirePropertyChanged(nameof(AmountPending)); }
public void UpdateModel(List <MDLTEXData> meshData) { disposed = false; disposing = false; mData = meshData; for (int i = 0; i < meshData.Count; i++) { ModelCollection.Add(setModel(i)); } Vector3 center = ((CustomGM3D)ModelCollection[0]).Geometry.BoundingSphere.Center; Camera.Position = new Media3D.Point3D(center.X, center.Y, center.Z + 2); Camera.LookDirection = new Media3D.Vector3D(0, 0, center.Z - 2); }
public async Task <ModelCollection> ParseModels() { if (_xDoc.Root == null) { throw new NullReferenceException(nameof(_xDoc.Root)); } var models = _xDoc.Root.Elements(_ns + "model"); var modelCollection = new ModelCollection(); foreach (var model in models) { modelCollection.Add(await ParseModel(model)); } return(modelCollection); }
public override void Setup() { base.Setup(); var jsonConetnt = PlayerPrefs.GetString("TODO_LIST_ITEMS"); Debug.Log("jsonConetnt: " + jsonConetnt); TodoItemsViewModels = new ModelCollection <TodoItemViewModel>(); List <TodoItem> todoItems = String.IsNullOrEmpty(jsonConetnt) ? new List <TodoItem>() : JsonConvert.DeserializeObject <List <TodoItem> >(jsonConetnt); todoItems.ForEach(todoItem => { var todoItemViewModel = this.CreateViewModel <TodoItemViewModel>(); todoItemViewModel.Content = todoItem.Content; todoItemViewModel.Finished = todoItem.Finished; TodoItemsViewModels.Add(todoItemViewModel); }); }
private void UpdateModelCollect(int nCamID) { ModelCollection.Clear(); AllModelCollection.Clear(); var FileList = ModelFileHelper.GetWorkDictoryProfileList(new string[] { "shm" }); foreach (var it in FileList) { AllModelCollection.Add(new ModelItem() { StrName = it, StrFullName = it }); } foreach (var it in Vision.VisionDataHelper.GetTemplateListForSpecCamera(nCamID, FileList)) { ModelCollection.Add(new ModelItem() { StrName = it.Replace(string.Format("Cam{0}_", nCamID), ""), StrFullName = it }); } RaisePropertyChanged("ModelCollection"); RaisePropertyChanged("AllModelCollection"); }
public PublicModelCollectionSelect(List <T> models) { models.ForEach(x => ModelCollection.Add(x)); Enumerable.Range(2020, DateTime.Today.Year - 2019).ToList().ForEach(y => CollectionYear.Add(y)); }