Пример #1
0
        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;
        }
Пример #2
0
 public void AddLayer(ListView assemblyList, Layer layer)
 {
     this.Layers.Add(layer);
     assemblyList.Items.Add(layer.Draw());
 }
Пример #3
0
        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);

            }
        }