示例#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);

            }
        }