Exemplo n.º 1
0
        public void ImportXml()
        {
            var rulePath        = Assembly.GetExecutingAssembly().Location.Replace("RosReestrImp.dll", "rule.xml");
            var wRm             = new Rule.RuleManager(rulePath);
            var openFileDialog1 = new OpenFileDialog {
                Filter = FilterString
            };

            if (openFileDialog1.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            wRm.LoadData(openFileDialog1.FileName).ForEach(DrawLayer);
        }
Exemplo n.º 2
0
        public void ImportXML()
        {
            string RulePath = Assembly.GetExecutingAssembly().Location.Replace("RosReestrImp.dll", "rule.xml");

            Rule.RuleManager wRM             = new Rule.RuleManager(RulePath);
            OpenFileDialog   openFileDialog1 = new OpenFileDialog();

            openFileDialog1.Filter = "xml files (*.xml)|*.xml";
            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                List <Data.DataLayer> res = wRM.LoadData(openFileDialog1.FileName);
                if (res != null)
                {
                    res.ForEach(l => DrawLayer(l));
                }
            }
        }
Exemplo n.º 3
0
        public void ImportXmLwithRule()
        {
            var openFileDialog1 = new OpenFileDialog {
                Filter = FilterString
            };

            if (openFileDialog1.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            var wRm = new Rule.RuleManager(openFileDialog1.FileName);

            if (openFileDialog1.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            wRm.LoadData(openFileDialog1.FileName).ForEach(DrawLayer);
        }
Exemplo n.º 4
0
        public void ImportXMLwithRule()
        {
            OpenFileDialog openFileDialog1 = new OpenFileDialog();

            openFileDialog1.Filter = "xml files (*.xml)|*.xml";
            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                Rule.RuleManager wRM = new Rule.RuleManager(openFileDialog1.FileName);
                if (openFileDialog1.ShowDialog() == DialogResult.OK)
                {
                    List <Data.DataLayer> res = wRM.LoadData(openFileDialog1.FileName);
                    if (res != null)
                    {
                        res.ForEach(l => DrawLayer(l));
                    }
                }
            }
        }
Exemplo n.º 5
0
 /// <summary>
 /// Загрузка данных из файла
 /// </summary>
 /// <param name="filename"> xml-файл с данными </param>
 /// <returns> Список данных слоёв </returns>
 public List <Data.DataLayer> LoadData(string filename)
 {
     return(this.LoadData(RuleManager.LoadXML(filename)));
 }
Exemplo n.º 6
0
 /// <summary>
 /// Конструктор
 /// </summary>
 /// <param name="filename"> xml-файл правил </param>
 /// <exception cref="RuleLoadException"> Ошибка xml-файла правил </exception>
 public RuleManager(string filename) : this(RuleManager.LoadXML(filename))
 {
 }