Example #1
0
        void centerBrush_Menu_Click(object sender, RoutedEventArgs e)
        {
            BrushPicker colorPicker = new BrushPicker(this._centerBrush);

            colorPicker.Owner = this._host;
            colorPicker.ShowDialog();
            this._centerBrush = colorPicker._Brush;
            colorPicker       = null;
        }
        private void fillBrush_Menu_Click(object sender, RoutedEventArgs e)
        {
            BrushPicker colorPicker = new BrushPicker(this.fillBrush);

            colorPicker.Owner = this._host;
            colorPicker.ShowDialog();
            this.fillBrush = colorPicker._Brush;
            this.draw();
            colorPicker = null;
        }
Example #3
0
        private void goembrush_Click(object sender, RoutedEventArgs e)
        {
            BrushPicker colorPicker = new BrushPicker(this.geomBrush);

            colorPicker.Owner = this;
            colorPicker.ShowDialog();
            this.geomBrush = colorPicker._Brush;
            this.UpdateMaterial();
            colorPicker = null;
        }
        void boarderBrush_Menu_Click(object sender, RoutedEventArgs e)
        {
            BrushPicker colorPicker = new BrushPicker(this.pathBrush);

            colorPicker.Owner = this._host;
            colorPicker.ShowDialog();
            this.pathBrush = colorPicker._Brush;
            //this.reDraw();                        /*Do not change the color of the previous pathes*/
            colorPicker = null;
        }
Example #5
0
        private void brush_Menu_Click(object sender, RoutedEventArgs e)
        {
            BrushPicker colorPicker = new BrushPicker(this._brush);

            colorPicker.Owner = this._host;
            colorPicker.ShowDialog();
            this._brush = colorPicker._Brush;
            colorPicker = null;
            if (this._children.Count != 0)
            {
                this.draw();
            }
        }
Example #6
0
        private void setSurfaceBrush_Click(object sender, RoutedEventArgs e)
        {
            foreach (object item in this.applyColor.Items)
            {
                ((MenuItem)item).IsChecked = false;
            }
            ((MenuItem)sender).IsChecked = true;
            this._clrMode = ColorMode.Solid;
            BrushPicker colorPicker = new BrushPicker(this.surfaceBrush);

            colorPicker.Owner = this;
            colorPicker.ShowDialog();
            this.surfaceBrush = colorPicker._Brush;
            this.UpdateMaterial();
            colorPicker = null;
        }
Example #7
0
        private void setModelGeometryBrush_Click(object sender, RoutedEventArgs e)
        {
            BrushPicker colorPicker = new BrushPicker(this.geometryBrush);

            colorPicker.Owner = this;
            colorPicker.ShowDialog();
            this.geometryBrush    = colorPicker._Brush;
            colorPicker           = null;
            this.geometryMaterial = null;
            this.geometryMaterial = new DiffuseMaterial(this.geometryBrush);
            if (this.modelGeometries != null)
            {
                foreach (GeometryModel3D item in this.modelGeometries)
                {
                    item.Material = this.geometryMaterial;
                }
            }
        }