/[xmltv_parser]/trunk/xmltv_parser/main.cs
ViewVC logotype

Diff of /trunk/xmltv_parser/main.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/xmltv_parser/main.cs	2013/03/13 15:16:59	131
+++ trunk/xmltv_parser/main.cs	2013/03/13 15:48:38	133
@@ -302,6 +302,35 @@
         }
         #endregion
 
+        private void btnFilter_Click(object sender, EventArgs e)
+        {
+            Type data_type;
+            // grab the data from the master source
+            object data = XMLTV.CreateBindingSourceFromData(XMLTV.GetPrograms(), out data_type);
+            if (radio_filter_channelname.Checked)
+            {
+                XMLTV.CreateFilterFromDataSource(ref data, "channelname", txtFilterText.Text);
+            }
+            else if (radio_filter_title.Checked)
+            {
+                XMLTV.CreateFilterFromDataSource(ref data, "title", txtFilterText.Text);
+            }
+            else if (radio_filter_subtitle.Checked)
+            {
+                XMLTV.CreateFilterFromDataSource(ref data, "subtitle", txtFilterText.Text);
+            }
+            else if (radio_filter_description.Checked)
+            {
+                XMLTV.CreateFilterFromDataSource(ref data, "description", txtFilterText.Text);
+            }
+            else
+            {
+                // unknown filter
+                gLog.Warn.WriteLine("Unkown filter value used.  Was not: channelname, title, subtitle, or description.");
+            }
+            dataGrid.DataSource = data;
+        }
+
        
     }
 }

 

  ViewVC Help
Powered by ViewVC 1.1.22