コード例 #1
0
        /// <summary author="Austin Delaney" created="2019/04/12">
        /// Sets the thread list to the list found for local employee based on if the
        /// hidden or archived checks are checked.
        /// </summary>
        private void SetupThreadList()
        {
            List <UserThreadView> threads;

            try
            {
                if (chkShowHidden.IsChecked.Value)
                {
                    threads = _threadManager.GetUserThreadViewList(_employee, chkShowArchived.IsChecked.Value);
                }
                else
                {
                    List <UserThreadView> unfilteredList = _threadManager.GetUserThreadViewList(_employee, chkShowArchived.IsChecked.Value);
                    threads = unfilteredList.Where(t => !t.ThreadHidden).ToList();
                }
            }
            catch (Exception ex)
            {
                ExceptionLogManager.getInstance().LogException(ex);
                MessageBox.Show(ex.Message);
                threads = new List <UserThreadView>();
            }

            dgMessageThreadList.ItemsSource = threads;
        }