private static void insertPartInMainForm(FormOfWorkWithDatabase form)
        {
            Part.insertListOfSurfacess(form.parrentForm);
            Part.insertParametersOfPartInTextboxes(form.parrentForm);
            Part.insertListOfOperationsInTreeView(form.parrentForm);

            EventClickOnButtonOfSelectWorkpriece.enabledTextBoxes(form.parrentForm);

            form.parrentForm.SurfacesTreeView.SelectedNode = form.parrentForm.SurfacesTreeView.Nodes[0];
        }
        public static void clickOnNode(TreeNodeMouseClickEventArgs e, MainForm form)
        {
            int selectedIndex = e.Node.Index;

            StorageOfSelectedOperation.setIndexSelectedOperation(selectedIndex);

            if (selectedIndex == 0)
            {
                EventClickOnButtonOfSelectWorkpriece.buttonSelectWorkpriece(form);
            }
            else
            {
                int index             = selectedIndex - 1;
                int idSelectedSurface = StorageOfSelectedOperation.getIndexSelectedSurface();

                Operation operation = Part.getSurfaceOnIndex(idSelectedSurface).getOperationOnIndex(index);
                StorageOfSelectedOperation.setOperation(operation);

                StorageOfSelectedOperation.insertParametersOfOperationsInTextboxes(form);
            }
        }
Exemplo n.º 3
0
 private void button2_Click(object sender, EventArgs e)
 {
     EventClickOnButtonOfSelectWorkpriece.buttonSelectWorkpriece(this);
 }