private void btnLoadForest_Click(object sender, EventArgs e) { var path = GetFilePath(); if (string.IsNullOrEmpty(path)) { return; } try { forest = ForestGenerator.ReadForestFromFile(path, "^", ','); } catch (Exception ex) { MessageBox.Show(ex.Message); return; } foreach (var tree in forest) { PreorderIndexBuilder.BuildPreorderIndex(tree); } ShowForest(); }
private void DoWork() { if (isWorking) { throw new InvalidOperationException(); } try { isWorking = true; param = new MiningParams( subtreeType: GetSubtreeType(), mineOrdered: cbOrdered.Checked, mineFrequent: cbMineFrequent.Checked, mineClosed: cbMineClosed.Checked, mineMaximal: cbMineMiximal.Checked, supportType: GetSupportType(), thresholdRoot: Convert.ToInt32(txtRootSupport.Text), thresholdTransaction: Convert.ToInt32(txtTransactionSupport.Text), separator: ',', backTrackSymbol: "^"); if (!param.MineOrdered) { foreach (var tree in forest) { Canonicalizer.Canonicalize(tree); PreorderIndexBuilder.BuildPreorderIndex(tree); } ShowForest(); } var trees = forest.ToList(); var rslt = CCTreeMiner.Mine(trees, param); ShowResults(rslt); } finally { isWorking = false; } }