Пример #1
0
        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"));
        }
Пример #2
0
 public void AddNicknamesToUser(MBlogModel.User user)
 {
     foreach (MBlogModel.Blog blog in user.Blogs)
     {
         Nicknames.Add(blog.Nickname);
     }
 }
Пример #3
0
 public void AddNickname(string username)
 {
     if (Nicknames == null)
     {
         Nicknames = new List <string>();
     }
     if (!Nicknames.Contains(username))
     {
         Nicknames.Add(username);
     }
 }
Пример #4
0
 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);
     }
 }
Пример #5
0
 public DatabaseUser AddNickname(string username)
 {
     if (Nicknames == null)
     {
         Nicknames = new List <string>();
     }
     if (!Nicknames.Contains(username))
     {
         Nicknames.Add(username);
     }
     return(this);
 }
Пример #6
0
 public void AddFriendInvitation(string username, string nickname, string message)
 {
     Usernames.Add(username);
     Nicknames.Add(nickname);
     Messages.Add(message);
 }
Пример #7
0
 private void btnAdd_Click(object sender, RoutedEventArgs e)
 {
     names.Add(new Nickname(txtName.Text, txtNick.Text));
 }
Пример #8
0
 public void AddNickname(string nickname)
 {
     Nicknames.Add(nickname);
 }