Beispiel #1
0
        public bool Equals(Device d)
        {
            // If parameter is null return false:
            if ((object)d == null)
            {
                return false;
            }

            // Return true if the fields match:
            return this.username.Equals(d.getUsername()) &&
                   this.mac.Equals(d.getMac()) &&
                   this.userimgurl.Equals(d.getUserImgUrl());
        }
        public void AddTweetsToTweetList(Device device)
        {
            if (!DeviceTweetList.Dispatcher.CheckAccess())
            {
                AddTweetsToTweetListDelegate del = new AddTweetsToTweetListDelegate(AddTweetsToTweetList);
                DeviceTweetList.Dispatcher.Invoke(del, new object[] { device });
            }
            else
            {
                ArrayList list = new ArrayList();
                List<Tweet> tList = tweetNetwork[device];

                foreach (Tweet t in tList)
                    list.Add(new TweetItem(t.getText()));

                DeviceTweetList.ItemsSource = list;
            }
        }