示例#1
0
        private void bBuildProcessing_ButtonClick(object sender, EventArgs e)
        {
            var node = treeView.SelectedNode.Parent ?? treeView.SelectedNode;

            treeView.SelectedNode = node;
            SelectNextControl(ActiveControl, true, true, true, true);

            toolStrip.Enabled = false;
            if (sender == bBuildProcessing)
            {
                _camDocument.BuildProcessing(CurrentTechProcess);
            }
            else
            {
                _camDocument.PartialProcessing(CurrentTechProcess, CurrentProcessCommand);
            }
            toolStrip.Enabled = true;

            CreateProcessCommandsIdx();

            if (node.Nodes.Count == 0)
            {
                node.Nodes.AddRange(CurrentTechProcess.TechOperations.ConvertAll(CreateTechOperationNode).ToArray());
                node.Expand();
            }

            UpdateCaptions();
            RefreshToolButtonsState();

            ClearCommandsView();
            RefreshViews();
            tabControl.SelectedTab = tabPageCommands;
        }
示例#2
0
文件: CamView.cs 项目: airmay/CAM
        private void bBuildProcessing_ButtonClick(object sender, EventArgs e)
        {
            var node = treeView.SelectedNode.Parent ?? treeView.SelectedNode;

            //treeView.SelectedNode = node;
            SelectNextControl(ActiveControl, true, true, true, true);

            toolStrip.Enabled = false;
            if (sender == bBuildProcessing)
            {
                _camDocument.BuildProcessing(CurrentTechProcess);
            }
            else
            {
                _camDocument.PartialProcessing(CurrentTechProcess, CurrentProcessCommand);
            }
            toolStrip.Enabled = true;

            if (node.Nodes.Count == 0)
            {
                node.Nodes.AddRange(CurrentTechProcess.TechOperations.Select(CreateTechOperationNode).ToArray());
                node.Expand();
            }

            UpdateCaptions();
            RefreshToolButtonsState();

            processCommandBindingSource.Position   = 0;
            processCommandBindingSource.DataSource = CurrentTechProcess.ProcessCommands;

            RefreshParamsView();

            if (IsToolpathVisible)
            {
                CurrentTechProcess.GetToolpathObjectsGroup()?.SetGroupVisibility(true);
                Acad.Editor.UpdateScreen();
            }
        }