Exemple #1
0
 public LogFilterCollectionPropertyDescriptor(LogFilterCollection coll, int idx)
     :
     base("#" + idx.ToString(), null)
 {
     this.collection = coll;
     this.index      = idx;
 }
Exemple #2
0
 public void SaveFiltersToRegistry(LogFilterCollection filters)
 {
     foreach (LogFilter filter in filters)
     {
         SaveFilter(filter);
     }
 }
Exemple #3
0
 public void SaveFiltersToRegistry(LogFilterCollection filters)
 {
     foreach (LogFilter filter in filters)
     {
         SaveFilter(filter);
     }
 }
Exemple #4
0
 public LogFilterCollection GetFiltersFromRegistry()
 {
     LogFilterCollection filters = new LogFilterCollection();
     RegistryKey TempKey = null;
     TempKey = Registry.CurrentUser.CreateSubKey("Software");
     // als "T5Suite2" niet bestaat, eerst inlezen uit "T5SuitePro" en dan meteen weer opslaan
     try
     {
         RegistryKey testKey = TempKey.OpenSubKey("T5Suite2");
         using (RegistryKey Settings = TempKey.CreateSubKey("T5Suite2\\LogFilters"))
         {
             if (Settings != null)
             {
                 string[] vals = Settings.GetSubKeyNames();
                 foreach (string a in vals)
                 {
                     try
                     {
                         LogFilter filter = LoadFilter(a);
                         filters.Add(filter);
                     }
                     catch (Exception E)
                     {
                         Console.WriteLine(E.Message);
                     }
                 }
             }
         }
     }
     catch (Exception E2)
     {
         Console.WriteLine(E2.Message);
     }
     return filters;
 }
Exemple #5
0
 public void SetFilters(LogFilterCollection filters)
 {
     if (filters == null)
     {
         Console.WriteLine("setting filters as null");
     }
     gridControl1.DataSource = filters;
     gridView1.BestFitColumns();
 }
 private void simpleButton1_Click(object sender, EventArgs e)
 {
     LogFilterCollection filters = (LogFilterCollection)gridControl1.DataSource;
     if (filters == null) filters = new LogFilterCollection();
     LogFilter newfilter = new LogFilter();
     newfilter.Index = filters.Count;
     filters.Add(newfilter);
     gridControl1.DataSource = filters;
     gridView1.RefreshData();
     gridView1.BestFitColumns();
     //gridView1.AddNewRow();
 }
Exemple #7
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            LogFilterCollection filters = (LogFilterCollection)gridControl1.DataSource;

            if (filters == null)
            {
                filters = new LogFilterCollection();
            }
            LogFilter newfilter = new LogFilter();

            newfilter.Index = filters.Count;
            filters.Add(newfilter);
            gridControl1.DataSource = filters;
            gridView1.RefreshData();
            gridView1.BestFitColumns();
            //gridView1.AddNewRow();
        }
Exemple #8
0
        public LogFilterCollection GetFiltersFromRegistry()
        {
            LogFilterCollection filters = new LogFilterCollection();
            RegistryKey         TempKey = null;

            TempKey = Registry.CurrentUser.CreateSubKey("Software");
            // als "T5Suite2" niet bestaat, eerst inlezen uit "T5SuitePro" en dan meteen weer opslaan
            try
            {
                RegistryKey testKey = TempKey.OpenSubKey("T5Suite2");
                using (RegistryKey Settings = TempKey.CreateSubKey("T5Suite2\\LogFilters"))
                {
                    if (Settings != null)
                    {
                        string[] vals = Settings.GetSubKeyNames();
                        foreach (string a in vals)
                        {
                            try
                            {
                                LogFilter filter = LoadFilter(a);
                                filters.Add(filter);
                            }
                            catch (Exception E)
                            {
                                Console.WriteLine(E.Message);
                            }
                        }
                    }
                }
            }
            catch (Exception E2)
            {
                Console.WriteLine(E2.Message);
            }
            return(filters);
        }
 public LogFilterCollectionPropertyDescriptor(LogFilterCollection coll, int idx)
     : base("#" + idx.ToString(), null)
 {
     this.collection = coll;
     this.index = idx;
 }
Exemple #10
0
 public void SetFilters(LogFilterCollection filters)
 {
     _filters = filters;
 }
 public void SetFilters(LogFilterCollection filters)
 {
     if (filters == null) Console.WriteLine("setting filters as null");
     gridControl1.DataSource = filters;
     gridView1.BestFitColumns();
 }