Example #1
0
 private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex < 0 || e.RowIndex > dataGridView1.Rows.Count)
     {
         return;
     }
     m.fullnot.SetNot(RSS.ConvertToNotification(lastItems[e.RowIndex]));
     dataGridView1.ClearSelection();
     m.fullnot.Show();
 }
Example #2
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            int way = 0;

            try
            {
                way++;
                XmlNode[] oldmivz = new XmlNode[MAX_UPDATES];
                way++;
                mivz.CopyTo(oldmivz);
                way++;
                rss.Refresh();
                way++;
                mivz = rss.GetLastItems(Notification.NotificationTypes.Any, MAX_UPDATES);
                way++;
                Notification n = RSS.ConvertToNotification(mivz[0]);
                way++;
                if (RSS.ConvertToNotification(oldmivz[0]).title != n.title)
                {
                    way = 10;
                    bool flag = false;
                    for (int i = 0; i < 5 && !flag; i++)
                    {
                        if (RSS.ConvertToNotification(oldmivz[i]).description == n.description)
                        {
                            flag = true;
                        }
                    }
                    way++;
                    if (!flag)
                    {
                        way = 15;
                        not.ShowNotification(n);
                        way++;
                        mivz = rss.GetLastItems(Notification.NotificationTypes.Any, MAX_UPDATES);
                        way++;
                        Updates();
                        way++;
                    }
                }
                ads++;
                if (ads == 3)
                {
                    //webBrowser1.Refresh();
                    ads = 0;
                }
            }
            catch
            {
                new Error("קיימת בעיית תוכנה כללית, אם הבעיה מתמשכת פנה אלינו במייל: " + App.mail + "\r\n(קוד בעיה: " + way + ")").ShowDialog();
            }
        }
Example #3
0
 private void Updates()
 {
     dataGridView1.Rows.Clear();
     for (int i = 0; i < MAX_UPDATES; i++)
     {
         nots[i] = RSS.ConvertToNotification(mivz[i]);
         dataGridView1.Rows.Add(new object[]
         {
             nots[i].title
         });
     }
     dataGridView1.ScrollBars = ScrollBars.Both;
 }
Example #4
0
        private void numericUpDown1_ValueChanged(object sender, EventArgs e)
        {
            Notification not = null;

            lastItems = m.rss.GetLastItems(TYPE, m.rss.Count());
            dataGridView1.Rows.Clear();
            for (int i = 0; i < numericUpDown1.Value; i++)
            {
                not = RSS.ConvertToNotification(lastItems[i]);
                dataGridView1.Rows.Add(new object[]
                {
                    (i + 1).ToString(),
                    not.title,
                    not.time
                });
            }
        }