示例#1
0
        public static void clickOnTreeOperations(TreeNodeMouseClickEventArgs e, MainForm form)
        {
            int idOperation          = e.Node.Index;
            int indexSelectedSurface = StorageOfSelectedOperation.getIndexSelectedSurface();

            Operation operation;

            if (indexSelectedSurface == 0)
            {
                operation = extractionOfParametersOfOperationsFromTables(idOperation);
            }
            else
            {
                operation = extractionOfParametersOfOperationsFromTechnologicalProcess(idOperation);
            }

            StorageOfSelectedOperation.setOperation(operation);
            StorageOfSelectedOperation.insertParametersOfOperationsInTextboxes(form);
        }
        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);
            }
        }