Example #1
0
 public static FileAccess Pars(StartFileAccess access)
 {
     switch (access)
     {
         case StartFileAccess.Read:
             return FileAccess.Read;
         case StartFileAccess.Write:
             return FileAccess.Write;
         case StartFileAccess.ReadWrite:
             return FileAccess.ReadWrite;
         default:
             throw new ArgumentException("doesn't exists");
     }
 }
Example #2
0
        private void setFiledValues()
        {
            for (int i = 1; i < users.Count; i++)
            {
                UserSettings user = users[i];

                if (user.AccessRights != FileAccessHelper.Pars(access))
                {
                    access = StartFileAccess.None;
                }
                if (user.MaxNrOfConnections != maxNrOfConnections)
                {
                    maxNrOfConnections = -1;
                }
                if (user.StartingDirectory != startDir)
                {
                    startDir = "N/A";
                }

                name.Append(", " + user.Name);
            }
        }
Example #3
0
 public static string GetAccessName(StartFileAccess access)
 {
     return AccessNames[(int) access];
 }
Example #4
0
 private void initiateFields()
 {
     access = FileAccessHelper.Pars(users[0].AccessRights);
     maxNrOfConnections = users[0].MaxNrOfConnections;
     startDir = users[0].StartingDirectory;
     name = new StringBuilder(users[0].Name);
 }