Exemplo n.º 1
0
 public LogFilterCollectionPropertyDescriptor(LogFilterCollection coll, int idx)
     :
     base("#" + idx.ToString(), null)
 {
     this.collection = coll;
     this.index      = idx;
 }
Exemplo n.º 2
0
 public void SaveFiltersToRegistry(LogFilterCollection filters)
 {
     foreach (LogFilter filter in filters)
     {
         SaveFilter(filter);
     }
 }
Exemplo n.º 3
0
 public void SaveFiltersToRegistry(LogFilterCollection filters)
 {
     foreach (LogFilter filter in filters)
     {
         SaveFilter(filter);
     }
 }
Exemplo n.º 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;
 }
Exemplo n.º 5
0
 public void SetFilters(LogFilterCollection filters)
 {
     if (filters == null)
     {
         Console.WriteLine("setting filters as null");
     }
     gridControl1.DataSource = filters;
     gridView1.BestFitColumns();
 }
Exemplo n.º 6
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();
 }
Exemplo n.º 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();
        }
Exemplo n.º 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);
        }
Exemplo n.º 9
0
 public LogFilterCollectionPropertyDescriptor(LogFilterCollection coll, int idx)
     : base("#" + idx.ToString(), null)
 {
     this.collection = coll;
     this.index = idx;
 }
Exemplo n.º 10
0
 public void SetFilters(LogFilterCollection filters)
 {
     _filters = filters;
 }
Exemplo n.º 11
0
 public void SetFilters(LogFilterCollection filters)
 {
     if (filters == null) Console.WriteLine("setting filters as null");
     gridControl1.DataSource = filters;
     gridView1.BestFitColumns();
 }