Changed even out file synch is possible
This commit is contained in:
@ -41,6 +41,7 @@ namespace CobXmlSupport
|
||||
{
|
||||
bSynch = value;
|
||||
btnSynch.Visible = bSynch;
|
||||
btnSynchOut.Visible = bSynch;
|
||||
}
|
||||
}
|
||||
|
||||
@ -91,13 +92,11 @@ namespace CobXmlSupport
|
||||
|
||||
private void btnSynch_Click(object sender, EventArgs e)
|
||||
{
|
||||
Dictionary<string, string> wrkDic = null;
|
||||
codeCompleter Cc = new codeCompleter(parentWindow.CmbLastFile.Text);
|
||||
string fieldCompl = "";
|
||||
this.CodeShower.Text = " InPath = " + Cc.PathId + "\r\n InFile = " + Cc.FileId + "\r\n codeFile = " + Cc.CcFileInId + "\r\n codePath = " + Cc.PathId+Cc.CcFileInId + "\r\n -------------- \r\n" + this.CodeShower.Text;
|
||||
Cc.TryFill_In_Dic();
|
||||
|
||||
// wrkDic = new Dictionary<string, string>();
|
||||
foreach (CobRow cr in parentWindow.RowList)
|
||||
{
|
||||
if (!cr.isAttribute && !cr.SampleStr.Equals(parentWindow.NOMOVE))
|
||||
@ -116,7 +115,7 @@ namespace CobXmlSupport
|
||||
|
||||
Cc.Save_In_Dic();
|
||||
|
||||
refreshWindow();
|
||||
refreshWindow("IN");
|
||||
|
||||
this.CodeShower.Text = " InPath = " + Cc.PathId + "\r\n InFile = " + Cc.FileId + "\r\n codeFile = " + Cc.CcFileInId + "\r\n codePath = " + Cc.PathId + Cc.CcFileInId + "\r\n -------------- \r\n" + this.CodeShower.Text;
|
||||
|
||||
@ -251,7 +250,7 @@ namespace CobXmlSupport
|
||||
}
|
||||
|
||||
|
||||
private void refreshWindow()
|
||||
private void refreshWindow(string inOut)
|
||||
{
|
||||
this.CodeShower.Text = "";
|
||||
foreach (CobRow cr in parentWindow.RowList)
|
||||
@ -267,20 +266,67 @@ namespace CobXmlSupport
|
||||
{
|
||||
if (this.CodeShower.Text == "") { }
|
||||
else this.CodeShower.Text += "\r\n";
|
||||
if (cr.MoveCode == null)
|
||||
if (inOut == "IN")
|
||||
{
|
||||
this.CodeShower.Text += "".PadRight(30) + " " + cr.FieldName.PadRight(30);
|
||||
if (cr.MoveCode == null)
|
||||
{
|
||||
this.CodeShower.Text += "".PadRight(30) + " " + cr.FieldName.PadRight(30);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
this.CodeShower.Text += cr.MoveCode.PadRight(30) + " " + cr.FieldName.PadRight(30);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.CodeShower.Text += cr.MoveCode.PadRight(30) + " " + cr.FieldName.PadRight(30);
|
||||
if (cr.MoveFromCode == null)
|
||||
{
|
||||
this.CodeShower.Text += "".PadRight(30) + " " + cr.FieldName.PadRight(30);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
this.CodeShower.Text += cr.MoveFromCode.PadRight(30) + " " + cr.FieldName.PadRight(30);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void btnSynchOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
codeCompleter Cc = new codeCompleter(parentWindow.CmbLastFile.Text);
|
||||
string fieldCompl = "";
|
||||
this.CodeShower.Text = " InPath = " + Cc.PathId + "\r\n InFile = " + Cc.FileId + "\r\n codeFile = " + Cc.CcFileOutId + "\r\n codePath = " + Cc.PathId + Cc.CcFileOutId + "\r\n -------------- \r\n" + this.CodeShower.Text;
|
||||
Cc.TryFill_Out_Dic();
|
||||
|
||||
// wrkDic = new Dictionary<string, string>();
|
||||
foreach (CobRow cr in parentWindow.RowList)
|
||||
{
|
||||
if (!cr.isAttribute && !cr.SampleStr.Equals(parentWindow.NOMOVE))
|
||||
{
|
||||
if (Cc.WorkDicOut != null && Cc.WorkDicOut.Count > 0)
|
||||
{
|
||||
if (Cc.WorkDicOut.TryGetValue(cr.FieldName, out fieldCompl))
|
||||
{
|
||||
cr.MoveFromCode = fieldCompl;
|
||||
}
|
||||
}
|
||||
if (cr.MoveFromCode == null) { cr.MoveFromCode = " "; }
|
||||
Cc.WorkDicOut[cr.FieldName] = cr.MoveFromCode;
|
||||
}
|
||||
}
|
||||
|
||||
Cc.Save_Out_Dic();
|
||||
|
||||
refreshWindow("OUT");
|
||||
|
||||
this.CodeShower.Text = " InPath = " + Cc.PathId + "\r\n InFile = " + Cc.FileId + "\r\n codeFile = " + Cc.CcFileOutId + "\r\n codePath = " + Cc.PathId + Cc.CcFileOutId + "\r\n -------------- \r\n" + this.CodeShower.Text;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user