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); }
private void NameSurface_TextChanged(object sender, EventArgs e) { try { int indexSelectedSurface = StorageOfSelectedOperation.getIndexSelectedSurface(); string nameSurface = NameSurface.Text; SurfacesTreeView.Nodes[indexSelectedSurface].Text = nameSurface; SurfacesTreeView.Nodes[indexSelectedSurface].Name = "change"; Part.setNameSurfaceOnIndex(indexSelectedSurface, nameSurface); } catch { } }