public static Assembly operator *(Assembly first, double factor) { Assembly assembly = new Assembly(); foreach (Layer layer in first.Layers) { Layer lay = new Layer(layer.Material, layer.Width * factor, layer.isPercentual); assembly.Layers.Add(lay); } return assembly; }
public void AddLayer(ListView assemblyList, Layer layer) { this.Layers.Add(layer); assemblyList.Items.Add(layer.Draw()); }
private void Button_Click(object sender, RoutedEventArgs e) { if (MaterialSelector.SelectedItem != null) { ListViewItem lvi = (ListViewItem)MaterialSelector.SelectedItem; Material mat = (Material)lvi.Tag; Layer lay = new Layer(mat, isPercentual); assembly.AddLayer(materialComposer, lay); } }