Ejemplo n.º 1
0
        private void EventSinkService_NodeMouseEnter(NNodeViewEventArgs args)
        {
            NShape shape = args.Node as NShape;

            if (shape == null || shape is NMapArcsShape)
            {
                return;
            }

            shape.StyleSheetName = shape.StyleSheetName + "2";
        }
Ejemplo n.º 2
0
        private void EventSinkService_NodeMouseLeave(NNodeViewEventArgs args)
        {
            NShape shape = args.Node as NShape;

            if (shape == null || shape is NMapArcsShape)
            {
                return;
            }

            shape.StyleSheetName = shape.StyleSheetName.Remove(shape.StyleSheetName.Length - 1);
        }
Ejemplo n.º 3
0
        private void EventSinkService_NodeClick(NNodeViewEventArgs args)
        {
            NShape shape = args.Node as NShape;

            if (shape == null)
            {
                return;
            }

            MessageBox.Show(shape.Name, "Country clicked:", MessageBoxButtons.OK, MessageBoxIcon.None);
            args.Handled = true;
        }
        private void routableConnector_DoubleClick(NNodeViewEventArgs args)
        {
            NShape shape = args.Node as NShape;

            if (shape == null)
            {
                return;
            }

            MessageBox.Show(shape.Name + "\n [" + shape.FromShape.AggregateModel.Name + " , " + shape.StartPlug.InwardPort.Name
                            + "]\n >> \n[" + shape.ToShape.AggregateModel.Name + " , " + shape.EndPlug.InwardPort.Name + "]", "Connector clicked:", MessageBoxButtons.OK, MessageBoxIcon.None);
            args.Handled = true;
        }
        private void instance_DoubleClick(NNodeViewEventArgs args)
        {
            UDNGroup shape = args.Node as UDNGroup;

            if (shape == null)
            {
                return;
            }

            MessageBox.Show(shape.Name + "  " + shape.UDPorts.Count, "Instance clicked:~~~", MessageBoxButtons.OK, MessageBoxIcon.None);
            args.Handled = true;

            editPorts = new EditPorts(shape);
            editPorts.Show();
        }
        public void OnNodeClicked(NNodeViewEventArgs args)
        {
            NShape shape = (args.Node as NShape);

            if (shape == null)
            {
                return;
            }

            // change the clicked shape fill style
            shape.Style.FillStyle = new NColorFillStyle(Color.Red);

            // mark the event as handled to stop bubbling
            args.Handled = true;
        }
Ejemplo n.º 7
0
        private void EventSinkService_NodeMouseLeave(NNodeViewEventArgs args)
        {
            // remove highlighting on mouse leave
            NShape shape = (args.Node as NShape);

            if (shape == null)
            {
                return;
            }

            shape.Style.FillStyle = null;

            // mark as handled and processed to stop bubbling and processing
            args.Handled   = true;
            args.Processed = markEventsAsProcessedCheck.Checked;
        }
Ejemplo n.º 8
0
        private void EventSinkService_NodeMouseEnter(NNodeViewEventArgs args)
        {
            // highlight shapes on mouse enter
            NShape shape = (args.Node as NShape);

            if (shape == null)
            {
                return;
            }

            shape.Style.FillStyle = new NColorFillStyle(SystemColors.HotTrack);

            // mark as handled and processed to stop bubbling and processing
            args.Handled   = true;
            args.Processed = markEventsAsProcessedCheck.Checked;
        }