Precoding data loaded from json files
This commit is contained in:
@ -165,6 +165,11 @@ namespace CobXmlSupport
|
|||||||
|
|
||||||
private void showRows()
|
private void showRows()
|
||||||
{
|
{
|
||||||
|
codeCompleter Cc = new codeCompleter(cmbLastFile.Text);
|
||||||
|
Cc.TryFill_In_Dic();
|
||||||
|
Cc.TryFill_Out_Dic();
|
||||||
|
string fieldInCompl="", fieldOutCompl="";
|
||||||
|
|
||||||
foreach (CobRow rw in rowList)
|
foreach (CobRow rw in rowList)
|
||||||
{
|
{
|
||||||
if (rw.CobLevel == 1)
|
if (rw.CobLevel == 1)
|
||||||
@ -174,6 +179,38 @@ namespace CobXmlSupport
|
|||||||
}
|
}
|
||||||
if (rw.CobLevel > 0)
|
if (rw.CobLevel > 0)
|
||||||
{
|
{
|
||||||
|
// Prefill with possibly filled out code
|
||||||
|
if (!rw.isAttribute && !rw.SampleStr.Equals(NOMOVE))
|
||||||
|
{
|
||||||
|
if (Cc.WorkDicIn != null && Cc.WorkDicIn.Count > 0)
|
||||||
|
{
|
||||||
|
if (Cc.WorkDicIn.TryGetValue(rw.FieldName, out fieldInCompl))
|
||||||
|
{
|
||||||
|
rw.MoveCode = fieldInCompl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Cc.WorkDicIn.Add(rw.FieldName, "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (rw.MoveCode == null) { rw.MoveCode = " "; }
|
||||||
|
Cc.WorkDicIn[rw.FieldName] = rw.MoveCode;
|
||||||
|
|
||||||
|
if (Cc.WorkDicOut != null && Cc.WorkDicOut.Count > 0)
|
||||||
|
{
|
||||||
|
if (Cc.WorkDicOut.TryGetValue(rw.FieldName, out fieldOutCompl))
|
||||||
|
{
|
||||||
|
rw.MoveFromCode = fieldOutCompl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Cc.WorkDicOut.Add(rw.FieldName, "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (rw.MoveFromCode == null) { rw.MoveFromCode = " "; }
|
||||||
|
Cc.WorkDicOut[rw.FieldName] = rw.MoveFromCode;
|
||||||
|
}
|
||||||
|
// Prefill with possibly filled out code
|
||||||
if (chkWrap.Checked)
|
if (chkWrap.Checked)
|
||||||
{
|
{
|
||||||
outCob.Text += "\r\n" + rw.wrapped();
|
outCob.Text += "\r\n" + rw.wrapped();
|
||||||
@ -186,6 +223,8 @@ namespace CobXmlSupport
|
|||||||
//Debug.WriteLine(rw.TagName);
|
//Debug.WriteLine(rw.TagName);
|
||||||
//Debug.WriteLine(rw.Hirarchy);
|
//Debug.WriteLine(rw.Hirarchy);
|
||||||
}
|
}
|
||||||
|
Cc.Save_In_Dic();
|
||||||
|
Cc.Save_Out_Dic();
|
||||||
|
|
||||||
if (rowList.Count > 0)
|
if (rowList.Count > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user