Example #1
0
 private static void CloseUNC(ref UNC unc)
 {
     if (unc != null)
     {
         unc.Close();
         unc.Dispose();
         unc = null;
     }
 }
Example #2
0
 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);
 }
Example #3
0
        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();
 }