Beispiel #1
0
        private static Operation extractionOfParametersOfOperationsFromTables(int idOperation)
        {
            Operation operation = Tables.getParametersOfSurfacesAfterVariousOperations().getTypeOfMachiningOnIndex(idOperation);

            return(operation);

            /*TreeNode node = e.Node;
             *
             * string typeOfMachining = node.Parent.Text;
             * string precisionOfMachining = node.Text;
             * string kvalitet = node.FirstNode.FirstNode.Text;
             * string thicknessOfDefectiveCoating = node.FirstNode.NextNode.NextNode.FirstNode.Text;
             * string coefficientOfRefinement = node.FirstNode.NextNode.NextNode.NextNode.FirstNode.Text;
             * string idOperation = node.FirstNode.NextNode.NextNode.NextNode.NextNode.FirstNode.Text;
             *
             * string stringRz = node.FirstNode.NextNode.FirstNode.Text;
             * string[] splitStringRz = parseStringRz(stringRz);
             * string surfaceRoughnessRz = splitStringRz[0];
             *
             * string stringRecommendedIntervalRz = splitStringRz[1];
             * string[] splitStringRecommendedIntervalRz = parseStringRecommendedIntervalRz(stringRecommendedIntervalRz);
             * Interval recommendedIntervalRz = createIntervalRz(splitStringRecommendedIntervalRz);
             *
             * ParametersOperation parameters = new ParametersOperation(typeOfMachining, precisionOfMachining, surfaceRoughnessRz, recommendedIntervalRz, idOperation, kvalitet, thicknessOfDefectiveCoating, coefficientOfRefinement);
             * return parameters;*/
        }
Beispiel #2
0
 private void Form1_Load(object sender, EventArgs e)
 {
     try
     {
         Tables.getParametersOfSurfacesAfterVariousOperations().insertListOfOperationsInTreeView(this);
     }
     catch { MessageBox.Show("Повреждены XML таблицы", "Ошибка"); }
 }
Beispiel #3
0
        public void formationOfLongListWithParametersOfOperation()
        {
            this.parametersOperation.Clear();

            double surfaceRoughness = this.getParametersOfSurface().getSurfaceRoughnessRz();

            int numberOfOperations = this.getCountShortListOperation();

            for (int i = numberOfOperations - 1; i >= 0; i--)
            {
                Operation operation = this.getOperationOnIndex(i);
                List <ParametersOperation> parametersOperation = Tables.getParametersOfSurfacesAfterVariousOperations().getListOperationOnSurfaceRoughness(operation, surfaceRoughness);

                this.parametersOperation.InsertRange(0, parametersOperation);

                surfaceRoughness = parametersOperation[0].getRecommendedIntervalRz().getIntervalMax();
            }
        }
Beispiel #4
0
        public static void clickOnNode(TreeNodeMouseClickEventArgs e, MainForm form)
        {
            int selectedIndex = e.Node.Index;

            //storageParametersOfSurface(form, selectedIndex);

            StorageOfSelectedOperation.setIndexSelectedSurface(selectedIndex);
            form.NameSurface.Text = Part.getSurfaceOnIndex(selectedIndex).getNameSurface();

            if (selectedIndex == 0)
            {
                StorageOfSelectedOperation.setIndexSelectedSurface(0);
                form.SurfacesTreeView.SelectedNode = form.SurfacesTreeView.Nodes[0];
                Part.insertListOfOperationsInTreeView(form);
                form.TreeOfOperations.Nodes.Clear();
                Tables.getParametersOfSurfacesAfterVariousOperations().insertListOfOperationsInTreeView(form);

                form.Surfaces.Visible         = false;
                form.NameSurface.Visible      = false;
                form.SurfacesTreeView.Visible = false;
                form.addSurfaceButton.Visible = false;
                form.delSurfaceButton.Visible = false;

                form.TreeOfOperations.Size     = new Size(400, 287);
                form.TreeOfOperations.Location = new Point(16, 270);

                form.labelOperationsOrTechProcess.Size     = new Size(91, 13);
                form.labelOperationsOrTechProcess.Location = new Point(169, 250);
                form.labelOperationsOrTechProcess.Text     = "Выбор операций";


                form.SelectTechnologicalProcess.Visible = true;
                form.CalculationOfSchema.Visible        = false;
            }
            else
            {
                int indexSelectSurface = StorageOfSelectedOperation.getIndexSelectedSurface();

                Part.insertListOfOperationsInTreeView(form, indexSelectSurface);

                int countOperations = form.TreeOfSelectedOperations.Nodes.Count;
                form.TreeOfSelectedOperations.SelectedNode = form.TreeOfSelectedOperations.Nodes[countOperations - 1];
            }
        }