private void bObjects_Click(object sender, EventArgs e) { Acad.SelectObjectIds(); Interaction.SetActiveDocFocus(); var ids = Interaction.GetSelection("\nВыберите объекты распиловки", $"{AcadObjectNames.Line},{AcadObjectNames.Arc},{AcadObjectNames.Lwpolyline}"); if (ids.Length == 0) { return; } Acad.DeleteExtraObjects(); _techProcess.CreateExtraObjects(ids); tbObjects.Text = _techProcess.ProcessingArea.GetDesc(); }
private void bObjects_Click(object sender, EventArgs e) { Interaction.SetActiveDocFocus(); Acad.SelectObjectIds(); var ids = Interaction.GetSelection("\nВыберите окружности", AcadObjectNames.Circle); if (ids.Length == 0) { return; } _techProcess.ProcessingArea = AcadObject.CreateList(ids); tbObjects.Text = _techProcess.ProcessingArea.GetDesc(); Acad.SelectObjectIds(ids); }
private void bObjects_Click(object sender, System.EventArgs e) { Interaction.SetActiveDocFocus(); Acad.SelectObjectIds(); var ids = Interaction.GetSelection("\nВыберите объекты контура"); if (ids.Length == 0) { return; } _techProcess.ProcessingArea = AcadObject.CreateList(ids); tbObjects.Text = _techProcess.ProcessingArea.GetDesc(); Acad.SelectObjectIds(ids); }
private void bObjects_Click(object sender, EventArgs e) { Acad.SelectObjectIds(); Interaction.SetActiveDocFocus(); var ids = Interaction.GetSelection("\nВыберите объекты", $"{AcadObjectNames.Surface},{AcadObjectNames.Region}"); if (ids.Length == 0) { return; } _techProcess.ProcessingArea = AcadObject.CreateList(ids); tbObjects.Text = _techProcess.ProcessingArea.GetDesc(); lbSize.Text = Acad.GetSize(_techProcess.ProcessingArea); }
private void bObjects_Click(object sender, EventArgs e) { Interaction.SetActiveDocFocus(); Acad.SelectObjectIds(); var ids = Interaction.GetSelection("\nВыберите профиль [Отрезок], [Дуга], [Полилиния]", $"{AcadObjectNames.Line},{AcadObjectNames.Arc},{AcadObjectNames.Lwpolyline}"); if (ids.Length == 0) { return; } ids = new ObjectId[] { ids[0] }; _techProcess.ProcessingArea = AcadObject.CreateList(ids); tbObjects.Text = _techProcess.ProcessingArea.GetDesc(); Acad.SelectObjectIds(ids); }
private void bProcessingArea_Click(object sender, EventArgs e) { Interaction.SetActiveDocFocus(); Acad.SelectObjectIds(); var ids = Interaction.GetSelection("\nВыберите объекты контура плитки", "LINE"); if (ids.Length == 0) { return; } _techProcess.ProcessingArea = AcadObject.CreateList(ids); tbContour.Text = _techProcess.ProcessingArea.GetDesc(); Acad.SelectObjectIds(ids); SetParamsEnabled(); }
private void bRail_Click(object sender, EventArgs e) { Interaction.SetActiveDocFocus(); Acad.SelectObjectIds(); var ids = Interaction.GetSelection("\nВыберите направляющую [Отрезок]", AcadObjectNames.Line); if (ids.Length == 1) { _techProcess.Rail = AcadObject.Create(ids[0]); tbRail.Text = _techProcess.Rail.GetDesc(); Acad.SelectObjectIds(ids); } else { _techProcess.Rail = null; tbRail.Text = ""; } }
private static void ConfigurePointsSelector(TextBox textBox, Button button, BindingSource bindingSource) { textBox.Enter += (s, e) => Acad.SelectObjectIds(bindingSource.GetSource <MeasurementTechOperation>().PointObjectIds); button.Click += (s, e) => { var operation = bindingSource.GetSource <MeasurementTechOperation>(); operation.Clear(); Interaction.SetActiveDocFocus(); Point3d point; while (!(point = Interaction.GetPoint("\nВыберите точку измерения")).IsNull()) { operation.CreatePoint(point); textBox.Text = operation.PointsX.Count.ToString(); } }; bindingSource.DataSourceChanged += (s, e) => textBox.Text = bindingSource.GetSource <MeasurementTechOperation>().PointsX.Count.ToString(); }
private void bObject_Click(object sender, System.EventArgs e) { Acad.SelectObjectIds(); Interaction.SetActiveDocFocus(); var ids = Interaction.GetSelection("\nВыберите объект", $"{AcadObjectNames.Line},{AcadObjectNames.Arc},{AcadObjectNames.Lwpolyline}"); if (ids.Length == 0) { return; } Acad.DeleteExtraObjects(); _techOperation.ProcessingArea = null; var border = ((SawingTechProcess)_techOperation.TechProcess).CreateExtraObjects(ids[0])[0]; _techOperation.SetFromBorder(border); tbObject.Text = _techOperation.ProcessingArea.GetDesc(); sawingTechOperationBindingSource.ResetBindings(false); sawingModesView.sawingModesBindingSource.DataSource = _techOperation.SawingModes; }
private void bObjects_Click(object sender, EventArgs e) { if (_techProcess.ProcessingArea == null) { Acad.Alert("Укажите контур плитки"); return; } Interaction.SetActiveDocFocus(); Acad.SelectObjectIds(); var ids = Interaction.GetSelection("\nВыберите 2 элемента плитки"); if (ids.Length > 0) { _techProcess.CalcType(ids); _techProcess.Objects = AcadObject.CreateList(ids); tbObjects.Text = _techProcess.Objects.GetDesc(); tactileTechProcessBindingSource.ResetBindings(false); SetParamsEnabled(); } }
private void tbPointsCount_Enter(object sender, System.EventArgs e) { Acad.SelectObjectIds(_techOperation.PointObjectIds); }
private void tbOrigin_Enter(object sender, EventArgs e) { Acad.SelectObjectIds(_techProcess.OriginObject); }
private void tbObjects_Leave(object sender, EventArgs e) { Acad.SelectObjectIds(); }