Ejemplo n.º 1
0
        private void InstantiateObjects()
        {
            LayerView layerView_00 = new LayerView("Projetos", true);

            listLayerView.AddListView(layerView_00);

            Connection connection_00 = new Connection("postgres", "zaxscd098", "localhost", "loc2");

            // Proj0001
            QueryView queryView_00 = new QueryView
            {
                Label       = "Talhões",
                IdLayer     = 0,
                Query       = "select st_buffer(geom, 0.01) AS buffer, * FROM talhao where id <= 40",
                Color       = 250,
                CheckedTree = true
            };

            ProjectView projectView_00 = new ProjectView("proj0001", true);

            layerView_00.AddProjectView(projectView_00);
            projectView_00.AddConnection(connection_00);
            projectView_00.AddQueryView(queryView_00);

            // Proj0002
            QueryView queryView_01 = new QueryView
            {
                Label       = "Talhões",
                IdLayer     = 1,
                Query       = "select st_buffer(geom, 0.01) AS buffer, * FROM talhao where id > 40",
                Color       = 200,
                CheckedTree = true
            };

            ProjectView projectView_01 = new ProjectView("proj0002", true);

            layerView_00.AddProjectView(projectView_01);
            projectView_01.AddConnection(connection_00);
            projectView_01.AddQueryView(queryView_01);
        }