private void btnOk_Click(object sender, RoutedEventArgs e)
        {
            Nullable <DateTime> pStartDate;
            Nullable <DateTime> pEndDate;

            if (radioToday.IsChecked == true)
            {
                pStartDate = DateTime.Today;
                pEndDate   = DateTime.Today;
            }
            else if (radioAllNews.IsChecked == true)
            {
                pStartDate = null;
                pEndDate   = null;
            }
            else
            {
                pStartDate = dpFrom.SelectedDate;
                pEndDate   = dpTo.SelectedDate;
            }


            Nullable <Boolean> IsRead;

            if (radioAllViews.IsChecked == true)
            {
                IsRead = null;
            }
            else if (radioViewed.IsChecked == true)
            {
                IsRead = true;
            }
            else
            {
                IsRead = false;
            }


            string Region;

            if (radioGlobalLocal.IsChecked == true)
            {
                Region = null;
            }
            else if (radioGlobal.IsChecked == true)
            {
                Region = "دولي";
            }
            else
            {
                Region = "محلي";
            }


            string Observer;

            if (cbxObserver.SelectedItem as string == "الكل")
            {
                Observer = null;
            }
            else
            {
                Observer = cbxObserver.SelectedItem as string;
            }


            string Resource;

            if (cbxResource.Text == "الكل")
            {
                Resource = null;
            }
            else
            {
                Resource = cbxResource.Text;
            }

            string KeyWord;

            if (string.IsNullOrEmpty(cbxKeyword.Text))
            {
                KeyWord = null;
            }
            else
            {
                KeyWord = cbxKeyword.Text;
            }


            frmNews.SetSearchedNewsProperties(pStartDate, pEndDate, IsRead, Region, Resource, Observer, KeyWord);
            frmNews.GetNews();
            this.Hide();
        }
 private void Window_Closed(object sender, EventArgs e)
 {
     frmNews.GetNews();
 }