Changed to .csv files for saving

This commit is contained in:
2015-01-19 15:24:38 +01:00
parent 5ee839ec72
commit ddca2f7929
3 changed files with 80 additions and 26 deletions

View File

@ -15,11 +15,30 @@ namespace CobXmlSupport
{
public partial class ShowCode : Form
{
public readonly string CSV = ".csv";
string oldTxt;
bool bSynch;
public ShowCode()
{
InitializeComponent();
oldTxt = "";
bSynch = false;
}
public bool BSynch
{
get
{
return bSynch;
}
set
{
bSynch = value;
btnSynch.Visible = bSynch;
}
}
public TextBox CodeShower
@ -74,7 +93,7 @@ namespace CobXmlSupport
string inFile = parentWindow.CmbLastFile.Text.Substring(parentWindow.CmbLastFile.Text.LastIndexOf("\\") + 1);
string inPath = parentWindow.CmbLastFile.Text.Substring(0, parentWindow.CmbLastFile.Text.LastIndexOf("\\") + 1);
string codeFile = inFile.Substring(0, inFile.LastIndexOf(".")) + ".cvs";
string codeFile = inFile.Substring(0, inFile.LastIndexOf(".")) + CSV;
this.CodeShower.Text = " InPath = " + inPath + "\r\n InFile = " + inFile + "\r\n codeFile = " + codeFile + "\r\n codePath = " +inPath+ codeFile + "\r\n -------------- \r\n" + this.CodeShower.Text;
if (File.Exists(inPath + codeFile))
@ -116,10 +135,10 @@ namespace CobXmlSupport
DateTime.Now.Day.ToString("00") + "T" +
DateTime.Now.Hour.ToString("00") +
DateTime.Now.Minute.ToString("00") +
DateTime.Now.Second.ToString("00") + ".cvs";
DateTime.Now.Second.ToString("00") + CSV;
}
else {
backupfile = inPath + inFile.Substring(0, inFile.LastIndexOf(".")) + ".backup.cvs";
backupfile = inPath + inFile.Substring(0, inFile.LastIndexOf(".")) + ".backup"+CSV;
File.Delete(backupfile);
}
@ -220,7 +239,5 @@ namespace CobXmlSupport
}
}
}