private void frmAddTree_Load(object sender, EventArgs e) { #region // saves the layers before they're edited so they can be restored if user clicks cancel on form----------------------- int lyr3 = util.getLayerHdl(Michael.prj.LyrTreeName, pvMap); if (lyr3 != -1) { FeatureSet Fe3 = pvMap.Layers[lyr3].DataSet as FeatureSet; Fe3.SaveAs(ProjectFile.Path + "Tree.shp", true); Michael.prj.LyrTreeName = "Tree"; } #endregion double D = Convert.ToDouble(txtTreeDiameter.Text); //dVal = System.Convert.ToDouble(sVal) int LyrTree = util.getLayerHdl(Michael.prj.LyrTreeName, Michael.pvMap); if (LyrTree != -1) { FeatureSet Fe = Michael.pvMap.Layers[LyrTree].DataSet as FeatureSet; numExisting = Fe.DataTable.Rows.Count; //MessageBox.Show(numExisting.ToString()); Fe = null; } }
private void btnSaveBuilding_Click(object sender, EventArgs e) { if (project.Path != "") { if (util.getLayerHdl("Solar Radiation Rose", pvMap) == -1) { Michael.CentroidAsSite(project.LyrBuildingName, pvMap); } } Michael.drawBuildingShadow(); Michael.ExportBldgAndTrr2SketchUp.Enabled = true; Michael.EnableBuildingEdit(); this.Close(); }
private void Form1_Load(object sender, EventArgs e) { lblPvHeight.Text = project.PvHeightEdit; lblHeight.Text = lblPvHeight.Text; txtPvHeight.Text = lblPvHeight.Text; lblPvWidth.Text = project.PvWidthEdit; lblWidth.Text = lblPvWidth.Text; txtPvWidth.Text = lblPvWidth.Text; lblTilt.Text = project.PvTiltEdit; pvPanelAngle1.tiltAngle = float.Parse(lblTilt.Text); lblAzimuth.Text = project.PvAzimuthEdit; pvPanelCompassCtl1.AzimutAngle = float.Parse(lblAzimuth.Text); //-------------------------------------------------------------------- cub.Center = new YLScsDrawing.Drawing3d.Point3d(400, 240, 0); cam.Location = new YLScsDrawing.Drawing3d.Point3d(400, 240, -500); //-------------------------------------------------------------------- bmp[0] = new Bitmap((Bitmap)picPv.Image); Michael.propertyGrid1.Refresh(); project.LyrPvPanel = util.getLayerHdl(project.LyrPoleName, pvMap); Invalidate(); if (Project.LyrPvPanel != -1) { List <IFeature> ls1 = new List <IFeature>(); FeatureLayer fl1 = pvMap.Layers[project.LyrPvPanel] as FeatureLayer; ISelection il1 = fl1.Selection; FeatureSet fe = il1.ToFeatureSet(); grdPvPoleSelected.DataSource = fe.DataTable; } }
private void btnPanelSelectionOK_Click(object sender, EventArgs e) { Michael.propertyGrid1.Refresh(); //frmPanelSelection formPanelSel = new frmPanelSelection(); //formPanelSel.Michael = this; frmPvPanelSetup formPVPanel = new frmPvPanelSetup(); formPVPanel.Michael = Michael; formPVPanel.PvMap = pvMap; Michael.prj.LyrPole = util.getLayerHdl(Michael.prj.LyrPoleName, pvMap); //Michael.prj.LyrPole = util.getLayerHdl(Michael.cmbPolePosition.Text, pvMap); formPVPanel.Project = Michael.prj; formPVPanel.Show(); formPVPanel.TopMost = true; this.Close(); }