public CustomUpdater(Custom3D custom3D, Model3DGroup model3DGroup, List <object> generalFiguresList) { Custom3DFigure custom3DFigure = new Custom3DFigure(model3DGroup, generalFiguresList); custom3DFigure.Show(); custom3DFigure.point3Ds = custom3D.point3Ds; custom3DFigure.PointsList(); custom3DFigure.triangles3Ds = custom3D.triangles3Ds; custom3DFigure.TrianglesList(); custom3DFigure.ColorPicker.SelectedColor = custom3D.color; custom3DFigure.elementName.Text = custom3D.name.Substring(0, custom3D.name.Length - 12); }
private void Apply(object sender, RoutedEventArgs e) { this.x = (TextBox)FindName("X"); this.y = (TextBox)FindName("Y"); this.z = (TextBox)FindName("Z"); this.points = (ListBox)FindName("pointsList"); this.triangles = (ListBox)FindName("trianglesList"); this.nameFigure = (TextBox)FindName("elementName"); this.colorPicker = (ColorPicker)FindName("ColorPicker"); if (ValuesValidator()) { Custom3D custom3D = new Custom3D(model3DGroup, point3Ds, triangles3Ds, nameFigure.Text, (Color)colorPicker.SelectedColor, generalFiguresList, true); this.Close(); } }