Example #1
0
        private void Ports_InsertElement(object sender, ElementsEventArgs e)
        {
            return;

            //TODO: Descobrir qual evento deve ser ignorado para impossibilitar lin.Start de ser movido!

            //Sets the shape of the port
            Port port = (Port)e.Value;

            port.SetParent(this);
            port.SetLayer(Layer);
            port.ElementInvalid += new EventHandler(Port_ElementInvalid);
            port.SetModel(Model);
            port.SetOrder(_ports.Count - 1);

            //If not deserializing then locate port
            if (port.Location.IsEmpty)
            {
                LocatePort(port);
            }
            //Else just set orientation and offset
            else
            {
                port.Orientation = GetPortOrientation(port, port.Location);
                port.SetOffset(port.CalculateOffset());
            }
        }
Example #2
0
        private void Ports_InsertElement(object sender, ElementsEventArgs e)
        {
            //Sets the shape of the port
            Port port = (Port)e.Value;

            port.SetParent(this);
            port.SetLayer(Layer);
            port.ElementInvalid += new EventHandler(Port_ElementInvalid);
            port.SetModel(Model);
            port.SetOrder(_ports.Count - 1);

            //If not deserializing then locate port
            if (port.Location.IsEmpty)
            {
                LocatePort(port);
            }
            //Else just set orientation and offset
            else
            {
                port.Orientation = GetPortOrientation(port, port.Location);
                port.SetOffset(port.CalculateOffset());
            }
        }