Exemplo n.º 1
0
        private void Canvas1_ShowBlockPoperites(object sender, EventArgs e)
        {
            var temp = (sender as MyBlock);

            if (_properties != null)
            {
                if (_properties.ShouldRefresh(temp))
                {
                    _properties.UpdateProperties();
                    return;
                }
                else
                {
                    splitContainer2.Panel2.Controls.Remove(_properties);
                }
            }

            _properties = new BlockProperties(temp)
            {
                Width    = splitContainer2.Panel2.Width,
                Height   = splitContainer2.Panel2.Height,
                Location = new System.Drawing.Point(0, 0)
            };

            _properties.BlockPropertyChanged += _properties_BlockPropertyChanged;
            splitContainer2.Panel2.Controls.Add(_properties);
        }