public void SaveDataInfo(CommonPanel panel) { if (!isInitDone) { return; } // determine panel is in which board (element or story) List <Label> labels = panel.GetLabels(); //if (labels.Count == 0) // return; // save val DataType type = panel.GetBoard() is ElementBoard ? DataType.Element : DataType.Story; // get all text of label of panel List <string> vars = new List <string>(); for (int i = 0; i < labels.Count; i++) { Label label = labels[i]; string var = ""; // element of Element Board if (type == DataType.Element) { if (label is LinkLabel) { // store the connection //AddLinkingVal(labelText, key); var = "#" + label.GetText() + "#"; } else { var = label.GetText(); } } // element of Story Board else { if (label is LinkLabel) { // store the connection //AddLinkingVal(labelText, key); var = "#" + label.GetText() + "#"; } else { var = label.GetText(); } } vars.Add(var); } // get key of panel string key = panel.GetTitle(); if (IsContainDataInfo(type, key)) { AddDataInfo(type, key, vars); } else { ReplaceDataInfo(type, key, vars); } // save index data SaveIndexData(panel); }