示例#1
0
 private void CreateBoundaryFormClosed(object sender, EventArgs e)
 {
     if (createBoundaryForm.isConfirmed)
     {
         newBlockGroup.SetBlockGroup(createBoundaryForm.crop, createBoundaryForm.plantSpacing, createBoundaryForm.rowSpacing, createBoundaryForm.tubingNumber);
         FieldLayout.AddBlockGroup(ref newBlockGroup);
         Crop c = FieldLayout.FindCrop(createBoundaryForm.crop);
         if (c == null)
         {
             c = new Crop(createBoundaryForm.crop, createBoundaryForm.dailyApp);
             FieldLayout.AddCrop(ref c);
         }
         else
         {
             c.dailyApp       = createBoundaryForm.dailyApp;
             c.hasBeenUpdated = true;
         }
         createBoundaryForm.Dispose();
     }
     else if (createBoundaryForm.isEnteringTubingDirection)
     {
         //createBoundaryForm.tubingCoord1 = w.d.GetSelectedLines()[0].pt1;//these both need to be changed once we are able to pass coords from draw space
         //createBoundaryForm.tubingCoord1 = w.d.GetSelectedLines()[0].pt2;//these both need to be changed once we are able to pass coords from draw space
         //createBoundaryForm.Show();
     }
     else
     {
     }
 }//Block Group is created from the create boundary form with this event handler which handles an event of another form!!! This shit is so pro, you guys have no idea!!!!!!