/// <summary> /// Make a function for option 0 from ToolStripMenu /// </summary> /// <param name="sender">>object: Support all classes in the .NET Framework class hierachy and provides low-level service to derived classes.</param> /// <param name="e">RhinoNestEventArgs: Class used in events.</param> private void MenuClick(object sender, EventArgs e) { var send = sender as ToolStripMenuItem; if (send != null) { SetNewCriter(Criter.SetCriterion((ObjectCriterion)send.Tag)); } }
/// <summary> /// Select a new Criter. /// </summary> /// <param name="source">Criter: Collates nesting Criterion constraints.</param> private void SetNewCriter(Criter source) { try { RecordPersistentDataEvent("Set Criterion"); PersistentData.Clear(); if (source != null) { PersistentData.Append(new CriterionGoo(source), new GH_Path(0)); } } finally { ExpireSolution(true); } }
/// <summary> /// Constructor Empty /// </summary> public Criterion() : base("Criterion", "Criterion", "Criterion data for nesting", "RhinoNest", "Nesting") { SetNewCriter(Criter.SetCriterion(ObjectCriterion.GivenOrientationAsBasicOne)); }