/// <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); } }
private void ListBox_SelectedIndexChanged(object sender, EventArgs e) { if (sender is ListBox listBox) { if (listBox.SelectedIndex != -1) { if (listBox.Items[listBox.SelectedIndex] is IGH_GooProxy value) { RecordUndoEvent($"Set: {value}"); PersistentData.Clear(); PersistentData.Append(value.ProxyOwner as Types.ParameterKey); } } ExpireSolution(true); } }
private void ElementTypesBox_SelectedIndexChanged(object sender, EventArgs e) { if (sender is ListBox listBox) { if (listBox.SelectedIndex != -1) { if (listBox.Items[listBox.SelectedIndex] is T value) { RecordUndoEvent($"Set: {value}"); PersistentData.Clear(); PersistentData.Append(value); } } ExpireSolution(true); } }
/// <summary> /// Select a new Orientation. /// </summary> /// <param name="orientation">COrientation: Collates nesting orientation constraints.</param> public void SetNewOrientation(COrientation orientation) { try { RecordPersistentDataEvent("Set orientation"); PersistentData.Clear(); if (orientation != null) { PersistentData.Append(new OrientationGoo(orientation), new GH_Path(0)); } } finally { ExpireSolution(true); } }
private void MaterialItemOnClick(object sender, EventArgs eventArgs) { ToolStripMenuItem item = sender as ToolStripMenuItem; if (item == null) { return; } string code = (string)item.Tag; if (IsMaterialSelected(code)) { return; } RecordPersistentDataEvent("Set material: " + item.Name); PersistentData.Clear(); PersistentData.Append(new GH_String(code)); ExpireSolution(true); }
private void SetDefaultHandler(object sender, EventArgs e) { PersistentData.Clear(); PersistentData.Append(ABBTool.Default, new GH_Path(0)); ExpireSolution(true); }
private void SetDefaultHandler(object sender, EventArgs e) { PersistentData.Clear(); PersistentData.Append(new GH_Integer((int)MotionType.Linear), new GH_Path(0)); ExpireSolution(true); }