Beispiel #1
0
        void CreateItem(ITopologyItem n, Point location)
        {
            if (n == null)
            {
                return;
            }

            UCTopologyItem top = new UCTopologyItem(n);

            top.Location = location;
            n.Tag        = top;
            top.RefreshInPlay(_InPlay);

            top.MouseDown += pictureBox1_MouseDown;
            top.MouseMove += pictureBox1_MouseMove;
            pItems.Controls.Add(top);

            n.OnProcess += Item_OnProcess;
            _List.Add(top);

            if (n is IDataInput)
            {
                IDataInput i = (IDataInput)n;
                _Inputs.Add(i);

                if (_InPlay)
                {
                    _Inputs.Stop();
                    _Inputs.Start();
                }
            }

            Select(top);
        }
Beispiel #2
0
 protected override void OnStop()
 {
     inputs.Stop();
 }