Esempio n. 1
0
        private void buttonLoad_Click_1(object sender, EventArgs e)
        {
            //  Create a Persistence Engine.
            SharpGL.Persistence.PersistenceEngine engine = new SharpGL.Persistence.PersistenceEngine();

            //  Create a a set of polygons.
            PolygonCollection loaded = (PolygonCollection)engine.UserLoad(typeof(PolygonCollection));

            //  If we successfully loaded, set the collection.
            if (loaded != null)
            {
                polygons = loaded;
                foreach(Polygon polygon in loaded)
                    polygon.Attributes.PolygonDrawMode = SharpGL.SceneGraph.Attributes.Polygon.PolygonMode.Lines;
            }
        }
Esempio n. 2
0
        private void buttonLoad_Click_1(object sender, EventArgs e)
        {
            //  Create a Persistence Engine.
            SharpGL.Persistence.PersistenceEngine engine = new SharpGL.Persistence.PersistenceEngine();

            //  Create a a set of polygons.
            PolygonCollection loaded = (PolygonCollection)engine.UserLoad(typeof(PolygonCollection));

            //  If we successfully loaded, set the collection.
            if (loaded != null)
            {
                polygons = loaded;
                foreach (Polygon polygon in loaded)
                {
                    polygon.Attributes.PolygonDrawMode = SharpGL.SceneGraph.Attributes.Polygon.PolygonMode.Lines;
                }
            }
        }
Esempio n. 3
0
        private void buttonLoad_Click(object sender, System.EventArgs e)
        {
            //	Create a persistence engine.
            SharpGL.Persistence.PersistenceEngine engine = new SharpGL.Persistence.PersistenceEngine();

            //	Load the polygon.
            object data = engine.UserLoad(typeof(Polygon));

            if (data != null)
            {
                //	Set the new polygon.
                BuildingPolygon = (Polygon)data;

                //	Remove the old one.
                openGLCtrlPolybuild.Scene.Polygons.Clear();
                openGLCtrlPolybuild.Scene.Polygons.Add(polygon);

                //	Update the controls.
                PopulateControls();
            }
        }
Esempio n. 4
0
        private void buttonLoad_Click(object sender, System.EventArgs e)
        {
            //	Create a persistence engine.
            SharpGL.Persistence.PersistenceEngine engine = new SharpGL.Persistence.PersistenceEngine();

            //	Load the polygon.
            object data = engine.UserLoad(typeof(Polygon));

            if(data != null)
            {
                //	Set the new polygon.
                BuildingPolygon = (Polygon)data;

                //	Remove the old one.
                openGLCtrlPolybuild.Scene.Polygons.Clear();
                openGLCtrlPolybuild.Scene.Polygons.Add(polygon);

                //	Update the controls.
                PopulateControls();
            }
        }