コード例 #1
0
        IControlPoint GetInputControlPoint(IControlPoint originalSender, IControlPoint originalTarget)
        {
            if (mInputControlPointMap.ContainsKey(originalTarget) == false)
            {
                originalTarget.HasProxy = true;

                BasicControlPoint proxy = new BasicControlPoint(mOuterGroup);
                proxy.Virtual = true;

                proxy.SetDirection(new Point(-250, 0));

                //proxy.ChainChild = target;
                proxy.TargetKey = originalTarget.TargetKey;
                proxy.TypeKey   = originalTarget.TypeKey;
                //proxy.BackColor = originalSender.BackColor;
                //proxy.ControlPointDescription = "Proxy";
                proxy.ControlPointDescription = this.GroupUI.Title + "." + originalTarget.ControlPointDescription;

                proxy.SetToolTipText(proxy.ControlPointDescription);

                proxy.Name        = originalTarget.ToString();
                proxy.TagObject   = this;
                proxy.ProxyTarget = originalTarget;

                mControlPoints.Add(proxy); //?
                GoupInputHardPointsBar.AddControl(proxy);
                mInputControlPointMap[originalTarget] = proxy;

                proxy.SenderControlPointConnected += new BasicControlPoint.ControlPointEvent(inproxy_ControlPointConnected);
                proxy.SenderControlPointRemoved   += new BasicControlPoint.ControlPointEvent(inproxy_ControlPointRemoved);
            }


            return(mInputControlPointMap[originalTarget]);
        }
コード例 #2
0
        public void ClearData()
        {
            mbLoading = true;

            mControlPoints.Clear();
            GroupOutpuHardPointsBar.RemoveAll();
            GoupInputHardPointsBar.RemoveAll();

            foreach (KeyValuePair <IControlPoint, IControlPoint> pair in mInLinks)
            {
                pair.Key.DisconnectControlPoint(pair.Value);
            }
            foreach (KeyValuePair <IControlPoint, IControlPoint> pair in mOutLinks)
            {
                pair.Key.DisconnectControlPoint(pair.Value);
            }

            mInLinks.Clear();
            mOutLinks.Clear();


            mInputControlPointMap.Clear();
            mOutputControlPointMap.Clear();

            mbLoading = false;
        }