Beispiel #1
0
        public override void Run(string filename, Database db)
        {
            using (Transaction tr = db.TransactionManager.StartTransaction())
            {
                try
                {
                    LayerFilterTree       lft      = db.LayerFilters;
                    LayerFilterCollection lfc      = lft.Root.NestedFilters;
                    List <LayerFilter>    todelete = new List <LayerFilter>();

                    foreach (LayerFilter lf in lfc)
                    {
                        if (lf.AllowDelete)
                        {
                            todelete.Add(lf);
                        }
                    }
                    foreach (LayerFilter lf in todelete)
                    {
                        lfc.Remove(lf);
                    }

                    db.LayerFilters = lft;
                }
                catch (Exception ex)
                {
                    OnError(ex);
                }

                tr.Commit();
            }
        }
Beispiel #2
0
        Stream(ArrayList data, LayerFilterTree layerFilterTree)
        {
            data.Add(new Snoop.Data.ClassSeparator(typeof(LayerFilterTree)));

            data.Add(new Snoop.Data.Object("Current", layerFilterTree.Current));
            data.Add(new Snoop.Data.Object("Root", layerFilterTree.Root));
        }