Esempio n. 1
0
        public static void buttonSelectProcess(MainForm form)
        {
            string nameSurface = "Поверхность 1";
            int    countNodes  = form.SurfacesTreeView.Nodes.Count;

            distributionIdOnTechnologicalProcess(Part.getSurfaceOnIndex(0).getOperations());

            if (countNodes == 1)
            {
                form.SurfacesTreeView.Nodes.Add("notChange", nameSurface);

                Part.setNameSurfaceOnIndex(1, nameSurface);
                Part.copyTechnologicalProcessInSurface(1);
            }

            StorageOfSelectedOperation.setIndexSelectedSurface(1);
            form.SurfacesTreeView.SelectedNode = form.SurfacesTreeView.Nodes[1];

            form.NameSurface.Text = nameSurface;

            Part.insertListOfOperationsInTreeView(form, 1);
            Part.insertListOfTechnologicalProcessInTreeView(form);

            enabledTextBoxes(form);
        }
Esempio n. 2
0
        public static void buttonAddSurface(MainForm form)
        {
            try
            {
                TreeNode surface = new TreeNode();

                int count = form.SurfacesTreeView.Nodes.Count;

                Part.copyTechnologicalProcessInSurface(count);
                Part.insertListOfOperationsInTreeView(form, count);

                surface.Name = "notChange";
                surface.Text = "Поверхность " + Convert.ToString(count);


                form.SurfacesTreeView.Nodes.Add(surface);

                StorageOfSelectedOperation.setIndexSelectedSurface(count);
                form.SurfacesTreeView.SelectedNode = form.SurfacesTreeView.Nodes[count];

                form.NameSurface.Text = surface.Text;
                Part.getSurfaceOnIndex(count).setNameSurface(surface.Text);
            }
            catch { }
        }