Skip to content

Commit

Permalink
Merge pull request #215 from TomMuehlegger/master
Browse files Browse the repository at this point in the history
Minor fixes
  • Loading branch information
jogibear9988 authored Aug 27, 2024
2 parents 4f7e58f + 7a60c72 commit 8ad300f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -770,9 +770,13 @@ public string ToString(bool useSymbol, bool addSemicolonAfterCommand, bool useDa
}
else
{
par = "\"" + sym.Symbol + "\"." + paras[1];
if (hasBit)
par += "." + paras[2];
if (sym != null)
{
par = "\"" + sym.Symbol + "\"." + paras[1];

if (hasBit)
par += "." + paras[2];
}
}
}
else
Expand Down
8 changes: 5 additions & 3 deletions LibNoDaveConnectionLibrary/Projectfiles/Step7ProjectV5.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1643,6 +1643,7 @@ private SymbolTable _GetSymTabForProject(S7ProgrammFolder myBlockFolder, bool sh
}
}

var dbPath = tmpId2.ToString();
//Look fro Symlist Name
{
var dbfTbl = DBF.ParseDBF.ReadDBF(ProjectFolder + "YDBs" + _DirSeperator + "SYMLISTS.DBF", _ziphelper, _DirSeperator);
Expand All @@ -1653,20 +1654,21 @@ private SymbolTable _GetSymTabForProject(S7ProgrammFolder myBlockFolder, bool sh
if ((int)row["_ID"] == tmpId2)
{
retVal.Name = (string)row["_UName"];
dbPath = (string)row["_DbPath"];
if ((bool)row["DELETED_FLAG"]) retVal.Name = "$$_" + retVal.Name;
break;
}
}
}
}

if (string.IsNullOrEmpty(retVal.Name) && !File.Exists(ProjectFolder + "YDBs" + _DirSeperator + tmpId2.ToString() + _DirSeperator + "SYMLIST.DBF"))
if (string.IsNullOrEmpty(retVal.Name) && !File.Exists(ProjectFolder + "YDBs" + _DirSeperator + dbPath + _DirSeperator + "SYMLIST.DBF"))
return null;

retVal.showDeleted = showDeleted;
if (tmpId2 != 0)
retVal.Folder = ProjectFolder + "YDBs" + _DirSeperator + tmpId2.ToString() + _DirSeperator;
retVal.Folder = ProjectFolder + "YDBs" + _DirSeperator + dbPath + _DirSeperator;

return retVal;
}

Expand Down

0 comments on commit 8ad300f

Please sign in to comment.