Example #1
0
 /// <summary>
 /// 共通項目設定
 /// </summary>
 /// <param name="pItem"></param>
 private void setCommonItem(WeatherReportsContentsData pItem)
 {
     this.WeatherReportsArea.Text = pItem.Title;
     this.WeatherReportsTime.Text = pItem.Time;
     this.TextBlock.Text          = pItem.Text;
     this.PublicTime.Text         = pItem.PublicTime;
 }
Example #2
0
        //,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

        //''''''''''''''''''''''''''''''''''''''''''''''''''
        #region " '検索イベント"
        /// <summary>
        /// 検索ボタン押下
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Search_Click(object sender, RoutedEventArgs e)
        {
            // 地域未選択の場合はメッセージを表示
            if (this.cmbCity.SelectedIndex == -1)
            {
                MessageBox.Show(WeatherReportsConst.ERROR_1);
                return;
            }
            ;

            try
            {
                String val = logic.getSelectItem((List <ListItemData>) this.cmbCity.ItemsSource, this.cmbCity.SelectedIndex);
                WeatherReportsContentsData ret = logic.getRequest(val);
                setCommonItem(ret);
                setDetailItem(ret.Items);
            }
            catch (Exception ex)
            {
                MessageBox.Show(WeatherReportsConst.ERROR_2);
                clsLogManager.writeLog(ex);
            }
        }