Пример #1
0
 private void EstablishConnection(string userName, string password, string domain, string machineName)
 {
     options = Connection.SetConnectionOptions();
     if (domain != null || userName != null)
     {
         options.Username = domain + "\\" + userName;
         options.Password = password;
     }
     connectionScope = Connection.SetConnectionScope(machineName, options);
 }