public SubForumWindow(string forumName, string subForumName, string userName, Iclient cl) { InitializeComponent(); this.Title = "Clingr - " + forumName + " - " + subForumName; this.cl = cl; this.forumName = forumName; this.subForumName = subForumName; this.userName = userName; threadsListView.Background = new SolidColorBrush(Color.FromRgb(83, 83, 83)); this.Background = new SolidColorBrush(Color.FromRgb(69, 70, 73)); threads = cl.getThreads(forumName, subForumName, userName); threads = new List <Tuple <string, DateTime, int> >(); //if(threads == null) .... threads.Add(new Tuple <string, DateTime, int>("Test Thread 1", DateTime.Now, 111)); List <string> threadsStrings = new List <string>(); foreach (Tuple <string, DateTime, int> thread in threads) { threadsStrings.Add(thread.Item2.ToShortDateString() + ": " + thread.Item1); } threadsListView.ItemsSource = threadsStrings; this.ResizeMode = ResizeMode.CanMinimize; }
private void createThreadBtn_Click(object sender, RoutedEventArgs e) { new NewThreadWindow(forumName, subForumName, userName, cl).ShowDialog(); threads = cl.getThreads(forumName, subForumName, userName); List <string> threadsStrings = new List <string>(); if (threads != null) { foreach (Tuple <string, DateTime, int> thread in threads) { threadsStrings.Add(thread.Item2.ToShortDateString() + ": " + thread.Item1); } } threadsListView.ItemsSource = threadsStrings; }