private void readUsers() { DirectoryInfo users = new DirectoryInfo(SYS.path + "\\User"); foreach (var user in users.GetDirectories()) { if (user.Name.ToLower() == "common") { continue; } Users.Add(UserOperater.Get(user.Name)); } NameText.Text = Users[0].Name; UserIcon.Image = new Img().CutCircle((Bitmap)Users[userIndex].Icon); }
void Button1Click(object sender, EventArgs e) { UserInfo user = UserOperater.Get("User"); BackgroundImage = user.Icon; }