- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
private void MainDataGridCellEditEnding(object sender, DataGridCellEditEndingEventArgs e)
{
if (e.Column == MainDataGrid.Columns[1])
return;
if (CheckComplianceWithIndentation)
if ((NumberOfLeadingSpaces(Rows[e.Row.GetIndex()].OriginalText) != NumberOfLeadingSpaces(Rows[e.Row.GetIndex()].Translation)) && !Rows[e.Row.GetIndex()].Tags.Contains("I"))
Rows[e.Row.GetIndex()].Tags += "I";
else if (NumberOfLeadingSpaces(Rows[e.Row.GetIndex()].OriginalText) == NumberOfLeadingSpaces(Rows[e.Row.GetIndex()].Translation))
Rows[e.Row.GetIndex()].Tags = Rows[e.Row.GetIndex()].Tags.Replace("I", "");
if ((Rows[e.Row.GetIndex()].Translation.Trim() == "") && !Rows[e.Row.GetIndex()].Tags.Contains("N"))
Rows[e.Row.GetIndex()].Tags += "N";
else if (Rows[e.Row.GetIndex()].Translation.Trim() != "")
Rows[e.Row.GetIndex()].Tags = Rows[e.Row.GetIndex()].Tags.Replace("N", "");
//...
}
public void TagsInit()
{
if (CheckComplianceWithIndentation)
foreach (var hRow in Rows.Where(hRow => NumberOfLeadingSpaces(hRow.OriginalText) != NumberOfLeadingSpaces(hRow.Translation)))
{
hRow.Tags += "I";
}
foreach (var row in Rows.Where(hRow => hRow.Translation == ""))
{
row.Tags += "N";
}
}