Example #1
0
        private void NotifyUser(CityData cd)
        {
            string mess = cd.getMessage();

            if (!rtbMess.Text.Contains(mess))
            {
                rtbMess.AppendText(mess);
                rtbMess.AppendText("\r\n");
            }
            _notificCount += notifsett;
            timerNotify.Start();
        }
Example #2
0
 private void checkOnNotification()
 {
     foreach (CityDataSet cset in settingsCitiesList)
     {
         if (cset.IsSelected)
         {
             CityData cd = getCity(cset.City);
             if (cd != null && cd.Date != DateTime.MinValue && (cset.Date == DateTime.MinValue || cd.Date < cset.Date))
             {
                 NotifyUser(cd);
             }
         }
     }
 }
Example #3
0
 private void ShowResults()
 {
     _cityData.Clear();
     foreach (KeyValuePair <int, string> pair in _values)
     {
         CityData cd = new CityData();
         cd.City = this.webBrowser1.Document.GetElementById("ctl00_plhMain_cboVAC").Children[pair.Key].InnerText.Replace("Польщі ", "").Replace("Poland ", "");
         cd.Date = ProcessDate(pair.Value);
         _cityData.Add(cd);
     }
     dataGridViewResults.DataSource = null;
     if (dataGridViewResults.Columns.Count == 0)
     {
         this.dataGridViewResults.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[]
         {
             this.Date,
             this.City
         });
     }
     dataGridViewResults.DataSource = _cityData;
     dataGridViewResults.Refresh();
     checkOnNotification();
 }