При первом сохранении имя, начинающееся на Program, стирается в окне диалога

This commit is contained in:
Mikhalkovich Stanislav 2019-08-03 18:50:21 +03:00
parent 87b0e2ac29
commit df1021cb90

View file

@ -483,7 +483,10 @@ namespace VisualPascalABC
//}
CodeFileDocumentControl bakTab = CurrentCodeFileDocument;
CurrentCodeFileDocument = TbPage;
saveFileDialog1.FileName = Path.GetFileName(CurrentSourceFileName);
var s = Path.GetFileName(CurrentSourceFileName);
if (s.ToLower().StartsWith("program"))
s = "";
saveFileDialog1.FileName = s;
string id = Path.GetDirectoryName(CurrentSourceFileName);
if (id == "")
{