public MainWindow() { InitializeComponent(); names = (Nicknames)FindResource("names"); // 이렇게 할 경우 DataContext를 코드 상에서 지정할 필요가 없다. names.Add(new Nickname("XXX", "1st")); names.Add(new Nickname("YYY", "2nd")); names.Add(new Nickname("ZZZ", "3rd")); }
public void AddNicknamesToUser(MBlogModel.User user) { foreach (MBlogModel.Blog blog in user.Blogs) { Nicknames.Add(blog.Nickname); } }
public void AddNickname(string username) { if (Nicknames == null) { Nicknames = new List <string>(); } if (!Nicknames.Contains(username)) { Nicknames.Add(username); } }
public void AddNickname(SocketGuildUser user) { if (Nicknames == null) { Nicknames = new List <string>(); } if (!string.IsNullOrEmpty(user.Nickname) && !Nicknames.Contains(user.Nickname)) { Nicknames.Add(user.Nickname); } }
public DatabaseUser AddNickname(string username) { if (Nicknames == null) { Nicknames = new List <string>(); } if (!Nicknames.Contains(username)) { Nicknames.Add(username); } return(this); }
public void AddFriendInvitation(string username, string nickname, string message) { Usernames.Add(username); Nicknames.Add(nickname); Messages.Add(message); }
private void btnAdd_Click(object sender, RoutedEventArgs e) { names.Add(new Nickname(txtName.Text, txtNick.Text)); }
public void AddNickname(string nickname) { Nicknames.Add(nickname); }