private void AddFile(string fileName)
{
string path = Path.GetDirectoryName(fileName);
if (!folders.ContainsPath(fileName))
{
if (Directory.Exists(path + @"\.svn") || Directory.Exists(path + @"\_svn"))
{
SvnRepository repo = new SvnRepository(fileName, ScmRepository.PathType.File);
folders.Add(repo);
listViewFolders.Items.Add(new ListViewItem(fileName, repo.IconName));
UpdateListViewFolderNames();
Config.SaveSvnFolders(folders);
UpdateTray(false);
BeginUpdateFolderStatuses();
}
else
{
MessageBox.Show("This file is not under SCM", "SCM Notifier", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
else
SelectFolder(fileName);
}