コード例 #1
0
        private void btnCloseDrawTree_Click(object sender, EventArgs e)
        {
            if (project.Path != "")
            {
                if (util.getLayerHdl("Solar Radiation Rose", pvMap) == -1)
                {
                    Michael.CentroidAsSite(project.LyrTreeName, pvMap);
                }
            }

            this.Close();
            Michael.EnableTreeEditing();
            //Michael.SolarObstuctionVerification();
            //Draw tree shadows
            Michael.DrawTreeShadow();
            Michael.ExportBldgAndTrr2SketchUp.Enabled = true;
        }
コード例 #2
0
 private void cmdUpdateShape_Click(object sender, EventArgs e)
 {
     if (ProjectFile.LyrTree != -1)
     {
         IMapFeatureLayer TreeFe = PvMap.Layers[ProjectFile.LyrTree] as IMapFeatureLayer;
         List <IFeature>  lstFe  = new List <IFeature>();
         ISelection       selFe  = TreeFe.Selection;
         lstFe = selFe.ToFeatureList();
         int iRow = 0;
         foreach (IFeature fs in lstFe)
         {
             try
             {
                 fs.DataRow.BeginEdit();
                 fs.DataRow["Height"]   = grdTreeAttribute.Rows[iRow].Cells["Height"].Value;
                 fs.DataRow["Diameter"] = grdTreeAttribute.Rows[iRow].Cells["Diameter"].Value;
                 fs.DataRow["Type"]     = grdTreeAttribute.Rows[iRow].Cells["Type"].Value;
                 fs.DataRow.EndEdit();
                 iRow++;
                 double Radius = Convert.ToDouble(fs.DataRow["Diameter"]) / 2;
                 //short numVertx = 36;
                 //Michael.kDrawTreeCircle(Convert.ToDouble(fs.DataRow['X']), Convert.ToDouble(fs.DataRow['Y']), Convert.ToDouble(fs.DataRow["Diameter"]), numVertx, pvMap, Color.Green);
             }
             catch { }
         }
         if (Michael.SolarObstuctionVerification())
         {
             TreeFe.Selection.Clear();
             this.Close();
             Michael.DrawTreeShadow();
         }
         else
         {
             MessageBox.Show("There is an error in the edited properties.");
         }
     }
 }