Synch move-fields to cvs-file editable in excell...

This commit is contained in:
2015-01-14 16:13:12 +01:00
parent b935eb08f2
commit bc880ed2ed
6 changed files with 247 additions and 28 deletions

View File

@ -48,9 +48,19 @@ namespace CobXmlSupport
//private string SettingLogSectName;
////-------------------------
private readonly string NOMOVE = "NoMove";
public readonly string NOMOVE = "NoMove";
private readonly bool MOVEFROM = true;
public List<CobRow> RowList
{
get { return rowList; }
}
public System.Windows.Forms.ComboBox CmbLastFile
{
get { return cmbLastFile; }
}
public GenCobCode()
{
InitializeComponent();
@ -670,7 +680,7 @@ namespace CobXmlSupport
btnTestThings.Visible = S.ettingSpecials;
formLoading = false;
// cmbLastFile.Text = cmbLastFile.Items[0].ToString();
// cmbLastFile.Text = cmbLastFile.Items[0].ToString();
if (cmbLastFile.Items.Count > 0)
{
cmbLastFile.Text = cmbLastFile.Items[0].ToString();
@ -841,7 +851,7 @@ namespace CobXmlSupport
/// <param name="typeComm"></param>
/// <param name="Author"></param>
/// <param name="Firm"></param>
private void CreateComment(TextBox outView, string typeComm, string Author, string Firm, string sourceFile = "")
public void CreateComment(TextBox outView, string typeComm, string Author, string Firm, string sourceFile = "")
{
outView.Text = " *----------------------------------------------------------------*";
centeredComment(outView, typeComm.ToUpper());
@ -1342,7 +1352,7 @@ namespace CobXmlSupport
fromMoves.CodeShower.Text += "\r\n IF " + cr.CountIn;
if (occParRows.Length > 0)
{
fromMoves.CodeShower.Text += "( "+ occParRows + " )";
fromMoves.CodeShower.Text += "( " + occParRows + " )";
}
fromMoves.CodeShower.Text += "\r\n > 0";
@ -1852,5 +1862,42 @@ namespace CobXmlSupport
}
}
private void btnCrossref_Click(object sender, EventArgs e)
{
//Create showing window
fromToMoves = new ShowCode();
fromToMoves.Parent = this;
fromToMoves.Labeltext = "Cobol \"CrossRef\" List";
foreach (CobRow cr in rowList)
{
if (cr.CobLevel < 2)
{
string inFile = cmbLastFile.Text.Substring(cmbLastFile.Text.LastIndexOf("\\") + 1);
CreateComment(fromToMoves.CodeShower, "Moves reference (with loop) " + cr.FieldName, S.ettingUserName, S.ettingCompany, inFile);
}
// Header square created
if (!cr.isAttribute && !cr.SampleStr.Equals(NOMOVE))
{
if (fromToMoves.CodeShower.Text == "") { }
else fromToMoves.CodeShower.Text += "\r\n";
if (cr.MoveCode == null)
{
fromToMoves.CodeShower.Text += "".PadRight(30) + " " + cr.FieldName.PadRight(30);
}
else
{
fromToMoves.CodeShower.Text += cr.MoveCode.PadRight(30) + " " + cr.FieldName.PadRight(30);
}
}
}
fromToMoves.Show();
}
}
}