Example #1
0
        private void UserControl_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            ColorPicker cp = new ColorPicker(pinNode.GetSystemColor());

            cp.Owner = MateriaMainWindow.Instance;

            if (cp.ShowDialog() == true)
            {
                var nc = cp.Selected;
                pinNode.SetSystemColor(nc);
                Color = pinNode.GetColor();
                PinColorBrush.Color = Color;
            }
        }
Example #2
0
        public UIPinNode(Node n, UIGraph graph, double ox, double oy, double xs, double xy, double sc = 1)
        {
            InitializeComponent();
            Graph   = graph;
            Node    = n;
            xShift  = xs;
            yShift  = xy;
            originX = ox;
            originY = oy;
            scale   = sc;

            Id = n.Id;

            Margin = new Thickness(0);

            pinNode = n as PinNode;

            Color = pinNode.GetColor();
            PinColorBrush.Color = Color;
        }