xml settings backup
This commit is contained in:
@ -39,7 +39,7 @@ namespace CobXmlSupport
|
||||
FileList.TryGetValue(fnameChosen, out lSetting);
|
||||
if (lSetting.ActualFile == S.ettingActualFile)
|
||||
{
|
||||
lSetting.SetSettings();
|
||||
lSetting.GetSettings();
|
||||
}
|
||||
lvGenFiles.Items.Clear();
|
||||
if (lSetting.fileList != null)
|
||||
@ -67,20 +67,40 @@ namespace CobXmlSupport
|
||||
|
||||
private void lvGenFiles_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
ListViewItem fnameChosen = lvGenFiles.SelectedItems[0];
|
||||
if (!fnameChosen.Text.StartsWith("Inga"))
|
||||
if (lvGenFiles.SelectedItems.Count > 0)
|
||||
{
|
||||
showGeneratedFile(fnameChosen.Text, fnameChosen.SubItems[3].Text + "\\" + fnameChosen.SubItems[2].Text);
|
||||
ListViewItem fnameChosen;
|
||||
try
|
||||
{
|
||||
fnameChosen = lvGenFiles.SelectedItems[0];
|
||||
if (!fnameChosen.Text.StartsWith("Inga"))
|
||||
{
|
||||
showGeneratedFile(fnameChosen.Text, fnameChosen.SubItems[3].Text + "\\" + fnameChosen.SubItems[2].Text);
|
||||
}
|
||||
else MessageBox.Show(fnameChosen.Text);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show("Problem listView :\r\n" + ex.Message);
|
||||
}
|
||||
}
|
||||
else MessageBox.Show(fnameChosen.Text);
|
||||
|
||||
}
|
||||
|
||||
private void showGeneratedFile(string usageName,string fname){
|
||||
ShowCode FileWin = new ShowCode();
|
||||
FileWin.Parent = null;
|
||||
FileWin.Labeltext = usageName;
|
||||
FileWin.CodeShower.Text = File.ReadAllText(fname);
|
||||
FileWin.ShowDialog();
|
||||
try
|
||||
{
|
||||
ShowCode FileWin = new ShowCode();
|
||||
FileWin.Parent = null;
|
||||
FileWin.Labeltext = usageName;
|
||||
FileWin.CodeShower.Text = File.ReadAllText(fname);
|
||||
FileWin.ShowDialog();
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show("Misslyckad filläsning!\r\n"+ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user