private async void BtnGenerate_Click(object obj) { IsBtnGenerateEnable = false; IsBtnResolveEnable = false; ForestGrowParameters p = new ForestGrowParameters { ExportDirectoryPath = ExportFolder, ExportToJson = true, ResolutionFeatureName = ResolutionFeatureName, ItemSubsetCountRatio = TrainingSubsetCountRatio, TrainingDataPath = TrainingSet, MaxItemCountInCategory = MaxNumberOfTainingItemsInCategory, TreeCount = NumberOfTrees, SplitMode = SplitMode.GINI }; if (_forest == null) { _forest = ForestFactory.Create(); _forest.TreeBuildComplete += _forest_TreeBuildComplete; _forest.ForestGrowComplete += _forest_ForestGrowComplete; } try { int x = await _forest.GrowAsync(p); //int x = _forest.Grow(p); } catch (Exception ex) { } }