Beispiel #1
0
        public void ImportKmlImageTest()
        {
            Generator g             = new Generator();
            Int32     counterBefore = g.Document.ComponentSet.Count;

            Manifold.Interop.Document doc = g.Document;
            kml.Import(doc);
            Int32 counterAfter = g.Document.ComponentSet.Count;

            Assert.AreEqual(counterBefore + 1, counterAfter);
        }
Beispiel #2
0
        private void openFileDialog1_FileOk(object sender, CancelEventArgs e)
        {
            string[] files = openFileDialog1.FileNames;

            Manifold.Interop.History logger = doc.Application.History;



            foreach (string str in files)
            {
                if (KmlFile(str))
                {
                    Kml kml = new Kml(str);
                    try
                    {
                        kml.Import(doc);
                    }
                    catch (Exception ex)
                    {
                        logger.Log(ex.Message + "\n", null);
                    }
                }
            }
            openFileDialog1.Dispose();
        }