private static void CloseUNC(ref UNC unc) { if (unc != null) { unc.Close(); unc.Dispose(); unc = null; } }
private static bool OpenUNC(RootPath rootPath, out UNC unc) { unc = null; if (rootPath.IsUNCPath && !string.IsNullOrEmpty(rootPath.UserName)) { unc = new UNC(rootPath.Path, rootPath.Domain, rootPath.UserNameWithoutDomain, rootPath.Password); return(unc.Open()); } return(true); }
static bool TryPrintConnection(string drive, string path) { string UNCPath; if (drive.ToUpper() == path.Substring(0, 3).ToUpper()) { if (!UNC.TryGetUNCPath(drive, out UNCPath)) { return(false); } Console.WriteLine("{0}{1}", UNCPath, path.Substring(3)); return(true); } return(false); }
public void LoginC() { UNC.SendKeys("admin"); PAC.SendKeys("admin"); LOGC.Click(); }