public void InstallClicked() { if (!CheckSourceFiles()) { return; } int count = 0; List <string> pathMql4Dirs = GetMql4Dirs(); if (pathMql4Dirs != null && pathMql4Dirs.Count > 0) { SetTargets(pathMql4Dirs); count = pathMql4Dirs.Count; } List <string> pathMql4Xp = GetMql4DirsXp(); if (pathMql4Xp != null && pathMql4Xp.Count > 0) { SetTargets(pathMql4Xp); count += pathMql4Xp.Count; } List <string> pathMql4X86 = GetMql4DirsX86(); if (pathMql4X86 != null && pathMql4X86.Count > 0) { SetTargets(pathMql4X86); count += pathMql4X86.Count; } if (count == 0) { view.AppendOutput("No Meta Trader terminals were found.\r\nPlease click \"Installation Help\" above."); view.AppendOutput(Environment.NewLine); return; } DeleteOldFiles(); int files = CopyNewFiles(); view.AppendOutput(files > 0 ? "Done!" : "Expert was not installed! Please click \"Installation Help\" above."); }
public void InstallClicked() { int count = PrepareMql4Dirs(); if (count == 0) { view.AppendOutput("No Meta Trader terminals were found.\r\nPlease click \"Installation Help\" above."); view.AppendOutput(Environment.NewLine); return; } DeleteOldFiles(); int files = CopyNewFiles(); originList.ForEach(origin => view.AppendOutput(origin + Environment.NewLine)); view.AppendOutput(files > 0 ? "Done!" : "Bridge was not installed! Please click \"Installation Help\" above."); }